How zaidbuilds/hey-jarvis works
Purpose and entry points
Jarvis is a Python 3.10+ local voice-controlled assistant for wake-word interaction, speech I/O, productivity actions, system automation, and LLM-assisted workflows. The documented launch is main.py; packaged/module startup is also represented by src/jarvis/main.py and src/jarvis/__main__.py. Runtime/service launch wrappers live in scripts/runtime/run.py and scripts/runtime/service_run.py.
Runtime composition
The central runtime is split between a legacy/core command path and newer service-oriented orchestration. Core state, commands, intent handling, automation, permissions, memory, and tool execution are concentrated in src/jarvis/core/orchestrator.py, src/jarvis/core/command.py, and src/jarvis/core/tool_executor.py. Service startup and platform assembly are handled by src/jarvis/services/startup.py, src/jarvis/services/platform.py, and src/jarvis/services/server.py.
Voice interaction pipeline
Audio input is gated by wake-word detection, transcribed to text, routed through intent/action logic, then returned through TTS. The primary boundary is src/jarvis/audio/wakeword.py, src/jarvis/audio/stt.py, and src/jarvis/audio/tts.py; higher-level coordination exists in src/jarvis/services/voice_orchestrator.py and src/jarvis/services/voice_service.py. Local speech-model artifacts are bundled under data/models/, while face-auth training assets reside in data/auth/.
AI, intent, and agents
Natural-language interpretation can use local Ollama or remote model adapters. Model selection is centralized in src/jarvis/models/router.py, with Gemini, Groq, and Ollama integrations at src/jarvis/models/gemini_model.py, src/jarvis/models/groq_model.py, and src/jarvis/models/ollama_model.py. Agentic decomposition is represented by src/jarvis/ai/agentic_engine.py and role-specific agents in src/jarvis/agents/intent_agent.py and src/jarvis/agents/execution_agent.py.
Planning, workflows, and managed agents
The system supports planning, scheduled/proactive work, and multi-step business workflows beyond simple commands. Planning and scheduling surfaces are src/jarvis/services/planner.py, src/jarvis/services/scheduler.py, and src/jarvis/services/workflows.py. The brain layer provides manifest-driven specialized agent workflows, including src/jarvis/brain/runtime.py, src/jarvis/brain/manifests.py, src/jarvis/brain/freelance_flow.py; corresponding role definitions are in configs/agent-manifests/.
Execution boundaries and extensibility
Actions flow from interpreted intent/plans to a tool catalog, policy checks, and executors rather than directly from model output to the host. Key enforcement points are src/jarvis/core/tool_catalog.py, src/jarvis/core/tool_policy.py, and src/jarvis/services/boundary.py. Concrete host/browser/filesystem operations are implemented under src/jarvis/tools/automation.py, src/jarvis/tools/browser.py, and src/jarvis/tools/file_ops.py. Plugin discovery and built-in capabilities use src/jarvis/plugins/registry.py and src/jarvis/plugins/builtin/.
State, clients, and surfaces
Persistent memory/database responsibilities are separated into src/jarvis/core/persistent_memory.py, src/jarvis/database/db.py, and src/jarvis/database/memory_db.py. The assistant exposes local API/UI bridge and client integration surfaces through src/jarvis/services/local_api.py, src/jarvis/services/ui_bridge.py, and src/jarvis/services/clients.py; a static dashboard exists at src/jarvis/ui/web/index.html. External dependencies include speech-recognition/TTS libraries, OpenAI/LangChain per README, optional Ollama, Gemini, and Groq model services, plus OS-level automation and browser integrations.
Main entry points: orchestrator.py Core command runtime · tool_catalog.py Tool catalog · platform.py Platform server · planner.py Planner & scheduler
Components 23
Entry & Platform
- Launch entry points · Script, module, and runtime wrappers start the assistant.
main.py - Service startup
src/jarvis/services/startup.py - Platform server
src/jarvis/services/platform.py
Voice Interaction
- Voice orchestration
src/jarvis/services/voice_orchestrator.py - Wake-word gate
src/jarvis/audio/wakeword.py - Speech-to-text · Uses bundled local speech models.
src/jarvis/audio/stt.py - Text-to-speech
src/jarvis/audio/tts.py
Intelligence & Workflows
- Core command runtime · Maintains command state and routes interpreted requests.
src/jarvis/core/orchestrator.py - Model router · Selects local Ollama or remote Gemini and Groq adapters.
src/jarvis/models/router.py - Agentic engine · Decomposes work through intent and execution agents.
src/jarvis/ai/agentic_engine.py - Planner & scheduler · Plans multi-step, scheduled, and business workflows.
src/jarvis/services/planner.py - Managed agent runtime · Runs specialized manifest-driven agent flows.
src/jarvis/brain/runtime.py - Agent manifests
configs/agent-manifests/1_Central_Control_Bot.json
Policy & Execution
- Tool catalog
src/jarvis/core/tool_catalog.py - Tool policy · Checks actions before host execution.
src/jarvis/core/tool_policy.py - Execution boundary
src/jarvis/services/boundary.py - Tool executor
src/jarvis/core/tool_executor.py - Host and browser tools · Provides automation, browser, and filesystem operations.
src/jarvis/tools/automation.py - Plugin registry · Discovers built-in and external capabilities.
src/jarvis/plugins/registry.py
State & Surfaces
- Persistent memory
src/jarvis/core/persistent_memory.py - Memory database
src/jarvis/database/memory_db.py - Local API and UI bridge · Connects local clients and the dashboard.
src/jarvis/services/local_api.py - Web dashboard
src/jarvis/ui/web/index.html
Connections 24
- Launch entry points → Service startup: starts services
- Service startup → Platform server: assembles
- Platform server → Voice orchestration: hosts
- Platform server → Local API and UI bridge: exposes
- Voice orchestration → Wake-word gate: listens
- Wake-word gate → Speech-to-text: on wake
- Speech-to-text → Core command runtime: transcript
- Core command runtime → Text-to-speech: response text
- Core command runtime → Model router: interprets requests
- Model router → Agentic engine: LLM assistance
- Agentic engine → Planner & scheduler: multi-step work
- Planner & scheduler → Managed agent runtime: managed workflows
- Agent manifests → Managed agent runtime: defines roles
- Core command runtime → Tool catalog: selects capability
- Planner & scheduler → Tool catalog: planned actions
- Tool catalog → Tool policy: requested tool
- Tool policy → Execution boundary: approved action
- Execution boundary → Tool executor: permits execution
- Tool executor → Host and browser tools: invokes
- Plugin registry → Tool catalog: registers tools
- Core command runtime → Persistent memory: reads and writes
- Persistent memory → Memory database: persists
- Local API and UI bridge → Core command runtime: client requests
- Local API and UI bridge → Web dashboard: serves bridge