Deterministic rule table · no LLM overhead · frontend→Gemini · backend/db→Claude · QA→GPT-5.4 · local→Gemma4 · env-var model strings · fallback chain on rate limit
router.py
📊 DAG Engine
Topological sort · dependency graph · dynamic subtask injection · FAILED_BY_USER_INTERRUPT · STALE rollback · 3-case handler · cross-agent conflict detection · git-committed on every write
dag.py
🔗 Context Compiler
compile_converged_context() · last 5 visual taps · telemetry cost snapshot · AGENTS.md state · evaluated fresh every dispatch · injected as prefix to all agent calls
context_sync.py
📈 Telemetry Dashboard
JSON log per call · timestamp · model · latency · tokens · cost USD (estimated) · RotatingFileHandler 10MB/5 files · correlation ID per DAG run · /telemetry endpoint · glassmorphic UI
telemetry.json
⟷ AGENTS.md COORDINATION BUS — each agent reads on start · writes after every task · git committed on every write · file-lock prevents concurrent writes · archived to GBrain nightly ⟷
⑤ Specialized Agent Layer — Right Model Per Task
🎨 Frontend Agent
Components · CSS · layout · responsive design · Figma MCP · reads Backend API contract from AGENTS.md · max 3 visual verification iterations · corrective rollback on tap
gemini-3.1-pro-preview
⚙️ Backend Agent
API routes · auth · business logic · security · GitHub MCP · reads DB schema from AGENTS.md · dynamic FastAPI route loader via glob importlib · SIGTERM+drain graceful shutdown
claude-sonnet-4-6
🗄️ Database Agent
SQL migrations · RLS policies · Supabase MCP · jarvis_test schema · anon key only (never service role) · writes table contracts to AGENTS.md · schema-first in DAG
⑦ Memory Layer — GBrain (Persistent Knowledge Across Sessions)
🧠 GBrain Core
github.com/garrytan/gbrain · pgvector hybrid search · 29 built-in skills · self-wiring entity links · queried before every Gemma4 response · nightly gbrain dream consolidation · gbrain doctor health check
Bun runtime
☁️ Cloud Replica
Supabase Postgres · pgvector · RLS on every table · user_id scoped · jarvis_test schema · active when local machine offline · free tier 500MB
Supabase
💻 Local Replica
PGLite · activates when machine wakes · synced via gbrain migrate --to pglite · never raw file copy · zero network latency · primary when local is online
PGLite
↕ ↕ ↕
⑧ Execution Sandbox — Docker Containers Per Agent
🐳 jarvis-sandbox
Python 3.12-slim-bookworm · Playwright + Chromium · all agent runtimes · /workspace bind mount in WSL2 ext4 (not C:/ — avoids 9P slowdown) · JARVIS_SANDBOX_MODE=docker routes all shell calls here
docker-compose.yml
🟢 gbrain container
Isolated Bun server · GBrain memory endpoints · persistent volume · separate from agent runtime to avoid dependency conflicts
docker-compose.yml
🐧 WSL2 Ubuntu 24.04
Primary dev runtime · .venv_wsl · all scripts run here · project at /home/hasinrahman/jarvis (not /mnt/c/) · systemd units for prod · Podman Desktop as Docker Desktop alternative