# milind-soni/openmausbot architecture

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

- Interactive diagram: https://gitdiagram.com/milind-soni/openmausbot
- Repository: https://github.com/milind-soni/openmausbot

## Overview

OpenMausBot is a local-first desktop chat application for a roster of AI agents, each configured with its own model, computer, and connected apps. The main user flow is chatting with a bot, whose agent runs through a local harness and can use computer or app integrations; users can also configure engine accounts and synchronize cloud files. The graph includes documented product capabilities and substantial runtime areas from the tree. Some relationships are documented only at a high level; unsampled source is not treated as inspected.

Main entry points: [`src/App.tsx`](https://github.com/milind-soni/openmausbot/blob/main/src/App.tsx) (Chat app), [`server/headless/main.ts`](https://github.com/milind-soni/openmausbot/blob/main/server/headless/main.ts) (Local harness), [`src/components/EngineSetup.tsx`](https://github.com/milind-soni/openmausbot/blob/main/src/components/EngineSetup.tsx) (Engine setup), [`companion/src/routes.ts`](https://github.com/milind-soni/openmausbot/blob/main/companion/src/routes.ts) (Companion routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop chat"]
  node_app["Chat app<br/>[App.tsx]"]
  node_state["App state<br/>[store.tsx]"]
  node_engine_ui["Engine setup<br/>[EngineSetup.tsx]"]
  node_install_state["Install state<br/>[engine-install.ts]"]
end

subgraph group_agents["Agents and engines"]
  node_local_server["Local harness<br/>[main.ts]"]
  node_task_routes["Task routes<br/>[tasks.ts]"]
  node_engine_contracts["Engine contracts<br/>[contracts.ts]"]
  node_engine_homes["Engine homes<br/>[engine-homes.ts]"]
  node_engine_standalone["Standalone engines"]
end

subgraph group_computers["Computer access"]
  node_browser_engine["Browser engine<br/>[browser-engine.ts]"]
  node_browser_router["Browser routing<br/>[engines.ts]"]
  node_computer_routes["Computer routes<br/>[routes.ts]"]
  node_composio_broker["Composio broker<br/>[index.ts]"]
  node_companion["Companion routes<br/>[routes.ts]"]
end

subgraph group_cloud["Cloud and sharing"]
  node_cloud_sync["Cloud sync"]
  node_cloud_client["Cloud API client"]
  node_control_plane["Control plane<br/>[index.ts]"]
end

subgraph group_services["Supporting services"]
  node_relay["Relay server<br/>[server.ts]"]
  node_atomic["Atomic writes<br/>[atomic.ts]"]
  node_enterprise["Workspace access"]
end

node_user(("Person"))

node_user -->|"chats with"| node_app
node_app -->|"uses state"| node_state
node_user -->|"configures engines"| node_engine_ui
node_engine_ui -->|"updates install status"| node_install_state
node_app -.->|"sends agent work"| node_local_server
node_local_server -.->|"routes tasks"| node_task_routes
node_local_server -.->|"uses contracts"| node_engine_contracts
node_engine_homes -->|"uses contracts"| node_engine_contracts
node_browser_router -->|"routes Chrome sessions"| node_browser_engine
node_user -.->|"uses bot computer"| node_computer_routes
node_user -->|"connects apps"| node_composio_broker
node_user -.->|"uses companion"| node_companion
node_cloud_sync -->|"transfers files"| node_cloud_client
node_user -.->|"syncs cloud files"| node_cloud_sync
node_companion -.->|"uses control plane"| node_control_plane
node_relay -.->|"uses control plane"| node_control_plane

click node_app "https://github.com/milind-soni/openmausbot/blob/main/src/App.tsx"
click node_state "https://github.com/milind-soni/openmausbot/blob/main/src/state/store.tsx"
click node_engine_ui "https://github.com/milind-soni/openmausbot/blob/main/src/components/EngineSetup.tsx"
click node_install_state "https://github.com/milind-soni/openmausbot/blob/main/src/state/engine-install.ts"
click node_local_server "https://github.com/milind-soni/openmausbot/blob/main/server/headless/main.ts"
click node_task_routes "https://github.com/milind-soni/openmausbot/blob/main/server/routes/tasks.ts"
click node_engine_contracts "https://github.com/milind-soni/openmausbot/blob/main/server/contracts.ts"
click node_engine_homes "https://github.com/milind-soni/openmausbot/blob/main/server/engine-homes/engine-homes.ts"
click node_engine_standalone "https://github.com/milind-soni/openmausbot/blob/main/server/engine-standalone.ts"
click node_browser_engine "https://github.com/milind-soni/openmausbot/blob/main/server/browser-engine.ts"
click node_browser_router "https://github.com/milind-soni/openmausbot/blob/main/server/browser/engines.ts"
click node_computer_routes "https://github.com/milind-soni/openmausbot/blob/main/server/data/routes.ts"
click node_composio_broker "https://github.com/milind-soni/openmausbot/blob/main/cloudflare/composio-broker/src/index.ts"
click node_companion "https://github.com/milind-soni/openmausbot/blob/main/companion/src/routes.ts"
click node_cloud_sync "https://github.com/milind-soni/openmausbot/blob/main/electron/cloud-sync-engine.mjs"
click node_cloud_client "https://github.com/milind-soni/openmausbot/blob/main/electron/cloud-sync-client.mjs"
click node_control_plane "https://github.com/milind-soni/openmausbot/blob/main/cloudflare/control-plane/src/index.ts"
click node_relay "https://github.com/milind-soni/openmausbot/blob/main/relay/src/server.ts"
click node_atomic "https://github.com/milind-soni/openmausbot/blob/main/server/atomic.ts"
click node_enterprise "https://github.com/milind-soni/openmausbot/blob/main/enterprise/server/workspace-access.ts"

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_app,node_state,node_engine_ui,node_install_state toneBlue
class node_local_server,node_task_routes,node_engine_contracts,node_engine_homes,node_engine_standalone toneAmber
class node_browser_engine,node_browser_router,node_computer_routes,node_composio_broker,node_companion toneMint
class node_cloud_sync,node_cloud_client,node_control_plane toneRose
class node_relay,node_atomic,node_enterprise,node_user toneIndigo
```

## Components

### Desktop chat

- [Chat app](https://github.com/milind-soni/openmausbot/blob/main/src/App.tsx): `src/App.tsx`
- [App state](https://github.com/milind-soni/openmausbot/blob/main/src/state/store.tsx): `src/state/store.tsx`
- [Engine setup](https://github.com/milind-soni/openmausbot/blob/main/src/components/EngineSetup.tsx): `src/components/EngineSetup.tsx`
- [Install state](https://github.com/milind-soni/openmausbot/blob/main/src/state/engine-install.ts): `src/state/engine-install.ts`

### Agents and engines

- [Local harness](https://github.com/milind-soni/openmausbot/blob/main/server/headless/main.ts): `server/headless/main.ts`
- [Task routes](https://github.com/milind-soni/openmausbot/blob/main/server/routes/tasks.ts): `server/routes/tasks.ts`
- [Engine contracts](https://github.com/milind-soni/openmausbot/blob/main/server/contracts.ts): `server/contracts.ts`
- [Engine homes](https://github.com/milind-soni/openmausbot/blob/main/server/engine-homes/engine-homes.ts): `server/engine-homes/engine-homes.ts`
- [Standalone engines](https://github.com/milind-soni/openmausbot/blob/main/server/engine-standalone.ts): `server/engine-standalone.ts`

### Computer access

- [Browser engine](https://github.com/milind-soni/openmausbot/blob/main/server/browser-engine.ts): `server/browser-engine.ts`
- [Browser routing](https://github.com/milind-soni/openmausbot/blob/main/server/browser/engines.ts): `server/browser/engines.ts`
- [Computer routes](https://github.com/milind-soni/openmausbot/blob/main/server/data/routes.ts): `server/data/routes.ts`
- [Composio broker](https://github.com/milind-soni/openmausbot/blob/main/cloudflare/composio-broker/src/index.ts): `cloudflare/composio-broker/src/index.ts`
- [Companion routes](https://github.com/milind-soni/openmausbot/blob/main/companion/src/routes.ts): `companion/src/routes.ts`

### Cloud and sharing

- [Cloud sync](https://github.com/milind-soni/openmausbot/blob/main/electron/cloud-sync-engine.mjs): `electron/cloud-sync-engine.mjs`
- [Cloud API client](https://github.com/milind-soni/openmausbot/blob/main/electron/cloud-sync-client.mjs): `electron/cloud-sync-client.mjs`
- [Control plane](https://github.com/milind-soni/openmausbot/blob/main/cloudflare/control-plane/src/index.ts): `cloudflare/control-plane/src/index.ts`

### Supporting services

- [Relay server](https://github.com/milind-soni/openmausbot/blob/main/relay/src/server.ts): `relay/src/server.ts`
- [Atomic writes](https://github.com/milind-soni/openmausbot/blob/main/server/atomic.ts): `server/atomic.ts`
- [Workspace access](https://github.com/milind-soni/openmausbot/blob/main/enterprise/server/workspace-access.ts): `enterprise/server/workspace-access.ts`

### Other components

- **Person**

## Connections

- Person → Chat app: chats with
- Chat app → App state: uses state (evidence: `src/App.tsx`)
- Person → Engine setup: configures engines
- Engine setup → Install state: updates install status (evidence: `src/components/EngineSetup.tsx`)
- Chat app → Local harness: sends agent work
- Local harness → Task routes: routes tasks
- Local harness → Engine contracts: uses contracts
- Engine homes → Engine contracts: uses contracts (evidence: `server/engine-homes/engine-homes.ts`)
- Browser routing → Browser engine: routes Chrome sessions (evidence: `server/browser/engines.ts`)
- Person → Computer routes: uses bot computer
- Person → Composio broker: connects apps
- Person → Companion routes: uses companion
- Cloud sync → Cloud API client: transfers files (evidence: `electron/cloud-sync-engine.mjs`)
- Person → Cloud sync: syncs cloud files
- Companion routes → Control plane: uses control plane
- Relay server → Control plane: uses control plane
