Vitto Analysis Summary - Up to Session 116
Comprehensive summary of Vitto's current state, features, architecture, usage guide, and roadmap
Vitto Analysis Summary — Up to Session 116
Purpose: This document describes what Vitto is today, what changed since Session 101, what works, what still needs testing, and what remains on the roadmap. It is the single reference for the team to understand, test, and extend Vitto.
Table of Contents
- What Is Vitto
- Evolution Timeline
- Architecture Overview
- Module Inventory
- What Changed: Sessions 101 → 116
- Current Feature Matrix
- Security Deep-Dive
- API Reference (117 Endpoints)
- How to Use Vitto — Developer Guide
- How to Use Vitto — Space Builders
- How to Use Vitto — End Users
- Use Cases
- Testing Checklist
- Known Gaps & Roadmap
- Deployment & Configuration
- Competitive Positioning vs OpenClaw
- Vitto Frontend Ecosystem (Session 117)
1. What Is Vitto
Vitto is the central intelligence layer of the GoGrab platform — an autonomous AI agent system that can read code, write code, run builds, deploy websites, coordinate teams of specialized AI agents, manage messaging channels, and learn from every interaction.
What makes Vitto different from a chatbot:
| Regular AI Assistant |
Vitto |
| Answers questions |
Reads, writes, and fixes code directly |
| Suggests what to do |
Actually does it (with configurable autonomy) |
| Forgets between sessions |
Remembers every decision via vector-embedded memory |
| One-size-fits-all |
3 audience layers: developers, builders, end users |
| Works alone |
Coordinates 10+ specialized AI agents via handoffs |
| Passive |
Proactive health monitoring and alerting |
| No cost awareness |
Per-task budgeting, per-user spending limits, real-time cost tracking |
| No security model |
12-service security layer with encryption, audit, sandboxing, and compliance |
By the numbers (Session 116):
| Metric |
Value |
| TypeScript files |
147 |
| Lines of code |
28,481 |
| NestJS modules |
16 |
| HTTP/SSE endpoints |
117 |
| MongoDB schemas |
23 (9 Mind + 8 Security + 6 other) |
| Security services |
12 |
| LLM providers |
5 (Claude, OpenAI, Gemini, DeepSeek, Ollama) |
| Messaging channels |
5 (Slack, WhatsApp, Discord, Telegram, Email) |
| Agentic tools |
24+ |
| Agent chain types |
4 pre-defined |
2. Evolution Timeline
Phase 0 — Before Session 98: Basic Chat Agent
Vitto was a simple chat module inside backend-ai-api. No tools, no memory, no autonomy.
Sessions 98-101: The Nervous System Transformation (Phases 1-9)
Extracted into standalone backend-vitto-api on port 3003 with own MongoDB (vitto-mind). Added:
- 4-phase workflow (ANALYZE → PLAN → EXECUTE → VERIFY)
- 10 agentic tools (file I/O, shell, HTTP, handoffs, memory, docs)
- Provider-agnostic LLM layer (Claude, OpenAI, Gemini, DeepSeek)
- Persistent memory (9 MongoDB schemas)
- Proactive monitoring (API health, build health, deployment health)
- Space builder orchestration (10 specialized agents)
- Customer intelligence (intent classification, session management)
- Dynamic skills (runtime-learned procedures)
- 4-tier autonomy (OBSERVE → SUGGEST → DIRECT → AUTONOMOUS)
Sessions 108-113: Library Restructuring & UX Standardization
- 238+ NX libraries reorganized
- 60+ API endpoints added for monitoring, mind explorer, cost tracking
- Channel manager UI + webhook builder in Vitto Command Hub
- 314 passing tests across the platform
- Developer routes moved from gograb-admin to gograb-dev
Sessions 114-115: Vitto Superpower Plan (Phases 1-5)
The "Superpower Plan" was designed to close the gap with OpenClaw while exceeding it on security and UX. 22 new files created in the security module alone:
| Plan Phase |
What Was Built |
Files Created |
| Phase 1: Foundation |
Persistent audit logging, cost/budget persistence, routing decision persistence, approval notifications, secret vault (AES-256-GCM), prompt injection defense (50+ patterns), persistent task queue |
12 |
| Phase 2: Messaging |
Channel rate limiter with loop detection |
1 |
| Phase 3: Resilience |
Circuit breaker (CLOSED→OPEN→HALF_OPEN), dead letter queue with exponential backoff, process sandbox, container sandbox |
4 |
| Phase 4: Skills |
Skill versioning with rollback, network policy for skill access control |
2 |
| Phase 5: Compliance |
Hash chain verifier (SHA-256 tamper-evident audit), retention policy (365d audit/90d traces/180d approvals), GDPR memory export |
3 |
Session 116: The Wiring Sprint
Critical finding: ~40% of Phase 1-5 security code was "dead" — built, registered in SecurityModule, but never called from any execution path. A 10-item wiring sprint connected all services:
| Service |
Wired Into |
How |
PromptInjectionGuardService |
ToolRegistryService.executeTool() |
Scans tool input before execution; blocks if injection detected |
CredentialRedactorService |
ToolRegistryService.executeTool() |
Sanitizes tool output before audit logging |
ChannelRateLimiterService |
ChannelGatewayService (4 handlers) |
Rate-limits Slack, WhatsApp, Discord, Telegram inbound |
CircuitBreakerService |
SmartRouterService.sendWithFailover() |
Wraps every LLM provider call (primary + fallbacks) |
DeadLetterQueueService |
VittoEngineService.processNextTask() |
Enqueues failed tasks for retry with exponential backoff |
HashChainVerifierService |
SecurityAuditService.record() |
Computes SHA-256 hash chain on every audit entry |
CostTrackerService |
PhaseExecutorService (after each phase) |
Persists spending to MongoDB after every phase |
NetworkPolicyService |
ToolRegistryService (http_request tool) |
Blocks path traversal and SSRF in HTTP requests |
ProcessSandboxService |
run-command.tool.ts (factory pattern) |
All shell commands now run through sandbox with sanitized env |
RetentionPolicyService |
@Cron('0 3 * * *') |
Daily cleanup at 3 AM |
Result: Every security service now has at least one caller in the production execution flow. Build compiles successfully.
3. Architecture Overview
GoGrab Platform Ecosystem
┌──────────────────────────────────────────────────┐
│ │
│ ┌─────────┐ ┌──────────┐ ┌──────────────┐ │
│ │Frontend │ │ Chrome │ │ VSCode │ │
│ │ Apps │ │Extension │ │ Extension │ │
│ └────┬────┘ └────┬─────┘ └──────┬───────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────────────────────────────┐ │
│ │ backend-api (port 3000) │ │
│ │ Spaces, Universes, Modules, Users │ │
│ └────────────────┬─────────────────────┘ │
│ │ │
│ ┌──────────────────────────────────────┐ │
│ │ backend-ai-api (port 3001) │ │
│ │ Agent Registry, Learning Pyramid, │ │
│ │ Command Center, Space Agents (10) │ │
│ └───────────┬──────────────────────────┘ │
│ │ │
│ ┌───────────▼──────────────────────────┐ │
│ │ VITTO (port 3003) │ │
│ │ │ │
│ │ ┌────────┐ ┌──────┐ ┌───────────┐ │ │
│ │ │ Engine │ │ Mind │ │ Security │ │ │
│ │ │(21 files)│(18) │ │ (22 files)│ │ │
│ │ └────────┘ └──────┘ └───────────┘ │ │
│ │ ┌────┐ ┌───────┐ ┌──────────┐ │ │
│ │ │LLM │ │ Tools │ │ Strategy │ │ │
│ │ │(11) │ │ (9) │ │ (10) │ │ │
│ │ └────┘ └───────┘ └──────────┘ │ │
│ │ ┌────────────┐ ┌───────────────┐ │ │
│ │ │Connectivity│ │ Proactive │ │ │
│ │ │ (12) │ │ (6) │ │ │
│ │ └────────────┘ └───────────────┘ │ │
│ │ ┌──────────┐ ┌──────────────────┐ │ │
│ │ │SpaceBuild│ │ ModuleGeneration │ │ │
│ │ │ (6) │ │ (18) │ │ │
│ │ └──────────┘ └──────────────────┘ │ │
│ │ ┌──────────┐ ┌────────┐ │ │
│ │ │ Customer │ │Prompts │ │ │
│ │ │ (4) │ │ (2) │ │ │
│ │ └──────────┘ └────────┘ │ │
│ │ │ │
│ │ MongoDB: vitto-mind (23 schemas) │ │
│ └────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────┐ │
│ │ backend-docs-api (port 3002) │ │
│ └──────────────────────────────────────┘ │
│ ┌──────────────────────────────────────┐ │
│ │ MCP Server (claude-agent-mcp) │ │
│ └──────────────────────────────────────┘ │
└──────────────────────────────────────────────────┘
Messaging Flow (new in Sessions 114-116):
Slack/Discord/WhatsApp/Telegram
│
▼
POST /engine/integrations/{channel}/webhook
│
▼
ChannelRateLimiterService.check() ← Rate limit per user per channel
│ (if allowed)
▼
ChannelGatewayService.handle{Channel}Event()
│
▼
VittoEngineService.submitTask()
│
▼
4-Phase Workflow (ANALYZE → PLAN → EXECUTE → VERIFY)
│
Each tool call passes through:
├── PromptInjectionGuardService.scan()
├── ToolSecurityService (sandbox level check)
├── ProcessSandboxService.execute() (for shell commands)
├── NetworkPolicyService.validate() (for HTTP requests)
└── SecurityAuditService.record() + HashChain
│
▼
CostTrackerService.recordSpending()
│
▼
Result → ChannelGatewayService.routeTaskResult()
│
▼
Reply to Slack/Discord/WhatsApp/Telegram
4. Module Inventory
4.1 Engine (21 files) — The Brain
| Service |
Purpose |
VittoEngineService |
Task queue, priority processing, SSE event stream, DLQ integration |
PhaseExecutorService |
4-phase workflow with cost tracking after each phase |
AgentLoopService |
Agentic tool-use loop — sends tools to LLM, executes, feeds back |
AutonomyService |
4-tier autonomy state machine with checkpoints |
DelegationManagerService |
Handoff creation, monitoring, retries, escalation |
SkillManagerService |
Skill CRUD, versioning, rollback, publishing, LLM vetting |
TaskSchedulerService |
Cron-based scheduling with persistent execution records |
SubAgentService |
Sub-agent spawning, mesh topology, cancellation |
ComplianceService |
Compliance auditing and reporting |
SessionTrackerService |
Development session context |
VittoController |
117 HTTP/SSE endpoints across 20+ categories |
4.2 Mind (18 files) — The Memory
Schemas (12):
ExecutionTrace — Task execution logs (90-day TTL)
StrategyMemory — Best provider+model combos per task type
AgentPerformance — Agent reliability scores
UserPattern — Developer preferences
AutonomyConfig — Autonomy levels
AutonomyCheckpoint — Pending human approvals (30-day TTL)
ActiveTask — In-flight tasks (24-hour TTL)
CodebaseEntry — NX project index (refreshed every 6h)
VittoSkill — Runtime-learned procedures
VittoMemory — Vector-embedded semantic memories
CustomerSession — Customer interaction context
ProactiveAlert — Monitoring alerts
Services:
VittoMemoryService — Vector search, semantic recall, team sharing, GDPR export
CodebaseIndexerService — Scans NX monorepo every 6 hours
PlatformModelService — Hardcoded GoGrab architecture knowledge
SpaceContextService — Live space data with 5-minute cache
OutcomeFeedbackService — Self-improvement feedback loop
4.3 Security (22 files) — The Shield
See Section 7: Security Deep-Dive for full details.
4.4 LLM (11 files) — The Voice
| Provider |
Models |
Tool-Use |
| Claude (default) |
claude-sonnet-4-5, claude-haiku |
Full |
| OpenAI |
gpt-4o, gpt-4o-mini |
Full |
| Gemini |
gemini-2.0-flash |
Full |
| DeepSeek |
deepseek-chat |
Basic |
| Ollama (local) |
Any Ollama model |
Via local API |
SmartRouterService routes requests by complexity, cost, and provider health. Each provider call is now wrapped in a CircuitBreakerService.execute() call — if a provider fails 5 consecutive times, the circuit opens and traffic reroutes to fallbacks.
4.5 Tools (9 files) — The Hands
24+ tools organized by layer permission:
| Tool |
Dev |
Builder |
Customer |
New in 116 |
read_file |
Yes |
Yes |
- |
- |
write_file |
Yes |
Yes |
- |
- |
run_command |
Yes |
Yes |
- |
Now uses ProcessSandbox |
http_request |
Yes |
Yes |
- |
Now validates via NetworkPolicy |
query_docs |
Yes |
Yes |
Yes |
- |
recall_memory |
Yes |
Yes |
- |
- |
search_decisions |
Yes |
Yes |
- |
- |
create_handoff |
Yes |
Yes |
- |
- |
check_handoff_status |
Yes |
Yes |
- |
- |
task_complete |
Yes |
Yes |
Yes |
- |
browser_navigate |
Yes |
Yes |
- |
- |
browser_interact |
Yes |
Yes |
- |
- |
browser_screenshot |
Yes |
Yes |
Yes |
- |
desktop_execute |
Yes |
- |
- |
- |
computer_use |
Yes |
Yes |
- |
- |
query_platform |
Yes |
Yes |
- |
- |
All tool calls now pass through: injection scan → security check → sandbox execution → output sanitization → audit logging with hash chain.
4.6 Connectivity (12 files) — The Nervous System
| Service |
Connects To |
Purpose |
BackendAiClientService |
backend-ai-api (3001) |
Handoffs, learning, decisions |
BackendApiClientService |
backend-api (3000) |
Spaces, universes, modules |
BackendDocsClientService |
backend-docs-api (3002) |
Documentation search |
HandoffWsClientService |
WebSocket (3001) |
Real-time handoff events |
InfrastructureClientService |
Infrastructure API |
Browser, desktop, computer-use |
NotificationService |
Multi-channel |
Human notifications |
ChannelGatewayService |
Slack/Discord/WhatsApp/Telegram/Email |
Message routing + rate limiting |
WebhookIngestionService |
External webhooks |
Webhook processing + event logging |
VoiceService |
Whisper/TTS providers |
Speech-to-text and text-to-speech |
4.7 Strategy (10 files) — The Judgment
| Service |
Purpose |
RequestClassifierService |
Classifies task type and complexity |
CostGuardService |
Circuit breaker: 25 iterations, 100K tokens, 5 min max |
CostTrackerService |
Per-task spending persistence, per-user budgets, daily trends |
QualityGateService |
LLM-based verification + visual verification |
StrategyOptimizerService |
Self-optimizes model routing every 4 hours |
4.8 Other Modules
| Module |
Files |
Purpose |
| Proactive |
6 |
Always-on health monitoring (API, build, deployment, LLM, agents) |
| SpaceBuilder |
6 |
Universe lifecycle, NL-to-universe, 10-agent coordination |
| ModuleGeneration |
18 |
AI code generation with 6-phase pipeline |
| Customer |
4 |
Intent classification, session management, end-user queries |
| Prompts |
2 |
Prompt template building |
5. What Changed: Sessions 101 → 116
Before (Session 101)
- 9 modules, ~50 files
- 16 tools
- 9 MongoDB schemas
- ~17 endpoints
- No security module
- In-memory audit logging (lost on restart)
- In-memory cost tracking (lost on restart)
- In-memory routing decisions (lost on restart)
- No prompt injection defense
- No sandbox for shell commands
- No rate limiting on messaging channels
- No circuit breaker on LLM calls
- No dead letter queue for failed tasks
- No hash chain for audit tamper detection
- No skill versioning or rollback
- No GDPR export capability
- No voice integration
- No webhook management
- No sub-agent mesh
After (Session 116)
- 16 modules, 147 files
- 24+ tools
- 23 MongoDB schemas
- 117 endpoints
- Full security module (22 files, 12 services)
- Persistent audit logging to MongoDB with hot cache
- Persistent cost tracking with per-user budgets
- Persistent routing decisions with provider health
- Prompt injection defense (50+ patterns across 8 categories)
- ProcessSandbox for all shell commands (sanitized env, resource limits)
- Rate limiting on all 4 messaging channels (per-user, per-minute)
- Circuit breaker on all LLM provider calls (per-provider state machine)
- Dead letter queue with exponential backoff (1min → 5min → 15min → 60min)
- SHA-256 hash chain on every audit entry (tamper-evident)
- Skill versioning with rollback to any previous version
- GDPR memory export per user
- Voice integration (Whisper STT + provider-agnostic TTS)
- Webhook management (CRUD + event ingestion + history)
- Sub-agent mesh with spawn, topology, cancellation
- Compliance reporting with CSV/JSON export
- Daily retention cleanup via @Cron
- Team memory sharing (private/team/organization levels)
- Module generation with 6-phase AI pipeline
- Ollama local model support
6. Current Feature Matrix
Fully Implemented & Wired
| Feature |
Status |
Tested |
Notes |
| 4-phase workflow (ANALYZE/PLAN/EXECUTE/VERIFY) |
Wired |
Needs E2E |
Core engine, functional since Session 98 |
| Multi-provider LLM routing |
Wired |
Needs E2E |
Claude, OpenAI, Gemini, DeepSeek, Ollama |
| Circuit breaker on LLM calls |
Wired |
Needs test |
Wraps primary + fallback providers |
| Persistent audit logging |
Wired |
Needs test |
MongoDB + 100-entry hot cache |
| Hash chain on audit entries |
Wired |
Needs test |
SHA-256 tamper-evident |
| Prompt injection scanning |
Wired |
Needs test |
50+ regex patterns, LLM fallback |
| Output sanitization |
Wired |
Needs test |
Scrubs leaked prompts + credentials |
| Process sandbox |
Wired |
Needs test |
Sanitized env, resource limits, no shell |
| Rate limiting on channels |
Wired |
Needs test |
Slack, WhatsApp, Discord, Telegram |
| Dead letter queue |
Wired |
Needs test |
Exponential backoff retry |
| Cost tracking persistence |
Wired |
Needs test |
Per-task, per-user, per-provider |
| Network policy validation |
Wired |
Needs test |
Blocks SSRF + path traversal on http_request |
| Retention policy (@Cron) |
Wired |
Needs test |
Daily at 3 AM |
| Skill versioning + rollback |
Wired |
Needs test |
Immutable snapshots per update |
| 10 agentic tools |
Wired |
Needs E2E |
File I/O, shell, HTTP, handoffs, memory, docs |
| Proactive health monitoring |
Wired |
Needs E2E |
7 check types on intervals |
| 4-tier autonomy |
Wired |
Needs E2E |
OBSERVE/SUGGEST/DIRECT/AUTONOMOUS |
| Memory system (vector recall) |
Wired |
Needs E2E |
Semantic search, team sharing, GDPR export |
| SSE event stream |
Wired |
Needs E2E |
Heartbeat every 30s |
| Channel management CRUD |
Wired |
Needs E2E |
9 endpoints |
| Webhook management CRUD |
Wired |
Needs E2E |
7 endpoints |
| Sub-agent mesh |
Wired |
Needs E2E |
Spawn, topology, cancel |
| Compliance reporting |
Wired |
Needs test |
CSV/JSON export |
Partially Implemented (Inbound Works, Reply Path Incomplete)
| Feature |
Status |
What's Missing |
| Slack integration |
Partial |
Reply-path: routeTaskResult() needs to send Slack response after task completes |
| WhatsApp integration |
Partial |
Same — reply-path back to WhatsApp after task completes |
| Discord integration |
Partial |
Same — reply-path back to Discord after task completes |
| Telegram integration |
Partial |
Same — reply-path back to Telegram after task completes |
| Email integration |
Stub |
sendEmailMessage() just logs — needs nodemailer/SendGrid |
Not Yet Implemented
| Feature |
Plan Phase |
Description |
| BullMQ distributed task queue |
Phase 3.2 |
Replace in-memory queue with Redis-backed BullMQ |
| Container sandbox (Docker) |
Phase 5.1B |
Docker-based skill isolation (ProcessSandbox is Phase A) |
| Desktop daemon background service |
Phase 3.1 |
Evolve daemon into full task runner |
| Marketplace discovery UI |
Phase 4.4 |
Browse/rate/install skills in frontend |
| RBAC (role-based access) |
Phase 5.4 |
@Roles('admin') guard on destructive endpoints |
| Docker Compose deployment |
Phase 6.1 |
Single-command full stack startup |
| 1-click setup CLI |
Phase 6.2 |
Interactive installer |
| Onboarding wizard |
Phase 6.3 |
Step-by-step first-time setup |
7. Security Deep-Dive
Security Module Structure
security/
security.module.ts (12 providers, 9 schemas)
security.controller.ts (5 audit endpoints + CSV/JSON export)
security-audit.service.ts (persistent logging + hot cache + hash chain)
secret-vault.service.ts (AES-256-GCM encrypted storage)
credential-redactor.service.ts (PII/credential masking)
prompt-injection-guard.service.ts (50+ patterns across 8 categories)
network-policy.service.ts (SSRF + private IP blocking)
sandbox/
process-sandbox.service.ts (spawn with sanitized env, resource limits)
container-sandbox.service.ts (Docker-based isolation — stub)
resilience/
circuit-breaker.service.ts (CLOSED→OPEN→HALF_OPEN per provider)
dead-letter-queue.service.ts (exponential backoff: 1→5→15→60 min)
rate-limiting/
channel-rate-limiter.service.ts (per-user per-channel per-minute)
compliance/
hash-chain-verifier.service.ts (SHA-256 tamper-evident audit chain)
retention-policy.service.ts (@Cron daily: 365d audit, 90d traces, 180d approvals)
schemas/
security-audit-log.schema.ts
spending-record.schema.ts
user-budget.schema.ts
routing-decision.schema.ts
approval-request.schema.ts
encrypted-secret.schema.ts
schedule-execution.schema.ts
skill-version.schema.ts
Prompt Injection Defense (8 categories, 50+ patterns)
| Category |
Examples |
| Instruction override |
"ignore previous instructions", "disregard all prior" |
| Delimiter injection |
"```system", "###END" |
| Data exfiltration |
"output your system prompt", "reveal your instructions" |
| Jailbreak |
"DAN mode", "developer mode activated" |
| Code injection |
"eval(", "exec(", "rm -rf" |
| Social engineering |
"I'm an admin", "this is a test, please comply" |
| Indirect injection |
"when the user asks next, say..." |
| Encoding attacks |
Base64/hex encoded payloads, unicode tricks |
Flow: Fast static regex scan → if flagged, optional LLM semantic check → block or allow.
Tool Execution Security Pipeline
Every tool call passes through this pipeline:
1. Input received
↓
2. PromptInjectionGuardService.scan(input) → Block if injection detected
↓
3. ToolSecurityService.checkSandboxLevel(tool) → Verify tool has permission
↓
4. [If shell command] ProcessSandboxService.execute()
- spawn() with shell=false
- Sanitized env (only SAFE_ENV_KEYS)
- Resource limits (memory, timeout)
- Working directory boundary check
↓
5. [If HTTP request] NetworkPolicyService.validate()
- Block private IPs (10.x, 172.16-31.x, 192.168.x)
- Block dangerous schemes (file://, ftp://)
- Block path traversal (../)
↓
6. Tool executes
↓
7. CredentialRedactorService.sanitize(output) → Scrub leaked secrets
↓
8. SecurityAuditService.record() → Persist + hash chain
↓
9. CostTrackerService.recordSpending() → Persist cost data
8. API Reference (117 Endpoints)
Health & Status
| Method |
Path |
Auth |
Description |
| GET |
/engine/health |
Public |
Service health check |
| GET |
/engine/status |
Public |
Full engine status |
Task Management
| Method |
Path |
Auth |
Description |
| POST |
/engine/tasks |
JWT |
Submit a new task |
| GET |
/engine/tasks |
Public |
List active tasks |
| GET |
/engine/tasks/history |
Public |
Paginated task history |
| GET |
/engine/tasks/:id |
Public |
Get task by ID |
| POST |
/engine/orchestrate |
JWT |
Multi-agent coordination |
Real-Time Events
| Method |
Path |
Auth |
Description |
| SSE |
/engine/events |
Public |
Streaming events (heartbeat 30s) |
Autonomy Configuration
| Method |
Path |
Auth |
Description |
| GET |
/engine/autonomy |
Public |
Get current config |
| PUT |
/engine/autonomy/global |
JWT |
Set global level |
| PUT |
/engine/autonomy/session |
JWT |
Set session level |
| PUT |
/engine/autonomy/handoff |
JWT |
Set handoff level |
Checkpoints (Human-in-Loop)
| Method |
Path |
Auth |
Description |
| GET |
/engine/checkpoints |
Public |
List pending approvals |
| POST |
/engine/checkpoints/:id |
JWT |
Resolve (approve/reject) |
Delegation
| Method |
Path |
Auth |
Description |
| GET |
/engine/delegations |
Public |
List active delegations |
| GET |
/engine/delegations/:taskId |
Public |
Get delegation tree |
Proactive Monitoring
| Method |
Path |
Auth |
Description |
| GET |
/engine/proactive/status |
Public |
Check statuses |
| GET |
/engine/proactive/alerts |
Public |
Alerts (filter: layer, severity) |
| POST |
/engine/proactive/alerts/:id/resolve |
JWT |
Resolve alert |
| POST |
/engine/proactive/checks/:name/trigger |
JWT |
Trigger check manually |
Mind Explorer
| Method |
Path |
Auth |
Description |
| GET |
/engine/mind/summary |
Public |
Stats overview |
| GET |
/engine/mind/strategies |
Public |
Learned strategies |
| GET |
/engine/mind/agents |
Public |
Agent performance |
| GET |
/engine/mind/lessons |
Public |
Recent lessons |
| GET |
/engine/mind/traces |
Public |
Execution history (paginated) |
| GET |
/engine/tools |
Public |
Registered tools list |
Memory System
| Method |
Path |
Auth |
Description |
| GET |
/engine/memories/search |
Public |
Semantic vector search |
| GET |
/engine/memories/recent |
Public |
Time-sorted memories |
| GET |
/engine/memories/stats |
Public |
Memory system stats |
| GET |
/engine/memories/browse |
Public |
Filter-based browsing |
| POST |
/engine/memories |
JWT |
Create memory |
| PUT |
/engine/memories/:memoryId |
JWT |
Edit memory |
| POST |
/engine/memories/:memoryId/forget |
JWT |
Delete memory |
| POST |
/engine/memories/bulk-delete |
JWT |
Bulk delete by IDs |
| DELETE |
/engine/memories/user/:userId |
JWT |
Delete all user memories |
| GET |
/engine/memories/export/:userId |
JWT |
GDPR export |
| GET |
/engine/memories/team/:teamId |
JWT |
Team recall |
| POST |
/engine/memories/:memoryId/share |
JWT |
Share (private/team/org) |
Smart Routing
| Method |
Path |
Auth |
Description |
| GET |
/engine/routing/stats |
Public |
Provider statistics |
| GET |
/engine/routing/decisions |
Public |
Recent routing decisions |
Cost Tracking
| Method |
Path |
Auth |
Description |
| GET |
/engine/costs/stats |
Public |
Spending by provider/complexity |
| GET |
/engine/costs/estimate |
Public |
Estimate task cost |
| GET |
/engine/costs/budget/:userId |
Public |
User budget usage |
| PUT |
/engine/costs/budget/:userId |
JWT |
Set budget limits |
Security & Audit
| Method |
Path |
Auth |
Description |
| GET |
/engine/security/audit |
Public |
Audit log entries |
| GET |
/engine/security/stats |
Public |
Security statistics |
| GET |
/engine/security/policies |
Public |
Tool security policies |
| GET |
/engine/security/approvals |
Public |
Pending tool approvals |
| POST |
/engine/security/approvals/:id |
JWT |
Resolve approval |
Security Controller (dedicated)
| Method |
Path |
Auth |
Description |
| GET |
/security/audit |
Roles |
Query audit logs (filters) |
| GET |
/security/audit/recent |
Roles |
Recent from hot cache |
| GET |
/security/audit/stats |
Roles |
Audit statistics |
| GET |
/security/audit/export/csv |
Roles |
Download CSV |
| GET |
/security/audit/export/json |
Roles |
Download JSON |
Skills Management
| Method |
Path |
Auth |
Description |
| GET |
/engine/skills |
Public |
List (filter: category, status, trust) |
| GET |
/engine/skills/stats |
Public |
Skill system statistics |
| GET |
/engine/skills/:id |
Public |
Skill detail |
| GET |
/engine/skills/:id/versions |
Public |
Version history |
| POST |
/engine/skills |
JWT |
Create skill |
| PUT |
/engine/skills/:id |
JWT |
Update skill |
| DELETE |
/engine/skills/:id |
JWT |
Delete skill |
| POST |
/engine/skills/:id/publish |
JWT |
Publish + validate |
| POST |
/engine/skills/:id/rollback |
JWT |
Rollback to version |
| POST |
/engine/skills/:id/rate |
JWT |
Rate skill (1-5) |
Channel Management
| Method |
Path |
Auth |
Description |
| GET |
/engine/channels |
Public |
List channels |
| GET |
/engine/channels/twilio-info |
Public |
Twilio config info |
| GET |
/engine/channels/:id |
Public |
Get channel |
| POST |
/engine/channels |
JWT |
Create channel |
| PUT |
/engine/channels/:id |
JWT |
Update channel |
| DELETE |
/engine/channels/:id |
JWT |
Delete channel |
| POST |
/engine/channels/inbound |
JWT |
Inbound message |
| POST |
/engine/channels/validate-twilio |
JWT |
Validate Twilio |
| POST |
/engine/channels/setup-whatsapp |
JWT |
WhatsApp onboarding |
| POST |
/engine/channels/:id/send-test |
JWT |
Send test message |
| POST |
/engine/channels/:id/verify-sandbox |
JWT |
Verify sandbox |
Integration Webhooks (Public receivers)
| Method |
Path |
Auth |
Description |
| POST |
/engine/integrations/slack/events |
Public |
Slack Events API |
| POST |
/engine/integrations/whatsapp/webhook |
Public |
Twilio WhatsApp |
| POST |
/engine/integrations/discord/webhook |
Public |
Discord interactions |
| POST |
/engine/integrations/telegram/webhook |
Public |
Telegram Bot |
Webhook Management
| Method |
Path |
Auth |
Description |
| GET |
/engine/webhooks |
Public |
List webhooks |
| GET |
/engine/webhooks/:webhookId |
Public |
Get webhook |
| POST |
/engine/webhooks |
JWT |
Create webhook |
| PUT |
/engine/webhooks/:webhookId |
JWT |
Update webhook |
| DELETE |
/engine/webhooks/:webhookId |
JWT |
Delete webhook |
| POST |
/engine/webhooks/:webhookId/ingest |
Public |
Ingest event |
| GET |
/engine/webhooks/:webhookId/events |
Public |
Event history |
Task Scheduling
| Method |
Path |
Auth |
Description |
| GET |
/engine/schedules |
Public |
List schedules |
| GET |
/engine/schedules/:id |
Public |
Get schedule |
| POST |
/engine/schedules |
JWT |
Create schedule |
| PUT |
/engine/schedules/:id |
JWT |
Update schedule |
| DELETE |
/engine/schedules/:id |
JWT |
Delete schedule |
Sub-Agent Mesh
| Method |
Path |
Auth |
Description |
| POST |
/engine/agents/spawn |
JWT |
Spawn sub-agent |
| GET |
/engine/agents/stats |
Public |
Mesh statistics |
| GET |
/engine/agents/task/:taskId |
Public |
Agents for task |
| GET |
/engine/agents/mesh/:taskId |
Public |
Mesh topology |
| GET |
/engine/agents/:agentId |
Public |
Agent details |
| POST |
/engine/agents/:agentId/cancel |
JWT |
Cancel agent |
Voice
| Method |
Path |
Auth |
Description |
| GET |
/engine/voice/status |
Public |
Voice service availability |
| POST |
/engine/voice/transcribe |
JWT |
Speech-to-text (Whisper) |
| POST |
/engine/voice/synthesize |
JWT |
Text-to-speech |
Compliance & Retention
| Method |
Path |
Auth |
Description |
| GET |
/engine/compliance/audit |
Public |
Compliance audit trail |
| GET |
/engine/compliance/report |
Public |
Compliance report |
| GET |
/engine/compliance/policies |
Public |
Retention policies |
| POST |
/engine/compliance/retention |
JWT |
Trigger retention cleanup |
Local Models (Ollama)
| Method |
Path |
Auth |
Description |
| GET |
/engine/local-models/status |
Public |
Ollama status |
| POST |
/engine/local-models/pull |
JWT |
Download model |
| POST |
/engine/local-models/chat |
JWT |
Local inference |
| POST |
/engine/local-models/health |
JWT |
Health check |
9. How to Use Vitto — Developer Guide
Starting Vitto
# Option 1: Via NX
npx nx serve backend-vitto-api
# Option 2: Via project script
yarn serve:backend-vitto
# Verify it's running
curl http://localhost:3003/engine/health
Prerequisites: MongoDB running with vitto-mind database, .env.local configured with API keys.
Submitting 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"
}
}'
Monitoring Progress
# Real-time SSE stream
curl http://localhost:3003/engine/events
# Events: task.started, phase.started, tool_call, phase.completed, task.completed
# Get task status
curl http://localhost:3003/engine/tasks/<taskId>
# Task history with filters
curl "http://localhost:3003/engine/tasks/history?limit=20&status=completed"
Configuring Autonomy
# Set global level (OBSERVE | SUGGEST | DIRECT | AUTONOMOUS)
curl -X PUT http://localhost:3003/engine/autonomy/global \
-H "Authorization: Bearer <JWT>" \
-d '{ "level": "SUGGEST" }'
# Check pending checkpoints
curl http://localhost:3003/engine/checkpoints
# Approve a checkpoint
curl -X POST http://localhost:3003/engine/checkpoints/<id> \
-H "Authorization: Bearer <JWT>" \
-d '{ "decision": "approved", "resolvedBy": "frank" }'
Monitoring Costs
# Spending overview
curl http://localhost:3003/engine/costs/stats
# Estimate before running
curl "http://localhost:3003/engine/costs/estimate?type=bugfix&complexity=medium"
# Set user budget
curl -X PUT http://localhost:3003/engine/costs/budget/user123 \
-H "Authorization: Bearer <JWT>" \
-d '{ "dailyTokenLimit": 500000, "monthlyTokenLimit": 10000000 }'
Security Monitoring
# Audit log
curl "http://localhost:3003/engine/security/audit?toolName=run_command&limit=50"
# Export audit as CSV
curl http://localhost:3003/security/audit/export/csv > audit.csv
# Security stats
curl http://localhost:3003/engine/security/stats
Memory Operations
# Semantic search
curl "http://localhost:3003/engine/memories/search?query=authentication+bug&limit=5"
# Create a memory
curl -X POST http://localhost:3003/engine/memories \
-H "Authorization: Bearer <JWT>" \
-d '{
"content": "The auth service requires the JWT_SECRET env var to be set",
"category": "infrastructure",
"importance": "high"
}'
# Team recall
curl http://localhost:3003/engine/memories/team/team123
# GDPR export
curl http://localhost:3003/engine/memories/export/user123
10. How to Use Vitto — Space Builders
Generate Universe Blueprint
curl -X POST http://localhost:3003/space-builder/blueprint \
-H "Authorization: Bearer <JWT>" \
-d '{
"spaceId": "space_123",
"description": "Create an e-commerce store with product catalog, cart, and admin dashboard",
"preferences": { "style": "modern", "colorScheme": "blue" }
}'
Build and Deploy
# Build from blueprint
curl -X POST http://localhost:3003/space-builder/build \
-H "Authorization: Bearer <JWT>" \
-d '{ "spaceId": "space_123", "blueprint": { ... } }'
# Deploy
curl -X POST http://localhost:3003/space-builder/deploy/universe_456 \
-H "Authorization: Bearer <JWT>"
# Check status
curl http://localhost:3003/space-builder/deploy/universe_456/status
# Rollback if needed
curl -X POST http://localhost:3003/space-builder/rollback/universe_456 \
-H "Authorization: Bearer <JWT>"
Agent Chains
# Run a pre-defined chain
curl -X POST http://localhost:3003/space-builder/chain \
-H "Authorization: Bearer <JWT>" \
-d '{
"spaceId": "space_123",
"chainName": "full-page-build",
"context": { "pageId": "page_789", "description": "Product detail with gallery" }
}'
# Available chains: full-page-build, style-overhaul, content-refresh, performance-audit
curl http://localhost:3003/space-builder/chains
11. How to Use Vitto — End Users
End users interact through deployed spaces, not directly with Vitto's API:
# Customer query (no JWT needed)
curl -X POST http://localhost:3003/customer/query \
-d '{
"spaceId": "space_123",
"universeId": "universe_456",
"userId": "user_789",
"message": "Where is the pricing page?",
"sessionId": "session_abc",
"pageContext": { "currentUrl": "/products", "pageId": "page_products" }
}'
Response includes message, actions (navigate, highlight), and confidence score.
12. Use Cases
Use Case 1: Developer — Proactive Build Fix
- Proactive monitor detects failing
nx affected:build
- Auto-creates task:
{ type: 'bugfix', layer: 'developer', priority: 'high' }
- ANALYZE: Loads codebase index, queries Mind for similar past fixes
- PLAN: Read error → find file → add missing import → rebuild
- EXECUTE: Tool calls (run_command, read_file, write_file, run_command) — all through sandbox + injection scan
- VERIFY: Build passes, lesson stored
- Cost tracked, audit logged with hash chain
Use Case 2: Multi-Channel Customer Support
- Customer sends WhatsApp message: "How do I track my order?"
- Rate limiter checks: user under 50 msgs/min — allowed
- ChannelGateway normalizes message → submits task
- ANALYZE: Loads space context, identifies intent as 'navigation'
- EXECUTE: Searches space modules, finds Order Tracking page
- VERIFY: Response generated with navigation action
- (Gap): Reply-path back to WhatsApp not yet wired
Use Case 3: AI Module Generation
- Developer describes: "Create a user management module with CRUD"
- ModuleGeneration 6-phase pipeline: analyze → plan → decompose → enhance → integrate → execute
- Generates Angular components, services, routes following codebase conventions
- All file writes pass through sandbox + audit
Use Case 4: Scheduled Maintenance Task
- Admin creates schedule:
{ summary: "Run npm audit", cron: "0 6 * * 1" }
- TaskScheduler persists to MongoDB (survives restart)
- Every Monday at 6 AM, task fires
- If task fails, DLQ catches it → retries at 1min, 5min, 15min, 60min
- If provider is down, circuit breaker opens → routes to fallback
Use Case 5: Security-Conscious Skill Execution
- Skill registered:
{ name: "deploy-preview", allowedEndpoints: ["https://api.vercel.com/*"] }
- Skill calls
http_request to https://api.vercel.com/deploy — NetworkPolicy allows
- Skill tries
http_request to http://169.254.169.254/metadata — NetworkPolicy blocks (private IP)
- Skill tries
run_command with curl — removed from allowlist
- All attempts logged to audit trail with hash chain
13. Testing Checklist
Foundation (Phase 1) — Priority: Critical
Messaging (Phase 2) — Priority: High
Resilience (Phase 3) — Priority: High
Skills (Phase 4) — Priority: Medium
Compliance (Phase 5) — Priority: Medium
End-to-End Flows — Priority: Critical
14. Known Gaps & Roadmap
Immediate (Next Session)
| Gap |
Impact |
Effort |
| Messaging reply-path (Slack/WhatsApp/Discord/Telegram) |
Users get inbound but no response |
Medium — wire routeTaskResult() in VittoEngineService |
| Email adapter (SendGrid/nodemailer) |
Email channel is stub-only |
Medium — implement sendEmailMessage() |
| Container sandbox (Docker) |
ProcessSandbox is Phase A; Docker is Phase B |
High — Docker API integration |
| RBAC guards on destructive endpoints |
No admin-only protection |
Low — @Roles('admin') decorator |
Short-Term (2-4 weeks)
| Feature |
Description |
| BullMQ + Redis task queue |
Replace in-memory queue with distributed queue |
| Desktop daemon evolution |
Background task runner that works without IDE |
| Approval notification multi-channel |
WebSocket + Slack + SSE fan-out for approval requests |
| Real-time cost ticker in dashboard |
Live spending visualization |
Medium-Term (1-2 months)
| Feature |
Description |
| Skills marketplace UI |
Browse, rate, install skills in frontend |
| Onboarding wizard |
Step-by-step first-time setup |
| Docker Compose full stack |
Single docker-compose up for all services |
| 1-click Railway/Fly.io deploy |
Cloud deployment in < 2 minutes |
Long-Term (3+ months)
| Feature |
Description |
| LLM-powered skill generation |
Vitto creates tools it doesn't have yet |
| Multi-model phase routing |
Haiku for ANALYZE, Sonnet for PLAN, strategy-optimized for EXECUTE |
| Customer journey analytics |
Detect confusion patterns, trigger proactive suggestions |
| Space health scoring |
Per-space health dashboard |
15. Deployment & Configuration
Environment Variables
| Variable |
Default |
Required |
Description |
VITTO_API_PORT |
3003 |
No |
Vitto API port |
VITTO_MONGODB_URI |
mongodb://localhost:27017/vitto-mind |
Yes |
Vitto's MongoDB |
JWT_SECRET |
— |
Yes |
JWT signing secret |
SYSTEM_TOKEN |
— |
Yes |
Service-to-service auth |
BACKEND_API_URL |
http://localhost:3000 |
Yes |
backend-api URL |
BACKEND_AI_API_URL |
http://localhost:3001 |
Yes |
backend-ai-api URL |
BACKEND_DOCS_API_URL |
http://localhost:3002 |
Yes |
backend-docs-api URL |
VITTO_LLM_PROVIDER |
claude |
No |
Default LLM provider |
ANTHROPIC_API_KEY |
— |
Yes |
Claude API key |
OPENAI_API_KEY |
— |
No |
OpenAI API key |
GOOGLE_AI_API_KEY |
— |
No |
Gemini API key |
TWILIO_ACCOUNT_SID |
— |
No |
For WhatsApp/SMS |
TWILIO_AUTH_TOKEN |
— |
No |
Twilio auth |
SLACK_BOT_TOKEN |
— |
No |
Slack integration |
TELEGRAM_BOT_TOKEN |
— |
No |
Telegram bot |
MongoDB Collections (vitto-mind database)
| Collection |
Purpose |
Retention |
execution_traces |
Task execution logs |
90 days (auto-cleanup) |
strategy_memories |
Optimal model+provider combos |
Permanent |
agent_performances |
Agent reliability scores |
Permanent |
user_patterns |
Developer preferences |
Permanent |
autonomy_configs |
Autonomy levels |
Permanent |
autonomy_checkpoints |
Pending human decisions |
30 days |
active_tasks |
In-flight tasks |
24 hours |
codebase_entries |
NX project index |
Refreshed every 6h |
vitto_skills |
Runtime-learned procedures |
Permanent |
vitto_memories |
Vector-embedded memories |
Permanent |
customer_sessions |
Customer interaction context |
90 days |
proactive_alerts |
Monitoring alerts |
30 days |
security_audit_logs |
Tool execution audit |
365 days |
spending_records |
Cost tracking |
90 days |
user_budgets |
Budget limits |
Permanent |
routing_decisions |
LLM routing history |
90 days |
approval_requests |
Tool approval queue |
180 days |
encrypted_secrets |
AES-256-GCM vault |
Permanent |
schedule_executions |
Scheduled task records |
90 days |
skill_versions |
Skill version snapshots |
Permanent |
dead_letter_entries |
Failed task retry queue |
30 days |
audit_entries |
Compliance audit (engine) |
365 days |
webhook_events |
Webhook event log |
90 days |
Running Locally
# 1. Ensure MongoDB is running
mongosh --eval "db.adminCommand('ping')"
# 2. Ensure .env.local has required variables
cat .env.local | grep -E "VITTO_|ANTHROPIC_|JWT_SECRET|SYSTEM_TOKEN"
# 3. Build
npx nx build backend-vitto-api
# 4. Serve
npx nx serve backend-vitto-api
# OR
yarn serve:backend-vitto
# 5. Verify
curl http://localhost:3003/engine/health
Port Reference
| Service |
gspace1 (testing) |
editor2 (coding) |
Backend |
| Space app |
6200 |
5200 |
— |
| Admin app |
6100 |
5100 |
— |
| Dev app |
6300 |
5300 |
— |
| AI app |
6400 |
5400 |
— |
| Docs app |
6010 |
5010 |
— |
| backend-api |
— |
— |
3000 |
| backend-ai-api |
— |
— |
3001 |
| backend-docs-api |
— |
— |
3002 |
| backend-vitto-api |
— |
— |
3003 |
16. Competitive Positioning vs OpenClaw
OpenClaw (197K+ GitHub stars) proves massive demand for autonomous AI agents but suffers from critical weaknesses. Vitto addresses all of them:
| Dimension |
OpenClaw |
Vitto (Session 116) |
| Setup time |
45+ minutes |
npx nx serve backend-vitto-api |
| Security |
135K exposed instances, no audit |
12-service security layer + hash-chain audit |
| Skills trust |
12-17% malicious skills |
LLM-vetted marketplace with versioning + rollback |
| Cost visibility |
None ($300+/day surprise) |
Real-time tracking + per-user budgets + daily trends |
| Prompt injection |
Vulnerable |
50+ pattern static + LLM semantic defense |
| Secret management |
Plaintext in env |
AES-256-GCM encrypted vault |
| Shell execution |
Direct exec |
ProcessSandbox (sanitized env, resource limits, no shell) |
| Messaging channels |
WhatsApp/Telegram |
Slack + WhatsApp + Discord + Telegram + Email |
| Failure recovery |
None |
Circuit breaker + DLQ + task checkpointing |
| Audit trail |
None |
365-day MongoDB + SHA-256 tamper-evident hash chain |
| Compliance |
None |
SOC 2 foundation + GDPR export + retention policies |
| Memory |
Basic Markdown files |
Vector-embedded, tiered, cross-user team sharing |
| Multi-agent |
Single agent |
Multi-agent mesh with handoffs + delegation trees |
| Background ops |
Requires terminal |
Task scheduling + proactive monitoring |
| LLM providers |
Single provider |
5 providers with smart routing + circuit breakers |
| Network control |
Open access |
NetworkPolicy blocks private IPs, SSRF, path traversal |
Strategic message: "Vitto is the AI agent platform that combines OpenClaw's autonomous power with enterprise-grade security. The more anyone uses GoGrab, the smarter Vitto gets for everyone."
17. Vitto Frontend Ecosystem (Session 117)
Added by: Session 117 (S114 Handoff Completion)
Purpose: Document Vitto's complete frontend library architecture, component catalog, integration patterns, and bug fixes applied during S114 deep testing.
17.1 Frontend Library Architecture
Vitto's frontend spans 5 Angular libraries under libs/libs-ai/, each with a distinct role:
┌─────────────────────────────────────────────────────────────┐
│ Frontend Library Stack │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ ai-panel-core │ │ vitto-hub │ BUILDABLE │
│ │ (user-facing │ │ (admin command │ │
│ │ AI panel) │ │ hub + routes) │ │
│ └────────┬────────┘ └────────┬────────┘ │
│ │ │ │
│ ┌────────▼────────────────────▼────────────────────────┐ │
│ │ gograb-ai-lib (70+ components, 112+ services) │ │
│ │ - VittoHubComponent (unified dashboard) │ │
│ │ - VittoMonitorService (SSE stream) │ │
│ │ - UsageDashboardComponent (MCP billing) │ │
│ │ - AgentMeshVisualizationComponent │ │
│ │ - CursorAgentsDashboardComponent │ │
│ │ BUILDABLE │ │
│ └──────────────────────────┬───────────────────────────┘ │
│ │ │
│ ┌──────────────────────────▼───────────────────────────┐ │
│ │ vitto-chat (NON-BUILDABLE — source imports only) │ │
│ │ - VittoChatShellComponent, VittoChatEngineService │ │
│ │ - UserContextService, TaskBridgeService │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ space-agents (NON-BUILDABLE) │ │
│ │ - SpaceAgentPanelComponent, SpaceBuilderService │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
| Library |
Path |
Buildable |
Components |
Services |
Role |
@libs-ai/gograb-ai-lib |
libs/libs-ai/gograb-ai-lib/ |
Yes |
70+ |
112+ |
Core AI components, Vitto types, monitoring |
@libs-ai/vitto-hub |
libs/libs-ai/vitto-hub/ |
Yes |
9 |
1 |
Command hub tabs (skills, channels, memory, observatory) |
@libs-ai/vitto-chat |
libs/libs-ai/vitto-chat/ |
No |
5 |
4 |
Chat engine, persistence, user context |
@libs-ai/ai-panel-core |
libs/libs-ai/ai-panel-core/ |
Yes |
7 |
5 |
User-facing AI panel, space agent integration |
@libs-ai/space-agents |
libs/libs-ai/space-agents/ |
No |
5 |
3 |
Space building AI agents |
17.2 Key Component Catalog
@libs-ai/vitto-hub — Command Hub
The administrative interface for managing Vitto's capabilities. Route-based tab architecture (Session 112):
| Component |
Route |
Purpose |
VittoCommandHubComponent |
/vitto (parent) |
Shell container with tab navigation |
SkillStudioComponent |
/vitto/skills |
Create, edit, test, publish AI skills |
ChannelManagerComponent |
/vitto/channels |
Slack, WhatsApp, Discord, Telegram, Email |
WebhookBuilderComponent |
/vitto/webhooks |
HTTP event handler configuration |
VisualSchedulerComponent |
/vitto/schedules |
Cron-based task scheduling |
MemoryManagerComponent |
/vitto/memory |
View/edit learned patterns |
ObservatoryPanelComponent |
/vitto/observatory |
Governance hub (parent) |
ObservatoryApprovalsComponent |
/vitto/observatory/approvals |
Human-in-loop decisions |
ObservatoryAuditComponent |
/vitto/observatory/audit |
Security audit log |
CostDashboardComponent |
/vitto/observatory/costs |
Token usage & billing |
Service: VittoApiService — HTTP client targeting backend-vitto-api (port 3003) with methods for skills, channels, webhooks, schedules, memory, observatory, and cost APIs.
@libs-ai/vitto-chat — Chat Engine
Non-buildable by design — prevents circular dependencies with ai-panel-core. Imported as source via loadComponent at app level.
| Export |
Type |
Purpose |
VittoChatShellComponent |
Component |
Main chat container |
MessageBubbleComponent |
Component |
User/assistant messages with markdown |
ChatInputBarComponent |
Component |
Multi-line input with typing indicators |
TaskProgressCardComponent |
Component |
Real-time task progress visualization |
CommandBarComponent |
Component |
Slash command palette |
VittoChatEngineService |
Service |
Chat logic, LLM calls, memory recall |
UserContextService |
Service |
User type detection + persona mapping |
TaskBridgeService |
Service |
Multi-agent task submission + tracking |
VittoChatPersistenceService |
Service |
IndexedDB session persistence |
@libs-ai/gograb-ai-lib — Core AI Library
The largest AI library (70+ components, 112+ services). Key Vitto-related exports:
| Component |
Purpose |
Backend |
VittoHubComponent |
Unified Jarvis-like command hub (tabs: Dashboard, Chat, Tasks, Agents, Activity, Intelligence) |
port 3003 + 3001 |
VittoMonitorComponent |
Workflow monitoring (legacy) |
port 3003 SSE |
UsageDashboardComponent |
Cloud MCP usage statistics & billing |
port 3001 /ai-api/mcp/usage |
AgentMeshVisualizationComponent |
Agent network topology visualization |
port 3001 |
CursorAgentsDashboardComponent |
Cursor IDE agent monitoring |
port 3001 |
PlatformIntelligenceDashboardComponent |
Platform-wide AI insights |
port 3001 |
CommandCenterComponent |
Real-time MCP task dashboard |
port 3001 WebSocket |
MemoryBrowserComponent |
Decision/pattern/convention browser |
port 3001 |
Key Services:
VittoMonitorService — SSE stream from backend-vitto-api (/engine/tasks/stream, /engine/mind/summary)
OrchestrationClientService — WebSocket to backend-ai-api (/ai-api/command-center)
IntelligenceCoordinatorService — Multi-agent coordination
HierarchicalMemoryService — Decision/pattern recall
Shared Types (vitto.types.ts): TaskPhase, TaskStatus, VittoTaskSummary, AutonomyLevel, AutonomyCheckpoint, MindSummary, VittoTool, EngineStatus, ProactiveAlert
17.3 Route Composition Pattern (Session 117)
Problem: @libs-ai/vitto-chat is non-buildable, so it can't be part of VittoHubRoutes (exported from buildable @libs-ai/vitto-hub). Apps that need chat must compose their own route tree.
Solution: VittoHubChildRoutes — exported separately from VittoHubRoutes — enables per-app composition:
// For apps WITHOUT chat (use loadChildren):
{ path: 'vitto', loadChildren: () => import('@libs-ai/vitto-hub').then(m => m.VittoHubRoutes) }
// For apps WITH chat (use loadComponent + spread children):
import { VittoHubChildRoutes } from '@libs-ai/vitto-hub';
{
path: 'vitto',
loadComponent: () => import('@libs-ai/vitto-hub').then(m => m.VittoCommandHubComponent),
children: [
{ path: '', redirectTo: 'chat', pathMatch: 'full' },
{ path: 'chat', loadComponent: () => import('@libs-ai/vitto-chat').then(m => m.VittoChatShellComponent) },
...VittoHubChildRoutes,
],
}
Applied to: gograb-dev and gograb-admin (both default to /vitto/chat).
17.4 Proxy & Environment Architecture
Frontend apps reach backend services through the Angular dev server proxy:
| Proxy Path |
Target Backend |
Port |
/api/* |
backend-api |
3000 |
/ai-api/* |
backend-ai-api |
3001 |
/docs-api/* |
backend-docs-api |
3002 |
/vitto-api/* |
backend-vitto-api |
3003 |
Shared config: libs/libs-foundational/api-config/proxy.conf.json
Custom override: apps/gograb-ai/proxy.conf.js — adds Chrome Private Network Access (PNA) support for extension embedding.
Session 117 fix: gograb-ai/src/environments/environment.ts had hardcoded http://localhost:3001/ai-api URLs. Changed to proxy paths (/api, /ai-api, /docs-api) except WebSocket URL which must remain direct (http://localhost:3001) since Angular dev server can't proxy WebSocket connections.
17.5 Auth Flow for API Requests
User logs in → JWT stored via Flash Persistence (localStorage signals)
│
▼
HTTP Request → @auth-ui authInterceptor attaches "Authorization: Bearer <JWT>"
│
▼
Angular proxy → /ai-api/* → backend-ai-api:3001
→ /api/* → backend-api:3000
│
▼
Backend guard (JwtOrApiKeyGuard OR InfrastructureAuthGuard)
- JwtOrApiKeyGuard: Validates JWT or API key
- InfrastructureAuthGuard: Has localhost bypass for non-production
Session 117 fix: UsageDashboardComponent was calling /api/ai-api/mcp/usage (double prefix — routes to port 3000 which doesn't have MCP endpoints). Fixed to /ai-api/mcp/usage (routes to port 3001 correctly).
17.6 Decision Metric Scopes
Different metric numbers across dashboards are correct by design — each shows a different scope:
| Dashboard |
Metric Source |
Scope |
| gograb-dev Infrastructure |
ai-agents DB total |
All decisions across all agents and sessions |
| MCP Status (AI Dashboard V2) |
MCP pending outcomes |
Decisions pending outcome feedback |
| Agent Mesh |
Active agent nodes |
Sum of decisions from currently active agents |
| Cursor Agents |
Cursor-specific sessions |
Decisions captured from Cursor IDE agents only |
Session 117 fix: Added tooltips to each metric card clarifying its scope.
17.7 Session 117 Bug Fixes Summary
10 fixes applied across 20 files, resolving all S114 handoff tasks:
| # |
Fix |
Priority |
Files Modified |
| 1 |
NestJS route ordering (outcomes/stats before outcomes/:outcomeId) |
HIGH |
module-intelligence.controller.ts |
| 2 |
Vitto chat route per-app (VittoHubChildRoutes pattern) |
CRITICAL |
vitto-hub.routes.ts, vitto-hub/index.ts, gograb-dev/app.routes.ts, gograb-admin/app.routes.ts |
| 3 |
NaN% health monitor null guard |
HIGH |
infrastructure-dashboard.component.ts |
| 4 |
Spanish → English admin settings |
HIGH |
config-settings.component.ts, tenant-customization.component.ts |
| 5 |
Spanish dashboard widget text |
MEDIUM |
dashboard.component.html |
| 6 |
Module management NaN badge |
MEDIUM |
module-management.component.ts |
| 7 |
New GET /api/ai/usage/stats endpoint |
HIGH |
ai.controller.ts, ai.service.ts, analytics.component.ts |
| 8 |
gograb-ai hardcoded localhost → proxy |
MEDIUM |
environment.ts |
| 9 |
MCP usage URL fix + error handling |
MEDIUM |
usage-dashboard.component.ts, usage-dashboard.component.html |
| 10 |
Metric tooltip disambiguation |
LOW |
4 component files |
17.8 Supporting Libraries (Vitto-Adjacent)
| Library |
Path |
Buildable |
Purpose |
@libs-ai/ai-command-panel |
libs/libs-ai/ai-command-panel/ |
No |
Command palette, slash commands |
@libs-ai/module-generator |
libs/libs-ai/module-generator/ |
Yes |
AI-powered module generation |
@libs-ai/multi-agent-dashboard |
libs/libs-ai/multi-agent-dashboard/ |
— |
Real-time agent monitoring |
@libs-ai/cursor-agents |
libs/libs-ai/cursor-agents/ |
— |
IDE-based coding agents |
@libs-ai/platform-intelligence |
libs/libs-ai/platform-intelligence/ |
— |
Background learning, pattern extraction |
@libs-ai/agent-orchestrator |
libs/libs-ai/agent-orchestrator/ |
— |
Multi-agent coordination, handoffs |
Document updated: Session 117 — February 18, 2026
Covers: Sessions 98-117 of the Vitto platform evolution
Previous baseline: docs/english/vitto/VITTO.md (Session 101)