VITTO
Documentation for Vitto
Vitto: The Intelligent Nervous System of GoGrab
One brain that serves developers, space builders, and their customers — all through the same learning mind.
Table of Contents
- What is Vitto?
- Before and After: The Transformation
- Who Does Vitto Serve?
- How Vitto Thinks: The 4-Phase Workflow
- Architecture Overview
- Module Breakdown
- Tools and Capabilities
- How Vitto Fits in the GoGrab Tech Stack
- Real Use Cases
- How to Use Vitto (Developers)
- How to Use Vitto (Space Builders)
- How End Users Experience Vitto
- The Self-Improving Brain
- Security and Safety
- Current Capabilities vs. Future Potential
- API Reference
- Deployment and Configuration
What is Vitto?
Vitto is the central intelligence of the GoGrab platform. Think of it as a brain that sits at the center of everything GoGrab does — every API, every module, every deployment, every user journey — and understands all of it.
In plain English: Vitto is an AI system that can actually do things, not just answer questions. It can read code, write code, run builds, deploy websites, coordinate teams of specialized AI agents, monitor system health, and learn from every interaction to get better over time.
What makes Vitto different from ChatGPT or other AI assistants?
| Regular AI Assistant | Vitto |
|---|---|
| Answers questions about code | Reads, writes, and fixes code directly |
| Suggests what to do | Actually does it (with configurable autonomy) |
| Forgets everything between sessions | Remembers every decision, learns what works |
| One-size-fits-all | Different capabilities for developers, builders, and end users |
| Works alone | Coordinates teams of 10+ specialized AI agents |
| Passive (waits for you to ask) | Proactive (detects problems before you notice them) |
| No concept of your platform | Deep knowledge of GoGrab's architecture, APIs, and patterns |
Before and After: The Transformation
Before (Session 98): A Basic Chat Agent
Vitto started as a simple chat-based AI assistant embedded inside backend-ai-api. It could:
- Answer developer questions
- Have basic conversations
- Use a shared LLM integration library
Limitations:
- Couldn't use tools (read files, run commands, make API calls)
- No memory between conversations
- No awareness of the GoGrab platform structure
- Shared module with the rest of
backend-ai-api(tight coupling) - No task management or workflow
- No way to delegate work to other agents
- No autonomy controls
After (Sessions 98-101): An Autonomous Nervous System
Vitto was extracted into its own standalone service (backend-vitto-api on port 3003) and transformed through 9 phases into a full operating intelligence:
| Phase | What Was Added | Impact |
|---|---|---|
| Phase 1 | Bug fixes, async execution, JWT auth, command allowlisting | Stable, secure foundation |
| Phase 2 | Platform integration (agent registry, Learning Pyramid, Command Center, task persistence) | Vitto became a first-class platform citizen |
| Phase 3 | Computer control (browser, desktop, visual verification) | Vitto can see and interact with actual UI |
| Phase 4 | GoGrab-native intelligence (codebase indexer, platform model, space context) | Vitto deeply understands GoGrab |
| Phase 5 | Proactive automation (health checks, alerting, auto-detection) | Vitto doesn't wait to be asked |
| Phase 6 | Space builder orchestration (universe lifecycle, NL-to-universe, 10-agent coordination) | Vitto builds entire websites |
| Phase 7 | Customer-facing intelligence (intent classification, session management) | Vitto powers end-user experiences |
| Phase 8 | Self-improving intelligence (strategy optimizer, model routing) | Vitto gets smarter over time |
| Phase 9 | Dynamic skills (runtime-learned procedures, trigger matching) | Vitto teaches itself new abilities |
By the numbers:
- 50+ files created or modified
- 9 modules (Engine, Mind, Connectivity, LLM, Tools, Strategy, Proactive, SpaceBuilder, Customer)
- 9 MongoDB schemas for persistent memory
- 16+ tools across 3 layers
- 4 LLM providers supported (Claude, OpenAI, Gemini, DeepSeek)
- 10 specialized agents Vitto can coordinate
Who Does Vitto Serve?
Vitto serves three distinct audiences through one unified intelligence, each with its own tools, permissions, and knowledge:
1. GoGrab Developers (Layer: developer)
What Vitto does: Acts as an autonomous coding partner that knows the entire NX monorepo (238+ libraries), understands Angular 20 and NestJS patterns, proactively detects issues, and fixes them.
Tools available: Read files, write files, run shell commands (NX, npm, git), search documentation, create handoffs to other agents, recall past decisions, query the codebase index.
Example: "The button library build is failing" — Vitto reads the error, finds the file, identifies the missing import, fixes it, runs the build to verify, and reports back.
2. Space Builders (Layer: platform_builder)
What Vitto does: Acts as an AI platform architect. Space builders describe what they want in plain English, and Vitto designs and builds it — coordinating up to 10 specialized AI agents to create pages, widgets, styles, content, and deployments.
Tools available: Everything developers get, plus universe creation, module management, deployment orchestration, space agent coordination, and visual verification.
Example: "Build me a restaurant ordering platform" — Vitto creates the universe structure, assigns agents to design pages and widgets, applies styles, generates content, deploys, and visually verifies the result.
3. End Users / Customers (Layer: end_user)
What Vitto does: Powers the invisible AI experience behind every deployed space. When a customer interacts with a GoGrab-built website and asks a question, Vitto understands which space they're in, what page they're viewing, and their journey history — then provides personalized help.
Tools available: Answer questions, guide navigation, search within the space, generate content. No file writing, no command execution, no deployments — strictly safe.
Example: "How do I place a bulk order?" — Vitto checks the space structure, finds the Bulk Order feature on the Cart page, and guides the user with a direct link and step-by-step instructions.
The 4-Phase Workflow
Every task Vitto processes follows the same disciplined workflow. This is the core of how Vitto thinks:
User Request
|
v
+-------------------+
| ANALYZE | "What is this? What do I know? What do I need?"
| - Classify task |
| - Load context |
| - Check memory |
| - Decide strategy |
+-------------------+
|
v
+-------------------+
| PLAN | "What steps will I take?"
| - Break down task |
| - Select tools |
| - Choose model |
| - Estimate cost |
+-------------------+
|
v
+-------------------+
| EXECUTE | "Do the work."
| - Agentic loop |
| - Call tools |
| - Track progress |
| - Cost guard |
+-------------------+
|
v
+-------------------+
| VERIFY | "Did it work? Is it good?"
| - Quality check |
| - Visual verify |
| - Extract lessons |
| - Record outcome |
+-------------------+
|
v
Result + Lessons
What Happens in Each Phase
ANALYZE — Vitto loads everything it knows: past decisions from its Mind database, platform architecture knowledge, codebase index, space context (if applicable), and similar decisions from the platform's Learning Pyramid. It classifies the task type, complexity, and which layer it belongs to. It decides whether to handle the task itself or delegate to another agent.
PLAN — Based on the analysis, Vitto creates a concrete execution plan. It selects which tools to use, which LLM model to use (can vary by phase — cheaper models for analysis, more capable ones for execution), and estimates the cost.
EXECUTE — This is the agentic loop. Vitto sends its plan to the LLM along with available tools. The LLM calls tools (read file, write file, run command, etc.), Vitto executes them, feeds results back, and the loop continues until the task is complete or cost limits are hit. A CostGuard circuit breaker prevents runaway execution (max 25 iterations, 100K tokens, 5 minutes).
VERIFY — Vitto checks the quality of its work. For code tasks, it can run builds and tests. For visual tasks, it can take screenshots via computer-use and verify the output looks correct. Lessons learned are extracted and stored for future reference.
Delegation
At any point during ANALYZE, Vitto may decide: "This task is better handled by a specialized agent." In that case, it creates a handoff — a structured task description sent to another agent (e.g., a browser agent for UI testing, a code agent for implementation). Vitto monitors the delegation, handles retries on failure, and resumes VERIFY when the delegated work completes.
Autonomy Levels
Vitto has four autonomy levels, configurable globally, per-session, or per-handoff:
| Level | Behavior |
|---|---|
| OBSERVE | Vitto watches and logs but takes no action |
| SUGGEST | Vitto proposes actions and waits for human approval (creates checkpoints) |
| DIRECT | Vitto acts and notifies the human |
| AUTONOMOUS | Vitto acts independently, notifies only on significant events |
Architecture Overview
GoGrab Platform Ecosystem
┌──────────────────────────────────────────────────┐
│ │
│ ┌─────────┐ ┌──────────┐ ┌──────────────┐ │
│ │ Frontend │ │ Chrome │ │ VSCode │ │
│ │ Apps │ │Extension │ │ Extension │ │
│ └────┬────┘ └────┬─────┘ └──────┬───────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────────────────────────────┐ │
│ │ backend-api (port 3000) │ │
│ │ Spaces, Universes, Modules, Users │ │
│ │ Auth, Billing, Marketplace, Deploy │ │
│ └────────────────┬─────────────────────┘ │
│ │ │
│ ┌──────────────────────────────────────┐ │
│ │ backend-ai-api (port 3001) │ │
│ │ Agent Registry, Learning Pyramid, │ │
│ │ Command Center, Space Agents (10), │ │
│ │ MCP Gateway, Computer Use │ │
│ └───────────┬──────────────────────────┘ │
│ │ │
│ │ WebSocket + HTTP │
│ │ │
│ ┌───────────▼──────────────────────────┐ │
│ │ │ │
│ │ VITTO (port 3003) │ │
│ │ The Intelligent Nervous System │ │
│ │ │ │
│ │ ┌────────┐ ┌──────┐ ┌───────────┐ │ │
│ │ │ Engine │ │ Mind │ │Connectivity│ │ │
│ │ └────────┘ └──────┘ └───────────┘ │ │
│ │ ┌────┐ ┌───────┐ ┌──────────┐ │ │
│ │ │LLM │ │ Tools │ │ Strategy │ │ │
│ │ └────┘ └───────┘ └──────────┘ │ │
│ │ ┌──────────┐ ┌─────────────────┐ │ │
│ │ │Proactive │ │ Space Builder │ │ │
│ │ └──────────┘ └─────────────────┘ │ │
│ │ ┌──────────────┐ │ │
│ │ │ Customer │ │ │
│ │ └──────────────┘ │ │
│ │ │ │
│ │ MongoDB: vitto-mind │ │
│ │ (9 collections — persistent │ │
│ │ memory, execution traces, │ │
│ │ strategies, skills, autonomy) │ │
│ └────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────┐ │
│ │ backend-docs-api (port 3002) │ │
│ │ Documentation search │ │
│ └──────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────┐ │
│ │ MCP Server (claude-agent-mcp) │ │
│ │ Claude Desktop / Cursor bridge │ │
│ └──────────────────────────────────────┘ │
└──────────────────────────────────────────────────┘
Key: Vitto connects to all three backends via HTTP and WebSocket. It does not duplicate their functionality — it orchestrates it.
Module Breakdown
Engine (The Brain)
The core module that processes tasks. Contains:
| Service | Purpose |
|---|---|
| VittoEngineService | Task queue, priority processing, SSE event stream, task lifecycle management |
| PhaseExecutorService | Runs the 4-phase workflow (ANALYZE/PLAN/EXECUTE/VERIFY), integrates with Learning Pyramid |
| AgentLoopService | The agentic tool-use loop — sends tools to LLM, executes calls, feeds results back |
| AutonomyService | 4-tier autonomy state machine with human-approval checkpoints |
| DelegationManagerService | Creates handoffs, monitors completion, retries failures, escalates to humans |
| SessionTrackerService | Reads current development session context |
| SkillManagerService | Dynamic runtime-learned skills stored in MongoDB |
| VittoController | 17+ HTTP/SSE endpoints for task management, autonomy, checkpoints, delegations, proactive alerts |
Mind (The Memory)
Persistent intelligence stored in MongoDB (vitto-mind database):
| Schema | What It Stores | TTL |
|---|---|---|
| ExecutionTrace | Every task processed: phases, tool calls, tokens, outcome, lessons | 90 days |
| StrategyMemory | Best-performing provider+model combo per task type | Permanent |
| AgentPerformance | Reliability scores per agent type and per task type | Permanent |
| UserPattern | Developer preferences (verbosity, model, workflow style) | Permanent |
| AutonomyConfig | Current autonomy levels (global, per-session, per-handoff) | Permanent |
| AutonomyCheckpoint | Pending human-approval decisions | 30 days |
| ActiveTask | In-flight tasks (survives restarts) | 24 hours |
| CodebaseEntry | Indexed NX projects (apps, libs, exports, dependencies) | Refreshed every 6h |
| VittoSkill | Runtime-learned procedures with trigger patterns | Permanent |
Additional Mind services:
| Service | Purpose |
|---|---|
| MindService | Core memory interface (traces, strategies, agent performance, patterns) |
| CodebaseIndexerService | Scans the entire NX monorepo every 6 hours, indexes every project |
| PlatformModelService | Hardcoded GoGrab architecture knowledge (cosmic hierarchy, module types, API map, tech stack) |
| SpaceContextService | Loads live space data (universes, modules, themes) with 5-minute cache |
Connectivity (The Nervous System)
How Vitto communicates with the rest of GoGrab:
| Client | Connects To | Purpose |
|---|---|---|
| BackendAiClientService | backend-ai-api (3001) | Handoffs, learning pyramid, decision logging, orchestration events |
| BackendApiClientService | backend-api (3000) | Spaces, universes, modules, deployments |
| BackendDocsClientService | backend-docs-api (3002) | Documentation search |
| HandoffWsClientService | backend-ai-api WebSocket | Real-time handoff events, agent registration, heartbeat |
| InfrastructureClientService | backend-ai-api infrastructure | Browser automation, desktop control, computer-use sessions |
| NotificationService | Various channels | Human notifications when checkpoints need approval |
LLM (The Voice)
Provider-agnostic LLM integration with tool-use support:
| Provider | Models | Tool-Use Support |
|---|---|---|
| Claude (default) | claude-sonnet-4-5, claude-haiku | Full tool-use |
| OpenAI | gpt-4o, gpt-4o-mini | Full tool-use |
| Gemini | gemini-2.0-flash | Full tool-use |
| DeepSeek | deepseek-chat | Basic tool-use |
Why Vitto has its own LLM module: The shared @libs-api/llm-integration library does NOT support tool-use (function calling). Tool-use is Vitto's core capability — every EXECUTE phase is an agentic tool-use loop. Vitto needs direct Anthropic/OpenAI API access with full tool definitions.
Tools (The Hands)
16+ tools organized by layer permission:
| Tool | Developer | Builder | Customer | Description |
|---|---|---|---|---|
read_file |
Yes | Yes | - | Read files from the workspace |
write_file |
Yes | Yes | - | Write/create files |
run_command |
Yes | Yes | - | Execute shell commands (allowlist only) |
http_request |
Yes | Yes | - | Make HTTP requests to APIs |
query_docs |
Yes | Yes | Yes | Search documentation |
recall_memory |
Yes | Yes | - | Recall past execution history |
search_decisions |
Yes | Yes | - | Search past decisions from Learning Pyramid |
create_handoff |
Yes | Yes | - | Delegate work to another agent |
check_handoff_status |
Yes | Yes | - | Monitor delegated work |
task_complete |
Yes | Yes | Yes | Signal task completion |
browser_navigate |
Yes | Yes | - | Open a URL in browser |
browser_interact |
Yes | Yes | - | Click, fill, extract from pages |
browser_screenshot |
Yes | Yes | Yes | Capture page screenshot |
desktop_execute |
Yes | - | - | Run desktop commands |
computer_use |
Yes | Yes | - | Goal-oriented computer control session |
query_platform |
Yes | Yes | - | Query codebase index and platform model |
Strategy (The Judgment)
| Service | Purpose |
|---|---|
| RequestClassifierService | Classifies task type and complexity |
| CostGuardService | Circuit breaker — prevents runaway execution (25 iterations, 100K tokens, 5 min) |
| QualityGateService | LLM-based verification of execution results + visual verification |
| StrategyOptimizerService | Self-improves model routing every 4 hours based on execution history |
Proactive (The Guardian)
Always-on health monitoring that detects problems before humans notice:
| Check | Interval | Layer | What It Does |
|---|---|---|---|
| API Health | Every 5 min | Developer | Pings all backend services (3000, 3001, 3002) |
| Build Health | Every 30 min | Developer | Checks NX affected builds |
| Dependency Audit | Daily | Developer | Runs npm security audit |
| LLM Provider Health | Every 15 min | Developer | Verifies LLM API availability |
| Deployment Health | Every 10 min | Builder | Detects failed universe deployments |
| Space Agents Health | Every 15 min | Builder | Verifies all 10 space agents are online |
| Module Integrity | Every hour | Builder | Checks for broken module references |
When a check detects an issue, it creates a ProactiveAlert with severity level, stores it in memory, and optionally emits to the Command Center for real-time visibility.
Space Builder (The Architect)
| Service | Purpose |
|---|---|
| UniverseLifecycleService | Create universes from blueprints, deploy, rollback, monitor status |
| SpaceAgentCoordinatorService | Coordinate 10 specialized agents in pre-defined chains |
| NlToUniverseService | Convert natural language descriptions into universe blueprints via LLM |
The 10 Space Agents (hosted in backend-ai-api, orchestrated by Vitto):
| Agent | Specialty |
|---|---|
| Page Designer | Page layouts and structure |
| Widget Creator | Widget placement and configuration |
| Style Expert | Themes, colors, typography |
| Content Writer | Text content and copywriting |
| UX Optimizer | Navigation flow and user experience |
| Accessibility Expert | WCAG compliance and accessibility |
| Animation Specialist | Motion and transitions |
| Responsive Expert | Mobile/tablet breakpoints |
| SEO Advisor | Search engine optimization |
| Performance Guru | Loading speed and optimization |
Pre-defined Agent Chains:
| Chain | Agents (in order) | Use Case |
|---|---|---|
| Full Page Build | Page Designer → Widget Creator → Style Expert → Content Writer → UX Optimizer → Accessibility Expert | Building a complete page from scratch |
| Style Overhaul | Style Expert → Responsive Expert → Accessibility Expert | Redesigning an existing space's look |
| Content Refresh | Content Writer → SEO Advisor | Updating content for freshness and SEO |
| Performance Audit | Performance Guru → Responsive Expert → UX Optimizer | Speed and performance optimization |
Customer Intelligence (The Concierge)
| Service | Purpose |
|---|---|
| CustomerIntelligenceService | Intent classification, session management, query routing, personalized responses |
Intent types: navigation, content, action, feedback, general — each routed to different handling logic.
How Vitto Fits in the GoGrab Tech Stack
The GoGrab Ecosystem
GoGrab is a large-scale platform built as an NX monorepo with:
- 6 frontend apps (Angular 20): gograb-space (main UI), gograb-admin, gograb-ai, gograb-dev, docs-angular, space-admin
- 4 backend services (NestJS): backend-api (CRUD), backend-ai-api (AI orchestration), backend-docs-api (docs), backend-vitto-api (Vitto)
- 238+ shared libraries organized by domain (core, UI, foundational, AI, etc.)
- 2 browser extensions: Chrome extension + VSCode extension
- 1 MCP server: Bridge for Claude Desktop / Cursor IDE
Where Vitto Sits
Frontend Apps (Angular 20)
│
▼
backend-api (3000) ◄── CRUD, Auth, Spaces, Universes
│
▼
backend-ai-api (3001) ◄── AI Orchestration, Agents, Learning
│
┌────┴────┐
│ │
▼ ▼
VITTO (3003) MCP Server
Nervous Claude/Cursor
System Bridge
Vitto does NOT replace any existing service. It integrates with all of them:
| Integration | Direction | What Flows |
|---|---|---|
| Vitto → backend-api | HTTP calls | Space CRUD, universe lifecycle, module management, deployment triggers |
| Vitto → backend-ai-api | HTTP + WebSocket | Handoff creation/monitoring, decision logging, learning context, orchestration events, space agent execution |
| Vitto → backend-docs-api | HTTP calls | Documentation search for contextual answers |
| backend-ai-api → Vitto | WebSocket events | Handoff assignments, completion notifications, expiration alerts |
| Vitto → LLM Providers | Direct API | Claude, OpenAI, Gemini, DeepSeek (with tool-use) |
| Vitto → MongoDB | Mongoose | 9 collections in vitto-mind database |
What Vitto Leverages (Does NOT Rebuild)
| Capability | Where It Already Exists | How Vitto Uses It |
|---|---|---|
| Browser automation | backend-ai-api /infrastructure/browser/* |
HTTP via InfrastructureClient |
| Desktop control | backend-ai-api /infrastructure/desktop/* |
HTTP via InfrastructureClient |
| Computer-use loop | backend-ai-api /infrastructure/computer-use/* |
HTTP via InfrastructureClient |
| 10 Space agents | backend-ai-api /space-agents/* |
Orchestrate via HTTP |
| Agent registry | backend-ai-api WebSocket gateway | Register + heartbeat |
| Decision logging | backend-ai-api /mcp-internal/* |
POST after each phase |
| Learning Pyramid | backend-ai-api /learning/* |
Enrich ANALYZE context |
| Command Center | backend-ai-api /command-center/* |
Emit real-time events |
| Space/Universe CRUD | backend-api /spaces/*, /universes/* |
Call for builder tasks |
| Module management | backend-api /space-modules/* |
Call for module operations |
| Deployment pipeline | backend-api /universe-deployment/* |
Trigger + monitor deploys |
| JWT authentication | @libs-api/auth-core |
Guard all endpoints |
Real Use Cases
Use Case 1: Developer — Proactive Build Fix
1. [PROACTIVE CHECK] Every 30 minutes, Vitto runs "nx affected:build"
2. [ALERT] Build fails on libs-ui/button — missing import after recent merge
3. [AUTO-TASK] Vitto creates a task: { type: 'bugfix', layer: 'developer', priority: 'high' }
4. [ANALYZE]
- Loads codebase index → finds libs-ui/button at libs/libs-ui/button
- Queries Mind: "Have I seen this type of build failure before?"
- Finds 3 similar past fixes → all were missing imports
- Strategy: read the error, find the file, add the import
5. [PLAN]
- Step 1: Run "nx build libs-ui-button" to get exact error
- Step 2: Read the failing file
- Step 3: Identify and add missing import
- Step 4: Re-run build to verify
6. [EXECUTE]
- Tool call: run_command("nx build libs-ui-button 2>&1") → gets error output
- Tool call: read_file("libs/libs-ui/button/src/lib/button.component.ts")
- Identifies: missing import of `CommonModule`
- Tool call: write_file(...) → adds the import
- Tool call: run_command("nx build libs-ui-button") → passes!
7. [VERIFY]
- Quality gate: build passes ✓
- Lesson learned: "button component needed CommonModule for *ngIf"
- Stored in execution_traces for future reference
8. [RESULT]
Developer sees in Command Center: "Fixed broken import in @libs-ui/button. Build passes."
Use Case 2: Space Builder — Build a Restaurant Platform
1. [REQUEST] Space builder says: "Build me a restaurant ordering platform"
2. [NL-TO-UNIVERSE]
- NlToUniverseService sends the description to LLM with GoGrab platform model
- LLM generates a UniverseBlueprint:
- Universe: "Restaurant Platform"
- Galaxy 1 (Public): Menu, Cart, Checkout, About
- Galaxy 2 (Admin): Orders, Inventory, Analytics, Settings
- 12 page-modules, 40+ widgets
3. [BUILD PLAN]
- UniverseLifecycleService creates ordered build steps
- API calls to create the universe structure (backend-api)
- Agent chain: "full-page-build" for each page
4. [EXECUTION]
- Step 1: POST /api/spaces/:id/universes → creates universe
- Step 2: POST /api/spaces/:id/modules → creates all modules
- Step 3: SpaceAgentCoordinator triggers agent chain:
a. Page Designer → designs all 12 page layouts
b. Widget Creator → places 40+ widgets on pages
c. Style Expert → applies restaurant theme (warm colors, food imagery)
d. Content Writer → generates placeholder menu items, descriptions
e. UX Optimizer → reviews navigation between pages
f. Accessibility Expert → ensures screen reader compatibility
5. [DEPLOY]
- POST /api/universes/:id/publish → triggers deployment pipeline
- Vitto monitors status every 10 seconds
- On success: computer_use verifies deployed URL visually
6. [RESULT]
Space builder sees: "Your restaurant platform is live with 12 pages across 2 galaxies.
Menu page has 3 categories, Cart supports bulk ordering, Admin has real-time order tracking."
Use Case 3: End User — Navigating a Deployed Space
1. [QUERY] User on the restaurant platform asks:
"How do I place a bulk order for my office?"
2. [INTENT CLASSIFICATION]
- Keywords: "how do I", "place", "order" → intent: 'action'
3. [CONTEXT LOADING]
- SpaceContextService loads the restaurant space:
- 12 pages, Cart page has "Bulk Order" widget
- User's session history: viewed Menu page, viewed 3 items
4. [RESPONSE]
{
message: "To place a bulk order, go to your Cart and click 'Bulk Order'
in the top right. You can specify quantities for each item and
set a delivery date for your office.",
actions: [
{ type: 'navigate', target: '/cart?feature=bulk-order', label: 'Go to Bulk Order' },
{ type: 'highlight', target: 'bulk-order-widget', label: 'Bulk Order button' }
],
confidence: 0.85
}
Use Case 4: Developer — Complex Multi-Agent Task
1. [REQUEST] "Add dark mode support to the dashboard page"
2. [ANALYZE]
- Classifies as: type='implementation', complexity='high', layer='developer'
- Loads codebase index: finds dashboard at apps/gograb-space/src/app/dashboard
- Checks theme system: finds @theme-system/design-tokens already supports dark mode tokens
- Decision: "This requires both code changes and visual verification — I'll handle code,
then delegate visual verification to a browser agent."
3. [PLAN]
- Step 1: Read existing dashboard styles
- Step 2: Add CSS custom properties for dark mode
- Step 3: Create a theme toggle signal
- Step 4: Update component to use theme signal
- Step 5: Delegate visual verification to browser agent
4. [EXECUTE]
- Reads files, understands pattern (Angular 20 signals, standalone components)
- Writes theme toggle using inject() + signal() (following CLAUDE.md conventions)
- Updates SCSS to use CSS custom properties from design tokens
- Creates handoff to browser agent: "Navigate to dashboard, toggle dark mode, screenshot both states"
5. [DELEGATION]
- Browser agent navigates to localhost:5200/dashboard
- Screenshots light mode
- Triggers dark mode toggle
- Screenshots dark mode
- Returns visual evidence
6. [VERIFY]
- Both screenshots show correct theming
- Runs "nx build gograb-space" → passes
- Lesson: "Used @theme-system/design-tokens CSS vars for dark mode — works with existing token system"
Use Case 5: Proactive — Deployment Failure Detection
1. [PROACTIVE CHECK] Every 10 minutes, space-checks.service checks all deployments
2. [DETECTION] Universe "Corporate Website" deployment status: 'failed'
3. [ALERT] Creates alert: { severity: 'critical', layer: 'platform_builder' }
4. [COMMAND CENTER] Real-time event emitted — visible in monitoring dashboard
5. [OPTIONAL AUTO-ACT] If autoAct is enabled, Vitto:
- Reads deployment logs
- Identifies: missing environment variable in build
- Notifies space builder: "Your Corporate Website deployment failed —
missing STRIPE_KEY environment variable. Would you like me to check the configuration?"
How to Use Vitto (Developers)
Submitting Tasks via API
# Submit a task
curl -X POST http://localhost:3003/engine/tasks \
-H "Authorization: Bearer <JWT_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"summary": "Fix the failing test in libs-ui-button",
"type": "bugfix",
"layer": "developer",
"priority": "high",
"context": {
"errorMessage": "Cannot find module CommonModule",
"affectedProject": "libs-ui-button"
}
}'
# Response: { "taskId": "task_abc123", "status": "queued" }
Monitoring Progress
# Get task status
curl http://localhost:3003/engine/tasks/task_abc123
# Get all active tasks
curl http://localhost:3003/engine/tasks
# Stream real-time events (SSE)
curl http://localhost:3003/engine/events
# Streams: task.started, phase.started, tool_call, phase.completed, task.completed
Configuring Autonomy
# Set global autonomy level
curl -X PUT http://localhost:3003/engine/autonomy/global \
-d '{ "level": "SUGGEST" }'
# Set session-specific level
curl -X PUT http://localhost:3003/engine/autonomy/session \
-d '{ "sessionKey": "session-101", "level": "AUTONOMOUS" }'
# Check pending checkpoints (when level = SUGGEST)
curl http://localhost:3003/engine/checkpoints
# Approve a checkpoint
curl -X POST http://localhost:3003/engine/checkpoints/chk_xyz \
-d '{ "decision": "approved", "resolvedBy": "frank" }'
Monitoring Proactive Alerts
# Get all proactive check statuses
curl http://localhost:3003/engine/proactive/status
# Get alerts (filterable)
curl "http://localhost:3003/engine/proactive/alerts?severity=critical&resolved=false"
# Manually trigger a check
curl -X POST http://localhost:3003/engine/proactive/checks/api-health/trigger
# Resolve an alert
curl -X POST http://localhost:3003/engine/proactive/alerts/alert_123/resolve
How to Use Vitto (Space Builders)
Creating a Universe from Natural Language
# Generate a blueprint from a description
curl -X POST http://localhost:3003/space-builder/blueprint \
-d '{
"spaceId": "space_123",
"description": "Create an e-commerce store with product catalog, shopping cart,
checkout, and admin dashboard for inventory management",
"preferences": {
"style": "modern and clean",
"colorScheme": "blue and white"
}
}'
# Response: Full UniverseBlueprint with galaxies, worlds, modules, widgets
Building and Deploying
# Build from a blueprint
curl -X POST http://localhost:3003/space-builder/build \
-d '{
"spaceId": "space_123",
"blueprint": { ... } // the blueprint from above
}'
# Deploy a universe
curl -X POST http://localhost:3003/space-builder/deploy/universe_456
# Check deployment status
curl http://localhost:3003/space-builder/deploy/universe_456/status
# Rollback if something went wrong
curl -X POST http://localhost:3003/space-builder/rollback/universe_456
Running Agent Chains
# Execute a pre-defined agent chain on a page
curl -X POST http://localhost:3003/space-builder/chain \
-d '{
"spaceId": "space_123",
"chainName": "full-page-build",
"context": {
"pageId": "page_789",
"description": "Product detail page with image gallery, reviews, and add-to-cart"
}
}'
# List available chains
curl http://localhost:3003/space-builder/chains
How End Users Experience Vitto
End users never interact with Vitto directly — they interact with the AI within a deployed space, and Vitto powers that experience invisibly.
# Customer query (public endpoint — no JWT needed)
curl -X POST http://localhost:3003/customer/query \
-d '{
"spaceId": "space_123",
"universeId": "universe_456",
"userId": "user_789",
"message": "Where can I find the pricing page?",
"sessionId": "session_abc",
"pageContext": {
"currentUrl": "/products",
"pageId": "page_products"
}
}'
# Response:
# {
# "success": true,
# "message": "You can find pricing information on our Pricing page.",
# "actions": [
# { "type": "navigate", "target": "/pricing", "label": "Go to Pricing" }
# ],
# "confidence": 0.85,
# "agentUsed": "navigation-router"
# }
The Self-Improving Brain
Vitto gets smarter with every interaction through multiple feedback loops:
1. Execution Traces (Short-term Memory)
Every task creates an ExecutionTrace recording: what was done, which tools were called, how many tokens were used, whether it succeeded, and what lessons were learned. TTL: 90 days.
2. Strategy Memories (Long-term Optimization)
The StrategyOptimizerService runs every 4 hours, analyzing execution traces to find:
- Which LLM provider + model works best for each task type
- Average duration and token cost per approach
- Repeated failures and their causes
Results are stored as StrategyMemory records, which the ANALYZE phase reads to make better decisions.
3. Agent Performance (Delegation Intelligence)
Every time Vitto delegates to another agent, it records the outcome in AgentPerformance:
- Completion rate per agent type
- Average time to completion
- Quality scores
- Per-task-type breakdown
Next time Vitto needs to delegate, it checks these scores to pick the most reliable agent.
4. Cross-Platform Learning (via Learning Pyramid)
Vitto doesn't learn in isolation. After each phase, it logs decisions to the platform's Learning Pyramid (via backend-ai-api). This means:
- Other agents (MCP agents in Cursor, Chrome extension agents) can learn from Vitto's decisions
- Vitto can learn from decisions made by other agents
- The entire GoGrab AI ecosystem gets smarter together
5. Dynamic Skills (Teaching Itself)
When Vitto encounters a recurring pattern, it can register a VittoSkill — a named procedure with trigger patterns and execution steps. Next time a similar request comes in, Vitto matches the skill and can execute it faster, without going through the full LLM reasoning cycle.
Security and Safety
Authentication
All endpoints (except health and customer) require JWT authentication via @libs-api/auth-core. The same JWT tokens used across the GoGrab platform work with Vitto.
Command Allowlisting
Shell commands are restricted to an explicit allowlist (not a blocklist):
- Allowed:
nx,npm,yarn,git,node,ls,cat,grep,find,echo,tsc,eslint - Everything else is rejected
- Working directory must be within the workspace root (no escaping to system directories)
File Safety
- Read files: 500KB max, utf-8/ascii/latin1 only
- Write files: path traversal blocked (
..not allowed),node_modulesprotected - No execution of arbitrary downloaded scripts
Cost Guard (Circuit Breaker)
Every task has hard limits:
- 25 iterations max in the agentic loop
- 100,000 tokens max per task
- 5 minutes max execution time
- Adjusted by complexity (simple tasks get smaller limits)
Autonomy Controls
Human-in-the-loop is the default:
- Default level:
SUGGEST— Vitto proposes, human approves - Checkpoints are stored in MongoDB and accessible via API
- Can be configured per-session or per-handoff for fine-grained control
Layer Isolation
End users cannot access developer tools. Each layer has a strict allowlist of available tools:
end_user: query docs, search space, navigate, generate contentplatform_builder: above + file I/O, universe management, agent coordinationdeveloper: all tools including shell commands and desktop control
Current Capabilities vs. Future Potential
What Vitto Can Do Today
- Process tasks through 4-phase workflow with full tool-use
- Read, write files and run commands in the NX monorepo
- Delegate work to other AI agents via handoffs
- Coordinate 10 specialized space agents in pre-defined chains
- Convert natural language to universe blueprints
- Create, deploy, and rollback universes
- Proactively monitor API health, build health, and deployment health
- Control browsers and desktops via backend-ai-api infrastructure
- Learn from execution history and optimize strategies
- Register and match dynamic skills at runtime
- Serve three distinct audiences (devs, builders, customers) with layer-appropriate tools
- Stream real-time progress via SSE
- Persist tasks across restarts
- Support 4 LLM providers (Claude, OpenAI, Gemini, DeepSeek)
What Could Be Built Next (Future Potential)
| Feature | Description | Impact |
|---|---|---|
| LLM-Powered Skill Generation | Vitto describes a needed capability → LLM writes sandboxed code → new skill auto-registered | Vitto creates tools it doesn't have yet |
| Skill Evolution | Daily cron reviews low-performing skills → LLM improves their code → registers improved versions | Skills get better without human intervention |
| Multi-Model Phase Routing | ANALYZE uses Haiku (fast/cheap), PLAN uses Sonnet (good reasoning), EXECUTE uses strategy-optimized model | 3-5x cost reduction per task |
| Parallel Subtask Decomposition | PLAN identifies independent subtasks → creates parallel handoffs → synthesizes results | Complex tasks finish faster |
| Active Delegation Monitoring | Poll delegated tasks every 15 seconds, detect stalls, auto-intervene | No more stuck handoffs |
| Customer Journey Analytics | Detect user confusion patterns (rapid navigation, revisiting pages) → trigger proactive suggestions | Better end-user experience |
| Space Health Scoring | Compute per-space health score from deployment status, module integrity, performance, accessibility | Space builders see a health dashboard |
| Accessibility Auditing | Use computer-use to navigate deployed pages, run WCAG checks automatically | Proactive accessibility compliance |
| Performance Profiling | Use computer-use to measure page load times of deployed universes | Automatic performance optimization |
| Content Freshness Detection | Flag content unchanged for 30+ days, suggest updates | Spaces stay current |
| Template Library | Pre-built universe templates (Admin Dashboard, E-Commerce, Blog, Portfolio, SaaS) stored in Mind | Faster space creation |
| Complexity Routing from Chat | backend-ai-api ChatService routes complex queries to Vitto automatically | Seamless end-user experience upgrade |
| Space Personality per Builder | Each space's AI uses the builder's preferred tone (casual, professional, playful) | Brand-consistent AI interactions |
API Reference
Root Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /health |
Public | Root health check |
Engine Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /engine/health |
Public | Engine health check |
| GET | /engine/status |
JWT | Full engine status |
| POST | /engine/tasks |
JWT | Submit a new task |
| GET | /engine/tasks |
JWT | List active tasks |
| GET | /engine/tasks/:id |
JWT | Get task by ID |
| SSE | /engine/events |
JWT | Real-time event stream |
| GET | /engine/autonomy |
JWT | Get autonomy config |
| PUT | /engine/autonomy/global |
JWT | Set global autonomy level |
| PUT | /engine/autonomy/session |
JWT | Set session-level autonomy |
| PUT | /engine/autonomy/handoff |
JWT | Set handoff-level autonomy |
| GET | /engine/checkpoints |
JWT | List pending checkpoints |
| POST | /engine/checkpoints/:id |
JWT | Resolve checkpoint (approve/reject) |
| GET | /engine/delegations |
JWT | List active delegations |
| GET | /engine/delegations/:taskId |
JWT | Get delegation tree |
| GET | /engine/proactive/status |
JWT | Proactive monitor status |
| GET | /engine/proactive/alerts |
JWT | List alerts (filterable by layer, severity, resolved) |
| POST | /engine/proactive/alerts/:id/resolve |
JWT | Resolve an alert |
| POST | /engine/proactive/checks/:name/trigger |
JWT | Manually trigger a check |
Space Builder Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /space-builder/blueprint |
JWT | Generate universe blueprint from natural language |
| POST | /space-builder/build |
JWT | Build universe from blueprint |
| POST | /space-builder/deploy/:universeId |
JWT | Deploy a universe |
| GET | /space-builder/deploy/:universeId/status |
JWT | Get deployment status |
| POST | /space-builder/rollback/:universeId |
JWT | Rollback universe deployment |
| POST | /space-builder/chain |
JWT | Execute an agent chain |
| GET | /space-builder/chains |
JWT | List available agent chains |
| GET | /space-builder/plans |
JWT | List active build plans |
Customer Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /customer/query |
Public | Handle end-user query |
| GET | /customer/session/:sessionId |
Public | Get session history |
Deployment and Configuration
Environment Variables
| Variable | Default | Description |
|---|---|---|
VITTO_API_PORT |
3003 |
Port for Vitto API |
VITTO_MONGODB_URI |
mongodb://localhost:27017/vitto-mind |
Vitto's own MongoDB database |
JWT_SECRET |
Required | JWT signing secret (shared with other backends) |
SYSTEM_TOKEN |
Required | Internal service-to-service auth token |
BACKEND_API_URL |
http://localhost:3000 |
backend-api URL |
BACKEND_AI_API_URL |
http://localhost:3001 |
backend-ai-api URL |
BACKEND_DOCS_API_URL |
http://localhost:3002 |
backend-docs-api URL |
VITTO_LLM_PROVIDER |
claude |
Default LLM provider |
ANTHROPIC_API_KEY |
Required | Anthropic API key for Claude |
OPENAI_API_KEY |
Optional | OpenAI API key |
GOOGLE_AI_API_KEY |
Optional | Google AI API key for Gemini |
Running Locally
# Build
npx nx build backend-vitto-api
# Serve (development)
npx nx serve backend-vitto-api
# Or via the project's dev-serve script
yarn serve:backend-vitto
MongoDB Collections (vitto-mind database)
| Collection | Purpose | Size Estimate |
|---|---|---|
execution_traces |
Task execution logs | Grows with usage, 90-day auto-cleanup |
strategy_memories |
Optimal model+provider combos | Small (dozens of records) |
agent_performances |
Agent reliability scores | Small (one per agent type) |
user_patterns |
Developer preferences | Small (one per developer) |
autonomy_configs |
Autonomy levels | 1 record (singleton) |
autonomy_checkpoints |
Pending human decisions | Small, 30-day auto-cleanup |
active_tasks |
In-flight tasks for recovery | Transient, 24-hour auto-cleanup |
codebase_index |
NX project index | Medium (one per project, ~250 records) |
vitto-skills |
Dynamic learned skills | Grows slowly over time |
Summary
Vitto is not a chatbot. It's the nervous system of GoGrab — a single intelligence that:
- Understands the entire platform (238+ libraries, 4 backends, cosmic hierarchy)
- Acts on that understanding (reads code, writes code, runs builds, deploys sites)
- Delegates to specialized agents when needed (10 space agents, browser agents, code agents)
- Monitors everything proactively (health checks, deployment status, build integrity)
- Learns from every interaction (execution traces, strategy optimization, dynamic skills)
- Serves three audiences through one brain (developers, space builders, end users)
- Respects human control (4-tier autonomy, checkpoints, cost guards)
The more anyone uses GoGrab, the smarter Vitto gets for everyone.
Document generated: Session 101 — February 2026 Covers: Phases 1-9 of the Vitto Nervous System Transformation