Based on frontend usage audit and backend duplication analysis.
Problem: Frontend calls /api/chats/* but backend only has /api/chat and legacy endpoints
Impact: Chat management likely broken in production
Action:
- ✅ Already fixed in recent edits (updated frontend to use
/api/list_sessions,/api/load_session/{id}) - Still need to implement proper
/api/chats/*in backend for consistency
Problem: PhaseProgressionIndicator calls /api/project/* endpoints that don't exist
Impact: Phase management UI completely broken
Frontend Usage:
await apiRequest('/api/project/status')
await apiRequest('/api/project/report')
await apiRequest('/api/phases/status')
await apiRequest('/api/phases/validation/run')Action: Create project state API endpoints immediately
Frontend Usage:
- TerminalWindow.vue: Uses WebSocket
/api/terminal/ws/simple/ - Multiple components call
/api/terminal/execute,/api/terminal/sessionsBackend Reality: 4 different terminal implementations! terminal.py- Main APIsimple_terminal_websocket.py- WebSocket simplesecure_terminal_websocket.py- WebSocket securebase_terminal.py- Base functions Action: Consolidate to single terminal API
Frontend Usage: Only calls /api/system/health (good!)
Backend Reality: 37+ different health endpoints across modules (12 noted originally, audit
found more)
Action: Deprecate unused health endpoints, keep /api/system/health as primary
Completed (Issue #3333):
- Audited all health endpoints in
autobot-backend/api/ - Primary endpoint
/api/system/healthkept as-is (no changes) - Frontend-called endpoints kept as-is:
/api/long-running/health,/api/monitoring/services/health - Added deprecation
logger.warning+deprecated/use_insteadresponse fields to 9 endpoints with boilerplate static responses or unregistered routers:analytics_llm_patterns.py→/api/llm-patterns/healthanalytics_code_generation.py→/api/code-generation/healthanalytics_dfa.py→/api/dfa-analytics/healthanalytics_architecture.py→/api/architecture/healthanalytics_cfg.py→/api/cfg-analytics/healthservices.py→/api/services/healthmesh_brain.py→ deleted (#3354, unregistered router — dead module)monitoring_compat.py→ deleted (#3354, unregistered router — already deprecated module)natural_language_search.py→/api/health(no-prefix collision risk)
- Remaining endpoints have legitimate per-service logic (Redis ping, real service checks) and are not called by the frontend
Frontend Usage:
/api/settings/(main)/api/settings/config/api/settings/backendBackend Reality: 8 different config endpoints Action: Route all config through settings.py, deprecate others
Frontend Usage: Consistently uses /api/workflow/* ✅
Backend Reality: 3 workflow implementations
workflow.py✅ (Used by frontend)workflow_automation.py❌ (Unused?)advanced_workflow_orchestrator.py❌ (Unused?) Action: Deprecate unused workflow systems
Frontend Usage:
/api/knowledge_base/*(primary)/api/chat_knowledge/*(chat-specific)/api/kb_librarian/*(librarian) Backend Reality: All 3 exist but overlap significantly Action: Define clear boundaries or merge
Frontend Usage: Limited usage of /api/agent-config/*
Backend Reality: 3 agent APIs with significant overlap
Action: Merge when other priorities complete
Frontend Usage:
- Terminal WebSockets (working)
- Monitoring WebSockets (working) Backend Reality: Scattered WebSocket implementations Action: Consolidate WebSocket patterns
- Implement missing project state endpoints
- Create
/api/project/status - Create
/api/project/report - Create
/api/phases/*endpoints
- Create
- Verify chat endpoint fixes are working
- Audit which terminal endpoints frontend actually uses
- Choose primary terminal implementation (likely
terminal.py+simple_terminal_websocket.py) - Deprecate unused terminal APIs
- Update documentation
- ✅ Audit all health endpoints — found 37+ (not 12 as originally estimated)
- ✅ Keep
/api/system/healthas primary — no changes to primary endpoint - ✅ Add deprecation warnings to boilerplate endpoints — 9 endpoints updated
- Route internal health checks through system API — deferred: remaining endpoints have legitimate per-service logic and are not called by the frontend
- Route all config through
/api/settings/* - Deprecate scattered config endpoints
- Add backward compatibility layer
- 50% reduction in total API endpoints
- Zero frontend 404 errors from missing endpoints
- Single source of truth for each functionality
- Consistent naming patterns across all APIs
- Clear deprecation timeline for old endpoints
- Backward Compatibility: Keep old endpoints with deprecation warnings initially
- Frontend Testing: Test all UI components after each consolidation
- Gradual Migration: Move one endpoint category at a time
- Documentation: Update API docs immediately after changes
- Monitoring: Watch for 404 errors in production logs
- Faster frontend development (clear API patterns)
- Easier testing (fewer duplicate code paths)
- Better performance (optimized single implementations)
- Simpler maintenance (less duplicate code)
- Clearer documentation (single API reference)