Architecture: What is the optimal architecture to connect Vitto's Mind wit...

Documentation for Sessions

🏗️ Architecture: What is the optimal architecture to connect Vitto's Mind wit...

Date: 2026-02-11
Time: 19:42:15 UTC
Session: gspace1-106.4
Agent: backend
Confidence: 93%
Status: ✅ Documented


📋 Decision Context

Question:

What is the optimal architecture to connect Vitto's Mind with the MCP/platform knowledge stores?

Task: Session 106: Vitto cross-database knowledge federation architecture


🎯 Decision Made

Chosen:

API-mediated bidirectional sync with local cache (Knowledge Federation Layer). Three new services: (1) KnowledgeSyncService in backend-vitto-api that periodically pulls core rules, top patterns, and calibration curves from backend-ai-api, caching them in a new 'platform-knowledge' collection in vitto-mind. (2) An OutcomeFeedbackService in backend-vitto-api that posts structured execution outcomes back to backend-ai-api after each task completion. (3) A new /learning/execution-outcomes endpoint in backend-ai-api that receives these outcomes and feeds them into pattern success rates, calibration, and outcome detection. This creates a closed learning loop: MCP recommends -> Vitto executes -> outcomes improve MCP -> better recommendations.

Options Considered:

  1. Direct MongoDB cross-connection (Vitto reads ai-mcp-dev, ai-agents directly)
  2. Full data replication (copy all platform knowledge into vitto-mind)
  3. API-mediated bidirectional sync with local cache (Knowledge Federation Layer)
  4. Event-driven sync via message queue (Kafka/Redis streams)

💭 Reasoning

Direct MongoDB cross-connection violates service boundaries and creates schema coupling. Full replication is wasteful and creates consistency headaches. Event-driven (Kafka) is over-engineered for our scale. API-mediated sync is the sweet spot: (1) Preserves service boundaries - each service owns its database. (2) Local cache eliminates per-task HTTP latency during ANALYZE phase. (3) Cron-based sync (30 min) keeps knowledge reasonably fresh without overloading. (4) The bidirectional feedback loop is the critical missing piece - Vitto's execution outcomes (success rates, tool effectiveness, failure patterns) are gold that the MCP system needs to improve its recommendations. (5) The platform-knowledge collection in vitto-mind acts as a materialized view, not a source of truth. (6) Falls back gracefully to per-task HTTP calls if sync is stale.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation