# dev-pradhuman/aegis-jarvis architecture

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

- Interactive diagram: https://gitdiagram.com/dev-pradhuman/aegis-jarvis
- Repository: https://github.com/dev-pradhuman/aegis-jarvis

## Overview

JARVIS Galaxy is a local assistant console backed by a durable service. Its main user-to-result path is chat or a workspace action into the service, where requests can be routed to models or canonical tools and tracked as runs; approvals can pause execution for user action. The README also describes browser automation, workflows, reminders, capability discovery, and system telemetry. Some backend wiring is inferred only from module names and documentation because implementation excerpts are partial; uncertain links are omitted.

Main entry points: [`server/router.js`](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/router.js) (API routes), [`server/orchestrator.js`](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/orchestrator.js) (Request orchestration), [`server/toolRuntime.js`](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/toolRuntime.js) (Tool runtime), [`server/workflowEngine.js`](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/workflowEngine.js) (Workflow execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Galaxy interface"]
  node_galaxy["Galaxy home<br/>[GalaxyHome.jsx]"]
  node_windows["Workspace windows<br/>[WindowManager.jsx]"]
  node_chat["Chat interface<br/>[Chat.jsx]"]
  node_workspace["Workspace views<br/>[WorkspaceViews.jsx]"]
end

subgraph group_service["Service boundary"]
  node_api["HTTP service<br/>[index.js]"]
  node_router["API routes<br/>[router.js]"]
  node_orchestrator["Request orchestration<br/>[orchestrator.js]"]
  node_runs["Run lifecycle<br/>[runEngine.js]"]
  node_workflow["Workflow execution<br/>[workflowEngine.js]"]
  node_approvals["Approval handling"]
  node_metrics["System metrics<br/>[systemMetrics.js]"]
end

subgraph group_intelligence["Assistant intelligence"]
  node_brain["Brain sources<br/>[brainService.js]"]
  node_modelrouter["Model routing"]
  node_providers["Model providers<br/>[providerClient.js]"]
end

subgraph group_execution["Execution capabilities"]
  node_tools["Tool runtime<br/>[toolRuntime.js]"]
  node_browser["Browser automation<br/>[BrowserManager.js]"]
  node_platform["Desktop capabilities<br/>[index.js]"]
  node_reminders["Reminder scheduler<br/>[scheduler.js]"]
  node_research["Research workflow"]
  node_media["Media generation<br/>[mediaGeneration.js]"]
end

subgraph group_state["Durable state"]
  node_store[("Persistent state<br/>[store.js]")]
end

node_user(("User"))
node_modelservice(("Model services"))
node_host(("Host desktop"))

node_user -->|"uses"| node_galaxy
node_galaxy -->|"opens workspaces"| node_windows
node_windows -->|"shows chat"| node_chat
node_windows -->|"shows modules"| node_workspace
node_chat -->|"sends chat"| node_api
node_workspace -->|"requests workspace data"| node_api
node_api -->|"dispatches requests"| node_router
node_router -->|"routes commands"| node_orchestrator
node_orchestrator -->|"gets intelligence"| node_brain
node_brain -->|"selects models"| node_modelrouter
node_modelrouter -->|"dispatches inference"| node_providers
node_providers -.->|"requests inference"| node_modelservice
node_orchestrator -->|"tracks execution"| node_runs
node_orchestrator -->|"invokes tools"| node_tools
node_tools -->|"dispatches browser actions"| node_browser
node_tools -->|"dispatches desktop actions"| node_platform
node_platform -->|"controls desktop"| node_host
node_workflow -->|"invokes canonical tools"| node_tools
node_workflow -->|"synchronizes run state"| node_runs
node_approvals -->|"resumes approved work"| node_workflow
node_reminders -->|"attempts notifications"| node_tools
node_router -->|"serves research"| node_research
node_router -->|"serves media jobs"| node_media
node_router -->|"serves metrics"| node_metrics
node_orchestrator -->|"persists state"| node_store
node_workflow -->|"updates workflow state"| node_store
node_reminders -->|"claims reminders"| node_store
node_router -->|"reads and writes state"| node_store

click node_galaxy "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/src/components/GalaxyHome.jsx"
click node_windows "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/src/galaxy/WindowManager.jsx"
click node_chat "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/src/components/Chat.jsx"
click node_workspace "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/src/components/WorkspaceViews.jsx"
click node_api "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/index.js"
click node_router "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/router.js"
click node_orchestrator "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/orchestrator.js"
click node_runs "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/runEngine.js"
click node_workflow "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/workflowEngine.js"
click node_approvals "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/approvalContinuation.js"
click node_brain "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/brainService.js"
click node_modelrouter "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/modelRouterService.js"
click node_providers "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/providerClient.js"
click node_tools "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/toolRuntime.js"
click node_browser "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/browser/BrowserManager.js"
click node_platform "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/platform/index.js"
click node_reminders "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/scheduler.js"
click node_research "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/researchWorkflow.js"
click node_media "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/mediaGeneration.js"
click node_store "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/store.js"
click node_metrics "https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/systemMetrics.js"

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_galaxy,node_windows,node_chat,node_workspace,node_user toneBlue
class node_api,node_router,node_orchestrator,node_runs,node_workflow,node_approvals,node_metrics toneAmber
class node_brain,node_modelrouter,node_providers toneMint
class node_tools,node_browser,node_platform,node_reminders,node_research,node_media toneRose
class node_store,node_modelservice,node_host toneIndigo
```

## Components

### Galaxy interface

- [Galaxy home](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/src/components/GalaxyHome.jsx): `src/components/GalaxyHome.jsx`
- [Workspace windows](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/src/galaxy/WindowManager.jsx): `src/galaxy/WindowManager.jsx`
- [Chat interface](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/src/components/Chat.jsx): `src/components/Chat.jsx`
- [Workspace views](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/src/components/WorkspaceViews.jsx): `src/components/WorkspaceViews.jsx`

### Service boundary

- [HTTP service](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/index.js): `server/index.js`
- [API routes](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/router.js): `server/router.js`
- [Request orchestration](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/orchestrator.js): `server/orchestrator.js`
- [Run lifecycle](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/runEngine.js): `server/runEngine.js`
- [Workflow execution](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/workflowEngine.js): `server/workflowEngine.js`
- [Approval handling](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/approvalContinuation.js): `server/approvalContinuation.js`
- [System metrics](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/systemMetrics.js): `server/systemMetrics.js`

### Assistant intelligence

- [Brain sources](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/brainService.js): `server/brainService.js`
- [Model routing](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/modelRouterService.js): `server/modelRouterService.js`
- [Model providers](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/providerClient.js): `server/providerClient.js`

### Execution capabilities

- [Tool runtime](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/toolRuntime.js): `server/toolRuntime.js`
- [Browser automation](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/browser/BrowserManager.js): `server/browser/BrowserManager.js`
- [Desktop capabilities](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/platform/index.js): `server/platform/index.js`
- [Reminder scheduler](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/scheduler.js): `server/scheduler.js`
- [Research workflow](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/researchWorkflow.js): `server/researchWorkflow.js`
- [Media generation](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/mediaGeneration.js): `server/mediaGeneration.js`

### Durable state

- [Persistent state](https://github.com/dev-pradhuman/aegis-jarvis/blob/main/server/store.js): `server/store.js`

### Other components

- **User**
- **Model services**
- **Host desktop**

## Connections

- User → Galaxy home: uses
- Galaxy home → Workspace windows: opens workspaces
- Workspace windows → Chat interface: shows chat
- Workspace windows → Workspace views: shows modules
- Chat interface → HTTP service: sends chat
- Workspace views → HTTP service: requests workspace data
- HTTP service → API routes: dispatches requests
- API routes → Request orchestration: routes commands
- Request orchestration → Brain sources: gets intelligence
- Brain sources → Model routing: selects models
- Model routing → Model providers: dispatches inference
- Model providers → Model services: requests inference
- Request orchestration → Run lifecycle: tracks execution
- Request orchestration → Tool runtime: invokes tools
- Tool runtime → Browser automation: dispatches browser actions
- Tool runtime → Desktop capabilities: dispatches desktop actions
- Desktop capabilities → Host desktop: controls desktop
- Workflow execution → Tool runtime: invokes canonical tools
- Workflow execution → Run lifecycle: synchronizes run state
- Approval handling → Workflow execution: resumes approved work
- Reminder scheduler → Tool runtime: attempts notifications
- API routes → Research workflow: serves research
- API routes → Media generation: serves media jobs
- API routes → System metrics: serves metrics
- Request orchestration → Persistent state: persists state
- Workflow execution → Persistent state: updates workflow state
- Reminder scheduler → Persistent state: claims reminders
- API routes → Persistent state: reads and writes state
