/healthappears 12 times across modules/statusappears 15 times across modules/statsappears 5 times
Modules with health/status duplicates:
- system.py:
/system/health,/system/status - chat.py:
/chat/health,/chat/llm-status - llm.py:
/status/comprehensive,/status/quick - workflow.py:
/workflow/{id}/status - Many more...
/configappears 8 times- Different modules managing configuration separately
/searchappears 4 times- knowledge.py: knowledge search
- templates.py: template search
- Other modules with search capabilities
workflow.pyvsworkflow_automation.pyvsadvanced_workflow_orchestrator.py/workflowsvs/workflow/{id}- Multiple workflow management systems
terminal.pyvssimple_terminal_websocket.pyvssecure_terminal_websocket.pyvsbase_terminal.py/terminal/sessionsin multiple files- WebSocket endpoints:
/ws/terminal,/ws/secure,/ws/simple
agent.pyvsintelligent_agent.pyvsagent_config.py/agentsendpoints scattered across files
knowledge.pyvschat_knowledge.pyvskb_librarian.py/entriesvs/knowledgepatterns
- Multiple WebSocket implementations
websockets.py+ embedded websockets in other files
terminal.py:
- POST /terminal/command
- POST /terminal/sessions
- GET /terminal/sessions/{id}
simple_terminal_websocket.py:
- GET /simple/sessions
- POST /sessions
- WebSocket /ws/simple/{id}
secure_terminal_websocket.py:
- WebSocket /ws/secure/{id}
- POST /terminal/{chat_id}/control/take
base_terminal.py:
- GET /terminal/package-managers
- POST /terminal/check-tool
system.py: GET /system/health
chat.py: GET /chat/health
llm.py: GET /status/comprehensive
workflow.py: GET /workflow/{id}/status
kb_librarian.py: GET /health
research_browser.py: GET /playwright/health
settings.py: GET/POST /config
agent_config.py: GET/POST /config
llm.py: GET/POST /config
system.py: GET /config
phase_management.py: POST /config/update
- Frontend Confusion: Which endpoint to call?
- Inconsistent Behavior: Same path, different results
- Maintenance Nightmare: 4 terminal implementations
- Testing Complexity: Multiple code paths for same functionality
- Documentation Chaos: Hard to document overlapping APIs
- Multiple health check implementations
- Duplicate configuration management
- Redundant validation logic
- Scattered business logic
- Unify Terminal APIs: Choose one implementation, deprecate others
- Standardize Health Checks: Single
/healthwith service-specific details - Centralize Configuration: Single config API with module routing
- Merge Knowledge APIs: knowledge.py + chat_knowledge.py + kb_librarian.py
- Consolidate Agent Management: agent.py + intelligent_agent.py
- Unify Workflow Systems: Choose primary workflow implementation
- Consistent Naming:
/api/v1/{resource}/{action}pattern - HTTP Method Standards: GET=read, POST=create, PUT=update, DELETE=remove
- Response Format Standards: Consistent JSON structure
- Audit Current Usage: Which endpoints are actually used by frontend?
- Create Migration Plan: Safe deprecation timeline
- Choose Primary Implementations: Keep best, deprecate rest
- Update Documentation: Clear API reference
- 50% reduction in API surface area
- Simplified frontend development
- Easier testing and maintenance
- Better performance (fewer code paths)
- Clearer documentation