# vigneshwaran484/jarvis architecture

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

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

## Overview

Jarvis is a desktop voice assistant. In the main V2 workflow, a user wakes the assistant, speaks a command, and the background agent asks a local Ollama model whether to invoke a tool or answer; tool results return to the agent, which speaks the final response. The Tkinter reactor displays assistant state. The repository also has a separate console-only V1 agent. Tool implementations and V2 orchestration share one large file. The README documents capabilities beyond the sampled excerpts; links to those features are included only where the README supports them.

Main entry points: [`agent_v2.py`](https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py) (ReAct reasoning loop), [`agent_v1.py`](https://github.com/vigneshwaran484/jarvis/blob/main/agent_v1.py) (Console agent), [`wakeword.py`](https://github.com/vigneshwaran484/jarvis/blob/main/wakeword.py) (Wake listener), [`config.py`](https://github.com/vigneshwaran484/jarvis/blob/main/config.py) (Runtime configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Voice and interface"]
  node_wake["Wake listener<br/>[wakeword.py]"]
  node_speech["Speech input and TTS<br/>[agent_v2.py]"]
  node_reactor["Arc Reactor GUI<br/>[reactor.py]"]
end

subgraph group_agent["Agent runtime"]
  node_v2["Voice agent<br/>[agent_v2.py]"]
  node_config["Runtime configuration<br/>[config.py]"]
  node_llm["ReAct reasoning loop<br/>[agent_v2.py]"]
  node_v1["Console agent<br/>[agent_v1.py]"]
end

subgraph group_tools["Assistant tools"]
  node_app_tools["App control<br/>[agent_v2.py]"]
  node_web_weather["Web and weather<br/>[agent_v2.py]"]
  node_system_tools["System controls<br/>[agent_v2.py]"]
  node_screen_tools["Screen capture<br/>[agent_v2.py]"]
  node_file_tools["File operations<br/>[agent_v2.py]"]
end

subgraph group_integrations["External integrations"]
  node_ollama["Ollama"]
  node_speech_services["Speech services"]
  node_desktop["Desktop and OS"]
  node_web_services["Web services"]
end

node_user(("User"))

node_user -->|"says wake word"| node_wake
node_wake -->|"activates"| node_v2
node_v2 -->|"captures and speaks"| node_speech
node_v2 -->|"runs"| node_llm
node_llm -->|"requests inference"| node_ollama
node_llm -->|"dispatches tools"| node_app_tools
node_llm -->|"dispatches tools"| node_web_weather
node_llm -->|"dispatches tools"| node_system_tools
node_llm -->|"dispatches tools"| node_screen_tools
node_llm -->|"dispatches tools"| node_file_tools
node_speech -->|"uses TTS and recognition"| node_speech_services
node_speech -->|"plays audio"| node_desktop
node_app_tools -.->|"controls apps"| node_desktop
node_system_tools -.->|"reads and controls"| node_desktop
node_screen_tools -->|"captures screen"| node_desktop
node_web_weather -->|"queries services"| node_web_services
node_v2 -->|"updates state"| node_reactor
node_v2 -->|"loads settings"| node_config
node_wake -->|"reads wake settings"| node_config
node_v1 -->|"requests inference"| node_ollama
node_v1 -->|"loads app allowlist"| node_config
node_v1 -->|"accepts console input"| node_user

click node_v2 "https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py"
click node_wake "https://github.com/vigneshwaran484/jarvis/blob/main/wakeword.py"
click node_speech "https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py"
click node_reactor "https://github.com/vigneshwaran484/jarvis/blob/main/reactor.py"
click node_config "https://github.com/vigneshwaran484/jarvis/blob/main/config.py"
click node_llm "https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py"
click node_v1 "https://github.com/vigneshwaran484/jarvis/blob/main/agent_v1.py"
click node_app_tools "https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py"
click node_web_weather "https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py"
click node_system_tools "https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py"
click node_screen_tools "https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py"
click node_file_tools "https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.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_wake,node_speech,node_reactor,node_user toneBlue
class node_v2,node_config,node_llm,node_v1 toneAmber
class node_app_tools,node_web_weather,node_system_tools,node_screen_tools,node_file_tools toneMint
class node_ollama,node_speech_services,node_desktop,node_web_services toneRose
```

## Components

### Voice and interface

- [Wake listener](https://github.com/vigneshwaran484/jarvis/blob/main/wakeword.py): `wakeword.py`
- [Speech input and TTS](https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py): `agent_v2.py`
- [Arc Reactor GUI](https://github.com/vigneshwaran484/jarvis/blob/main/reactor.py): `reactor.py`

### Agent runtime

- [Voice agent](https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py): `agent_v2.py`
- [Runtime configuration](https://github.com/vigneshwaran484/jarvis/blob/main/config.py): `config.py`
- [ReAct reasoning loop](https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py): `agent_v2.py`
- [Console agent](https://github.com/vigneshwaran484/jarvis/blob/main/agent_v1.py): `agent_v1.py`

### Assistant tools

- [App control](https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py): `agent_v2.py`
- [Web and weather](https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py): `agent_v2.py`
- [System controls](https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py): `agent_v2.py`
- [Screen capture](https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py): `agent_v2.py`
- [File operations](https://github.com/vigneshwaran484/jarvis/blob/main/agent_v2.py): `agent_v2.py`

### External integrations

- **Ollama**
- **Speech services**
- **Desktop and OS**
- **Web services**

### Other components

- **User**

## Connections

- User → Wake listener: says wake word (evidence: `README.md`)
- Wake listener → Voice agent: activates (evidence: `README.md`)
- Voice agent → Speech input and TTS: captures and speaks (evidence: `README.md`)
- Voice agent → ReAct reasoning loop: runs (evidence: `agent_v2.py`)
- ReAct reasoning loop → Ollama: requests inference (evidence: `agent_v2.py`)
- ReAct reasoning loop → App control: dispatches tools (evidence: `agent_v2.py`)
- ReAct reasoning loop → Web and weather: dispatches tools (evidence: `agent_v2.py`)
- ReAct reasoning loop → System controls: dispatches tools (evidence: `agent_v2.py`)
- ReAct reasoning loop → Screen capture: dispatches tools (evidence: `agent_v2.py`)
- ReAct reasoning loop → File operations: dispatches tools (evidence: `agent_v2.py`)
- Speech input and TTS → Speech services: uses TTS and recognition (evidence: `README.md`)
- Speech input and TTS → Desktop and OS: plays audio (evidence: `agent_v2.py`)
- App control → Desktop and OS: controls apps
- System controls → Desktop and OS: reads and controls
- Screen capture → Desktop and OS: captures screen (evidence: `agent_v2.py`)
- Web and weather → Web services: queries services (evidence: `agent_v2.py`)
- Voice agent → Arc Reactor GUI: updates state (evidence: `README.md`)
- Voice agent → Runtime configuration: loads settings (evidence: `agent_v2.py`)
- Wake listener → Runtime configuration: reads wake settings (evidence: `wakeword.py`)
- Console agent → Ollama: requests inference (evidence: `agent_v1.py`)
- Console agent → Runtime configuration: loads app allowlist (evidence: `agent_v1.py`)
- Console agent → User: accepts console input (evidence: `README.md`)
