Architecture: How to close the gap between Vitto and a Jarvis-level agent?
Documentation for Sessions
🏗️ Architecture: How to close the gap between Vitto and a Jarvis-level agent?
Date: 2026-03-19
Time: 00:44:33 UTC
Session: gspace1-237.4
Agent: backend
Confidence: 94%
Status: ✅ Documented
📋 Decision Context
Question:
How to close the gap between Vitto and a Jarvis-level agent?
Task: S234: Jarvis-level intelligence improvements
🎯 Decision Made
Chosen:
Three simultaneous improvements: (1) Context-aware tool filtering via TOOL_CATEGORIES + INTENT_TOOL_MAP in ToolRegistryService — reduces 20+ tools to 5-8 per request based on user intent classification. (2) Error recovery in AgentLoopService — isToolError() detection → per-tool recovery hints → tool blocking after 3 failures. (3) Multi-step planning in system prompt — complex tasks get 'outline steps then execute' instead of 'act immediately'.
Options Considered:
- Context-aware tool filtering (chosen)
- Error recovery with alternative tools (chosen)
- Multi-step planning (chosen)
- Preference learning service (deferred P1 — needs engagement tracking data)
- Adaptive proactive checks (deferred P1 — needs failure pattern detection)
- Online user correction replay (deferred P1 — needs frontend feedback UI)
💭 Reasoning
Gap analysis revealed 5 critical differences between Vitto and Jarvis-level agents. The top 3 were: (a) Tool selection noise — sending all 20+ tools wastes tokens and confuses the LLM's decision-making. A greeting needs recall_memory and task_complete, not browser_navigate and deploy_agents. (b) Error recovery — when tools fail, Vitto reports the raw error instead of trying alternatives. A Jarvis agent would say 'That approach didn't work, trying X instead.' (c) Planning — Vitto acts reactively (one tool at a time, no pre-planning). For complex tasks, showing a plan first gives the user confidence and lets the LLM track its own progress across steps. These three were chosen as P0 because they're the highest-impact changes with the lowest risk — all are additive (no existing behavior removed) and all degrade gracefully (fallback to full tool list, fallback to no hint, fallback to immediate action).
📁 Files Involved
APIs/backend-vitto-api/src/app/tools/tool-registry.service.tsAPIs/backend-vitto-api/src/app/engine/agent-loop.service.tsAPIs/backend-vitto-api/src/app/engine/context-assembly/web-prompt-builder.service.tsAPIs/backend-vitto-api/src/app/engine/vitto-engine.service.ts
🔗 Related
- Decision ID:
dev_1773881072848_n2dte0g - Session: 237
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation