Architecture: How should backend-ai-api access user agent memories stored ...
Documentation for Sessions
🏗️ Architecture: How should backend-ai-api access user agent memories stored ...
Date: 2026-01-31
Time: 18:44:21 UTC
Session: editor2-75.22
Agent: backend
Confidence: 90%
Status: ✅ Documented
📋 Decision Context
Question:
How should backend-ai-api access user agent memories stored in gograb-api?
Task: Not specified
🎯 Decision Made
Chosen:
Direct MongoDB connection via new PLATFORM connection name, with UserAgentMemoryModule providing schema registration
Options Considered:
- No alternatives documented
💭 Reasoning
Option A (direct DB) vs Option B (HTTP internal API): Chose Option A because VITTO needs low-latency access during conversation. HTTP adds 10-50ms per call. The schemas are already shared via @libs-api/backend-core, so registering them on a new connection to gograb-api is straightforward. Created AI_CONNECTION_NAMES.PLATFORM and AI_MONGODB_OPTIONS.platform configs. UserAgentMemoryModule handles schema registration and service provision.
📁 Files Involved
libs/libs-api/backend-core/src/lib/config/database-names.config.tslibs/libs-api/backend-core/src/lib/config/mongodb.factory.tsapis/backend-ai-api/src/app/shared/user-agent-memory.module.tsapis/backend-ai-api/src/app/app.module.tsapis/backend-ai-api/src/app/vitto/vitto.module.ts
🔗 Related
- Decision ID:
dev_1769885057846_2f3omil - Session: 75
- Workspace: editor2
Auto-generated by MCP Smart Consolidation