Architecture: Is Vitto's memory architecture correct for a Jarvis-level ag...

Documentation for Sessions

🏗️ Architecture: Is Vitto's memory architecture correct for a Jarvis-level ag...

Date: 2026-03-19
Time: 01:29:42 UTC
Session: gspace1-237.5
Agent: backend
Confidence: 96%
Status: ✅ Documented


📋 Decision Context

Question:

Is Vitto's memory architecture correct for a Jarvis-level agent that maintains persona, recognizes session boundaries, and always knows the user?

Task: S234: Memory architecture audit and redesign for Jarvis-level agent


🎯 Decision Made

Chosen:

Three fixes: (1) Inverted token budget priorities — user dossier and context elevated from priority 7-8 to 9 (SACRED, only trimmed after everything else). (2) Session boundary detection — distinguish NEW SESSION (returning user, no recent history) from FIRST INTERACTION (unknown user). (3) Auto-extracted facts synced to UserDossier via learnFact() and updateExpertise() — dossier becomes a living document that grows from every conversation.

Options Considered:

  1. Fix token budget + session awareness + dossier sync (chosen — addresses all 3 root causes)
  2. Add a separate memory consolidation service (over-engineering — existing services just needed wiring)
  3. Increase MAX_SYSTEM_PROMPT_TOKENS to 100K (wrong — wastes context window, doesn't fix priority order)
  4. Replace dossier with IdentitySynthesis (wrong — dossier is rule-based and fast, synthesis is LLM and slow)

💭 Reasoning

Deep audit of 5 memory layers (VittoMemory, UserDossier, AgentSession, IdentitySynthesis, SpaceIntelligence) revealed: (a) Token budget priority was inverted — user dossier (Vitto's knowledge of WHO it's talking to) had priority 7 and got trimmed before page context (priority 2) and learning intel (priority 3). For a 'knows the user' agent, identity must be SACRED. (b) No session boundary markers — when sessions expired (24h TTL) or were archived, Vitto had zero signal. A returning user got the same treatment as a first-time user. (c) Auto-extracted profile facts (from memory-persistence.service.ts) were stored as user_profile memories but NEVER synced to UserDossierService — the dossier was populated only from gograb-api hydration, missing all conversational learning. The identity synthesis service was NOT injected because the dossier brief (priority 9) now adequately covers this — adding identity synthesis would duplicate user knowledge at token cost.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation