Architecture: How to make Vitto the single brain for ALL chat including we...

Documentation for Sessions

🏗️ Architecture: How to make Vitto the single brain for ALL chat including we...

Date: 2026-03-01
Time: 18:37:28 UTC
Session: gspace1-158.8
Agent: backend
Confidence: 88%
Status: ✅ Documented


📋 Decision Context

Question:

How to make Vitto the single brain for ALL chat including web panel?

Task: Session 158: Phase 1C — Route web panel chat through Vitto (single brain)


🎯 Decision Made

Chosen:

Added POST /engine/chat endpoint to VittoController that submits chat as channel-message with replyTo='direct-chat', polls task object for completion. ChatService in backend-ai-api converted to conditional proxy: when CHAT_USE_VITTO_PROXY=true, enriches with Intelligence Pyramid then forwards to Vitto. Falls back to direct Anthropic if Vitto unreachable. Feature-flagged for safe rollout.

Options Considered:


💭 Reasoning

Key decisions: (1) Feature flag via CHAT_USE_VITTO_PROXY env var — allows gradual rollout without breaking existing chat. (2) ChatService KEEPS its context enrichment (user profile, memories, Intelligence Pyramid) and passes to Vitto. (3) Fallback to direct Anthropic if Vitto is unreachable — resilience. (4) Memory extraction still runs in backend-ai-api even when proxying (same extractAndSaveMemories pipeline). (5) Task polling uses the in-memory task object reference since submitTask returns a mutable task.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation