# ankitjha67/jarvis architecture

> Architecture diagram of the GitHub repository ankitjha67/jarvis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ankitjha67/jarvis
- Repository: https://github.com/ankitjha67/jarvis

## Overview

JARVIS is a personal desktop AI assistant: a user submits a voice or keyboard request through the HUD, the core routes it to an LLM or fast path, and registered tools can act on the computer under authorization policy. The repository also includes research, background tasks, persistent conversation/state, voice, scheduling, and settings capabilities. The UI-to-core gateway implementation was not sampled, so that connection is shown as unverified; other edges are limited to relationships visible in excerpts, the source index, or README.

Main entry points: [`src/jarvis/orchestrator.py`](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/orchestrator.py) (Request orchestrator), [`ui/src/socket.ts`](https://github.com/ankitjha67/jarvis/blob/master/ui/src/socket.ts) (WebSocket client), [`ui/src/App.tsx`](https://github.com/ankitjha67/jarvis/blob/master/ui/src/App.tsx) (HUD application), [`src/jarvis/host/__init__.py`](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/host/__init__.py) (OS abstraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["HUD and setup"]
  node_hud["HUD application<br/>[App.tsx]"]
  node_onboarding["Onboarding<br/>[Onboarding.tsx]"]
  node_settings["Settings<br/>[Settings.tsx]"]
  node_socket["WebSocket client<br/>[socket.ts]"]
  node_ui_state["HUD state<br/>[store.ts]"]
end

subgraph group_runtime["Assistant runtime"]
  node_gateway["Core gateway<br/>[gateway.py]"]
  node_orchestrator["Request orchestrator<br/>[orchestrator.py]"]
  node_fastpath["Fast-path intents<br/>[fast_path.py]"]
  node_provider_router["Provider routing<br/>[router.py]"]
  node_provider_api["Provider interface<br/>[base.py]"]
  node_policy["Action authorization<br/>[policy.py]"]
end

subgraph group_capabilities["Tools and services"]
  node_tool_registry["Tool registry<br/>[registry.py]"]
  node_computer_tools["Computer-control tools"]
  node_research["Deep research<br/>[deep_research.py]"]
  node_research_tools["Research tools<br/>[research_tools.py]"]
  node_background["Background tasks"]
  node_voice["Voice and wake<br/>[wake.py]"]
  node_scheduler["Schedules and routines<br/>[scheduler.py]"]
end

subgraph group_platform["Platform and state"]
  node_store[("Persistent state<br/>[store.py]")]
  node_config["Configuration<br/>[config.py]"]
  node_host["OS abstraction<br/>[__init__.py]"]
  node_macos["macOS host<br/>[_macos.py]"]
  node_windows["Windows host<br/>[_windows.py]"]
end

node_user(("User"))

node_user -->|"submits requests"| node_hud
node_hud -->|"shows setup"| node_onboarding
node_hud -->|"sends commands"| node_socket
node_settings -->|"sends settings"| node_socket
node_socket -->|"applies messages"| node_ui_state
node_socket -.->|"exchanges messages"| node_gateway
node_orchestrator -->|"requests completions"| node_provider_router
node_orchestrator -->|"checks intents"| node_fastpath
node_orchestrator -->|"uses persistence"| node_store
node_orchestrator -->|"reads settings"| node_config
node_provider_router -->|"creates providers"| node_provider_api
node_tool_registry -->|"uses risk tiers"| node_policy
node_research_tools -->|"starts research"| node_research
node_host -->|"selects platform"| node_macos
node_host -->|"selects platform"| node_windows

click node_hud "https://github.com/ankitjha67/jarvis/blob/master/ui/src/App.tsx"
click node_onboarding "https://github.com/ankitjha67/jarvis/blob/master/ui/src/Onboarding.tsx"
click node_settings "https://github.com/ankitjha67/jarvis/blob/master/ui/src/Settings.tsx"
click node_socket "https://github.com/ankitjha67/jarvis/blob/master/ui/src/socket.ts"
click node_ui_state "https://github.com/ankitjha67/jarvis/blob/master/ui/src/store.ts"
click node_gateway "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/gateway.py"
click node_orchestrator "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/orchestrator.py"
click node_fastpath "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/fast_path.py"
click node_provider_router "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/providers/router.py"
click node_provider_api "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/providers/base.py"
click node_policy "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/policy.py"
click node_tool_registry "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/tools/registry.py"
click node_computer_tools "https://github.com/ankitjha67/jarvis/tree/master/src/jarvis/tools"
click node_research "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/deep_research.py"
click node_research_tools "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/tools/research_tools.py"
click node_background "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/background_tasks.py"
click node_voice "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/wake.py"
click node_scheduler "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/scheduler.py"
click node_store "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/store.py"
click node_config "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/config.py"
click node_host "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/host/__init__.py"
click node_macos "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/host/_macos.py"
click node_windows "https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/host/_windows.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_hud,node_onboarding,node_settings,node_socket,node_ui_state,node_user toneBlue
class node_gateway,node_orchestrator,node_fastpath,node_provider_router,node_provider_api,node_policy toneAmber
class node_tool_registry,node_computer_tools,node_research,node_research_tools,node_background,node_voice,node_scheduler toneMint
class node_store,node_config,node_host,node_macos,node_windows toneRose
```

## Components

### HUD and setup

- [HUD application](https://github.com/ankitjha67/jarvis/blob/master/ui/src/App.tsx): `ui/src/App.tsx`
- [Onboarding](https://github.com/ankitjha67/jarvis/blob/master/ui/src/Onboarding.tsx): `ui/src/Onboarding.tsx`
- [Settings](https://github.com/ankitjha67/jarvis/blob/master/ui/src/Settings.tsx): `ui/src/Settings.tsx`
- [WebSocket client](https://github.com/ankitjha67/jarvis/blob/master/ui/src/socket.ts): `ui/src/socket.ts`
- [HUD state](https://github.com/ankitjha67/jarvis/blob/master/ui/src/store.ts): `ui/src/store.ts`

### Assistant runtime

- [Core gateway](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/gateway.py): `src/jarvis/gateway.py`
- [Request orchestrator](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/orchestrator.py): `src/jarvis/orchestrator.py`
- [Fast-path intents](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/fast_path.py): `src/jarvis/fast_path.py`
- [Provider routing](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/providers/router.py): `src/jarvis/providers/router.py`
- [Provider interface](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/providers/base.py): `src/jarvis/providers/base.py`
- [Action authorization](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/policy.py): `src/jarvis/policy.py`

### Tools and services

- [Tool registry](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/tools/registry.py): `src/jarvis/tools/registry.py`
- [Computer-control tools](https://github.com/ankitjha67/jarvis/tree/master/src/jarvis/tools): `src/jarvis/tools`
- [Deep research](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/deep_research.py): `src/jarvis/deep_research.py`
- [Research tools](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/tools/research_tools.py): `src/jarvis/tools/research_tools.py`
- [Background tasks](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/background_tasks.py): `src/jarvis/background_tasks.py`
- [Voice and wake](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/wake.py): `src/jarvis/wake.py`
- [Schedules and routines](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/scheduler.py): `src/jarvis/scheduler.py`

### Platform and state

- [Persistent state](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/store.py): `src/jarvis/store.py`
- [Configuration](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/config.py): `src/jarvis/config.py`
- [OS abstraction](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/host/__init__.py): `src/jarvis/host/__init__.py`
- [macOS host](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/host/_macos.py): `src/jarvis/host/_macos.py`
- [Windows host](https://github.com/ankitjha67/jarvis/blob/master/src/jarvis/host/_windows.py): `src/jarvis/host/_windows.py`

### Other components

- **User**

## Connections

- User → HUD application: submits requests
- HUD application → Onboarding: shows setup (evidence: `ui/src/App.tsx`)
- HUD application → WebSocket client: sends commands (evidence: `ui/src/App.tsx`)
- Settings → WebSocket client: sends settings (evidence: `ui/src/Settings.tsx`)
- WebSocket client → HUD state: applies messages (evidence: `ui/src/socket.ts`)
- WebSocket client → Core gateway: exchanges messages
- Request orchestrator → Provider routing: requests completions (evidence: `src/jarvis/orchestrator.py`)
- Request orchestrator → Fast-path intents: checks intents (evidence: `src/jarvis/orchestrator.py`)
- Request orchestrator → Persistent state: uses persistence (evidence: `src/jarvis/orchestrator.py`)
- Request orchestrator → Configuration: reads settings (evidence: `src/jarvis/orchestrator.py`)
- Provider routing → Provider interface: creates providers (evidence: `src/jarvis/providers/router.py`)
- Tool registry → Action authorization: uses risk tiers (evidence: `src/jarvis/tools/registry.py`)
- Research tools → Deep research: starts research (evidence: `src/jarvis/tools/research_tools.py`)
- OS abstraction → macOS host: selects platform (evidence: `src/jarvis/host/__init__.py`)
- OS abstraction → Windows host: selects platform (evidence: `src/jarvis/host/__init__.py`)
