# nimbus-agent/nimbus architecture

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

- Interactive diagram: https://gitdiagram.com/nimbus-agent/nimbus
- Repository: https://github.com/nimbus-agent/nimbus

## Overview

Nimbus is a local-first on-call intelligence and DevOps agent. The principal workflow starts with an engineer querying through the CLI, passes through the local Gateway to indexed cross-tool context and domain agents, then returns an answer; any outbound or destructive action is consent-gated. Other documented capabilities include connector synchronization, incident assembly, scheduled workflows and watchers, MCP access, and desktop/admin interfaces. Some subsystem paths and connections are based on README statements rather than sampled implementation, so those links cite the README.

Main entry points: [`packages/gateway/src`](https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src) (Gateway), [`packages/cli/src/lib/with-gateway-ipc.ts`](https://github.com/nimbus-agent/nimbus/blob/main/packages/cli/src/lib/with-gateway-ipc.ts) (Gateway IPC), [`packages/gateway/src/index`](https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src/index) (Local index), [`packages/cli/src/index.ts`](https://github.com/nimbus-agent/nimbus/blob/main/packages/cli/src/index.ts) (Nimbus CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User interfaces"]
  node_cli["Nimbus CLI<br/>[index.ts]"]
  node_tui["Terminal UI<br/>[App.tsx]"]
  node_desktop["Desktop UI<br/>[App.tsx]"]
  node_admin["Admin console<br/>[main.ts]"]
end

subgraph group_gateway["Gateway runtime"]
  node_ipc["Gateway IPC"]
  node_gatewaycore["Gateway"]
end

subgraph group_context["Indexed context"]
  node_index[("Local index")]
  node_connectors["Tool connectors"]
  node_embeddings["Embedding pipeline<br/>[pipeline.ts]"]
  node_query["Index query<br/>[query.ts]"]
end

subgraph group_operations["Agents and automation"]
  node_agents["Domain agents"]
  node_incident["Incident engine<br/>[incident-engine.ts]"]
  node_workflow["Workflow automation"]
  node_watchers["Watchers<br/>[watcher-engine.ts]"]
end

subgraph group_governance["Consent and integrations"]
  node_hitl{{"Approval gate"}}
  node_audit[("Audit ledger")]
  node_mcp["MCP surfaces"]
end

node_engineer(("Engineer"))
node_tools["Connected services"]
node_llm["Remote model"]

node_engineer -->|"queries"| node_cli
node_cli -->|"calls"| node_ipc
node_ipc -->|"requests"| node_gatewaycore
node_gatewaycore -->|"maintains"| node_index
node_connectors -->|"syncs from"| node_tools
node_gatewaycore -->|"drives"| node_connectors
node_cli -->|"dispatches"| node_query
node_query -->|"requests rows"| node_ipc
node_agents -.->|"uses context"| node_index
node_gatewaycore -->|"hosts"| node_agents
node_gatewaycore -.->|"runs"| node_incident
node_incident -->|"assembles incidents"| node_index
node_gatewaycore -->|"executes plans"| node_workflow
node_workflow -->|"requests approval"| node_hitl
node_gatewaycore -->|"evaluates"| node_watchers
node_watchers -->|"reads items"| node_index
node_gatewaycore -.->|"builds vectors"| node_embeddings
node_embeddings -->|"writes vectors"| node_index
node_hitl -->|"records actions"| node_audit
node_gatewaycore -->|"exposes tools"| node_mcp
node_mcp -->|"serves agents"| node_engineer
node_desktop -->|"queries gateway"| node_ipc
node_tui -.->|"uses IPC"| node_ipc
node_admin -.->|"loads status"| node_gatewaycore
node_agents -.->|"may invoke"| node_llm

click node_cli "https://github.com/nimbus-agent/nimbus/blob/main/packages/cli/src/index.ts"
click node_tui "https://github.com/nimbus-agent/nimbus/blob/main/packages/cli/src/tui/App.tsx"
click node_desktop "https://github.com/nimbus-agent/nimbus/blob/main/packages/ui/src/App.tsx"
click node_admin "https://github.com/nimbus-agent/nimbus/blob/main/packages/admin-console/src/main.ts"
click node_ipc "https://github.com/nimbus-agent/nimbus/blob/main/packages/cli/src/lib/with-gateway-ipc.ts"
click node_gatewaycore "https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src"
click node_index "https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src/index"
click node_connectors "https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src/connectors"
click node_embeddings "https://github.com/nimbus-agent/nimbus/blob/main/packages/gateway/src/embedding/pipeline.ts"
click node_query "https://github.com/nimbus-agent/nimbus/blob/main/packages/cli/src/commands/query.ts"
click node_agents "https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src/agents"
click node_incident "https://github.com/nimbus-agent/nimbus/blob/main/packages/gateway/src/incident/incident-engine.ts"
click node_workflow "https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src/automation"
click node_watchers "https://github.com/nimbus-agent/nimbus/blob/main/packages/gateway/src/automation/watcher-engine.ts"
click node_hitl "https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src"
click node_audit "https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src/audit"
click node_mcp "https://github.com/nimbus-agent/nimbus/tree/main/packages/cli/src/mcp"

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_cli,node_tui,node_desktop,node_admin toneBlue
class node_ipc,node_gatewaycore toneAmber
class node_index,node_connectors,node_embeddings,node_query toneMint
class node_agents,node_incident,node_workflow,node_watchers toneRose
class node_hitl,node_audit,node_mcp,node_engineer,node_tools,node_llm toneIndigo
```

## Components

### User interfaces

- [Nimbus CLI](https://github.com/nimbus-agent/nimbus/blob/main/packages/cli/src/index.ts): `packages/cli/src/index.ts`
- [Terminal UI](https://github.com/nimbus-agent/nimbus/blob/main/packages/cli/src/tui/App.tsx): `packages/cli/src/tui/App.tsx`
- [Desktop UI](https://github.com/nimbus-agent/nimbus/blob/main/packages/ui/src/App.tsx): `packages/ui/src/App.tsx`
- [Admin console](https://github.com/nimbus-agent/nimbus/blob/main/packages/admin-console/src/main.ts): `packages/admin-console/src/main.ts`

### Gateway runtime

- [Gateway IPC](https://github.com/nimbus-agent/nimbus/blob/main/packages/cli/src/lib/with-gateway-ipc.ts): `packages/cli/src/lib/with-gateway-ipc.ts`
- [Gateway](https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src): `packages/gateway/src`

### Indexed context

- [Local index](https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src/index): `packages/gateway/src/index`
- [Tool connectors](https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src/connectors): `packages/gateway/src/connectors`
- [Embedding pipeline](https://github.com/nimbus-agent/nimbus/blob/main/packages/gateway/src/embedding/pipeline.ts): `packages/gateway/src/embedding/pipeline.ts`
- [Index query](https://github.com/nimbus-agent/nimbus/blob/main/packages/cli/src/commands/query.ts): `packages/cli/src/commands/query.ts`

### Agents and automation

- [Domain agents](https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src/agents): `packages/gateway/src/agents`
- [Incident engine](https://github.com/nimbus-agent/nimbus/blob/main/packages/gateway/src/incident/incident-engine.ts): `packages/gateway/src/incident/incident-engine.ts`
- [Workflow automation](https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src/automation): `packages/gateway/src/automation`
- [Watchers](https://github.com/nimbus-agent/nimbus/blob/main/packages/gateway/src/automation/watcher-engine.ts): `packages/gateway/src/automation/watcher-engine.ts`

### Consent and integrations

- [Approval gate](https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src): `packages/gateway/src`
- [Audit ledger](https://github.com/nimbus-agent/nimbus/tree/main/packages/gateway/src/audit): `packages/gateway/src/audit`
- [MCP surfaces](https://github.com/nimbus-agent/nimbus/tree/main/packages/cli/src/mcp): `packages/cli/src/mcp`

### Other components

- **Engineer**
- **Connected services**
- **Remote model**

## Connections

- Engineer → Nimbus CLI: queries
- Nimbus CLI → Gateway IPC: calls
- Gateway IPC → Gateway: requests (evidence: `packages/cli/src/lib/with-gateway-ipc.ts`)
- Gateway → Local index: maintains (evidence: `packages/gateway/src/automation/watcher-engine.ts`)
- Tool connectors → Connected services: syncs from
- Gateway → Tool connectors: drives (evidence: `packages/gateway/src/connectors/_lib/gitlab/pipelines.ts`)
- Nimbus CLI → Index query: dispatches (evidence: `packages/cli/src/commands/query.ts`)
- Index query → Gateway IPC: requests rows (evidence: `packages/cli/src/commands/query.ts`)
- Domain agents → Local index: uses context
- Gateway → Domain agents: hosts
- Gateway → Incident engine: runs (evidence: `packages/gateway/src/incident/__fixtures__/test-engine.ts`)
- Incident engine → Local index: assembles incidents (evidence: `packages/gateway/src/incident/incident-engine.ts`)
- Gateway → Workflow automation: executes plans (evidence: `packages/gateway/src/automation/watcher-engine.ts`)
- Workflow automation → Approval gate: requests approval (evidence: `packages/gateway/src/automation/watcher-engine.ts`)
- Gateway → Watchers: evaluates (evidence: `packages/gateway/src/automation/watcher-engine.ts`)
- Watchers → Local index: reads items (evidence: `packages/gateway/src/automation/watcher-engine.ts`)
- Gateway → Embedding pipeline: builds vectors (evidence: `packages/gateway/src/embedding/pipeline.ts`)
- Embedding pipeline → Local index: writes vectors (evidence: `packages/gateway/src/embedding/pipeline.ts`)
- Approval gate → Audit ledger: records actions
- Gateway → MCP surfaces: exposes tools
- MCP surfaces → Engineer: serves agents
- Desktop UI → Gateway IPC: queries gateway
- Terminal UI → Gateway IPC: uses IPC
- Admin console → Gateway: loads status
- Domain agents → Remote model: may invoke
