Architecture: How should the AI frontend libraries be organized to separat...
Documentation for Sessions
🏗️ Architecture: How should the AI frontend libraries be organized to separat...
Date: 2026-02-17
Time: 21:31:48 UTC
Session: gspace1-112.2
Agent: backend
Confidence: 95%
Status: ✅ Documented
📋 Decision Context
Question:
How should the AI frontend libraries be organized to separate concerns between Vitto (orchestrator), AI Panel (universal interface), and Space Agents (per-space)?
Task: Session 112: AI library architecture restructuring — vitto-hub, ai-panel-core, space-agents separation
🎯 Decision Made
Chosen:
Three-library architecture: (1) @libs-ai/vitto-hub for Vitto's mind/command hub only, (2) @libs-ai/ai-panel-core for the universal AI chat interface, (3) @libs-ai/space-agents (planned) for per-space dedicated agents. Each talks to distinct backends.
Options Considered:
- Consolidate everything into one library
- Two libraries (vitto-hub + ai-panel-core)
- Three libraries (vitto-hub + ai-panel-core + space-agents)
- Keep scattered across existing libraries
💭 Reasoning
The original space-assistant library mixed three unrelated concerns: Vitto's orchestration dashboard, the universal AI chat panel, and space-specific agent functionality. This caused confusion about what belongs where and created wrong coupling. Vitto is the orchestrator/mind (Jarvis) — talks to backend-vitto-api. The AI Panel is the universal interface for ALL AI interactions — talks to backend-ai-api + backend-api + backend-vitto-api. Space Agents are per-space dedicated agents — talk to backend-ai-api/space-agents. Each has distinct data ownership, lifecycle, and backend dependencies. Confirmed by code analysis: backend-vitto-api delegates DOWN to backend-ai-api via connectivity services (backend-ai-client.service.ts, infrastructure-client.service.ts, handoff-ws-client.service.ts).
📁 Files Involved
libs/libs-ai/vitto-hub/src/index.tslibs/libs-ai/ai-panel-core/src/index.tslibs/libs-ai/ai-agent-experience/src/lib/components/space-agents/libs/libs-ai/gograb-ai-lib/src/lib/components/space-assistants-dashboard/
🔗 Related
- Decision ID:
dev_1771363908308_3xhtzrf - Session: 112
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation