Architecture: How to fix AI Intelligence Hub showing inaccurate data (Trai...

Documentation for Sessions

🏗️ Architecture: How to fix AI Intelligence Hub showing inaccurate data (Trai...

📋 Decision Context

Question:

How to fix AI Intelligence Hub showing inaccurate data (Training Agents empty, MCP Health 0/0, Memory Tiers 0, Super Intelligence 0%)?

Task: Fix AI Intelligence Hub and Command Center to show real-time accurate data


🎯 Decision Made

Chosen:

Complete architectural fix with event emission and new API endpoints

Options Considered:

  1. Only fix frontend UI
  2. Fix data flow from MCP to backend to frontend
  3. Create mock data endpoints
  4. Complete architectural fix with event emission and new API endpoints

💭 Reasoning

Root cause analysis revealed multiple disconnected data flows: 1) Training agents were never spawned because MCP only emitted execution agents - fixed by adding agentCategory:'training' events in log-decision.ts when decisions are routed to training agents. 2) Memory tier stats showed 0 because MCP wasn't emitting pipeline status - fixed by adding pipelineStatus emission in preflight.ts. 3) MCP Health endpoint didn't exist - created /ai-api/mcp/health in mcp.controller.ts. 4) Super Intelligence stats endpoint missing - added /ai-api/super-intelligence/stats. All fixes follow the existing event-driven architecture (MCP→HTTP→Backend→WebSocket→Frontend) rather than creating workarounds.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation