# phongtrinhdinh/openmausbot_clone architecture

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

- Interactive diagram: https://gitdiagram.com/phongtrinhdinh/openmausbot_clone
- Repository: https://github.com/phongtrinhdinh/openmausbot_clone

## Overview

OpenMausBot is a local-first desktop chat application for managing a team of AI agents. The main workflow is: a person selects or configures a bot, sends it a chat request, and the local harness runs its CLI agent and returns activity and results to the app. Agents can use browser/computer environments and connected apps; the README also describes cloud and local computer options. The graph combines documented product capabilities with relationships visible in the source index and excerpts; several subsystem links remain unverified because their implementation was not sampled.

Main entry points: [`server/engine-memory.ts`](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/engine-memory.ts) (Harness server), [`src/state/store.tsx`](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/src/state/store.tsx) (Chat and state), [`server/browser/engines.ts`](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/browser/engines.ts) (Browser engine), [`src/components/EngineSetup.tsx`](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/src/components/EngineSetup.tsx) (Engine setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop app"]
  node_app["Chat and state<br/>[store.tsx]"]
  node_setup["Engine setup<br/>[EngineSetup.tsx]"]
  node_electron["Desktop main<br/>[main.mjs]"]
  node_storage_ui["Storage settings<br/>[StorageView.tsx]"]
end

subgraph group_harness["Agent harness"]
  node_server["Harness server<br/>[engine-memory.ts]"]
  node_config["Runtime config<br/>[config.ts]"]
  node_contracts["Engine contracts<br/>[contracts.ts]"]
  node_drivers["Agent drivers<br/>[engine-errors.ts]"]
  node_engine_data["Agent data access<br/>[engine.ts]"]
end

subgraph group_computer["Computer runtime"]
  node_browser["Browser engine<br/>[engines.ts]"]
  node_browser_live["Browser live runtime<br/>[browser-live.ts]"]
  node_browser_runtime["Browser runtime<br/>[browser-runtime.ts]"]
  node_browser_steps["Browser steps<br/>[browser-steps.ts]"]
  node_cloud_computer["Cloud computer<br/>[index.ts]"]
  node_local_vm["Local VM<br/>[local-vm-world.ts]"]
end

subgraph group_integrations["Apps and services"]
  node_composio["Connected apps"]
  node_skill_apps["App catalog<br/>[apps.ts]"]
end

subgraph group_cloud["Cloud coordination"]
  node_cloud_sync["Cloud file sync"]
  node_cloud_control["Cloud control plane<br/>[index.ts]"]
  node_relay["Relay service<br/>[server.ts]"]
end

node_person(("Person"))
node_agent_cli{{"Local agent CLIs"}}
node_duckdb[("DuckDB")]

node_person -->|"chats with"| node_app
node_app -.->|"configures agents"| node_setup
node_setup -.->|"sets up engines"| node_server
node_app -.->|"sends requests"| node_server
node_server -->|"reads settings"| node_config
node_server -->|"uses contracts"| node_contracts
node_server -->|"reports failures"| node_drivers
node_server -->|"runs locally"| node_agent_cli
node_server -->|"provides browser"| node_browser
node_browser -->|"routes sessions"| node_browser_live
node_browser -->|"routes sessions"| node_browser_runtime
node_browser -->|"routes sessions"| node_browser_steps
node_server -.->|"offers computer"| node_cloud_computer
node_server -.->|"offers computer"| node_local_vm
node_server -.->|"connects apps"| node_composio
node_composio -.->|"uses app catalog"| node_skill_apps
node_app -->|"syncs files"| node_cloud_sync
node_app -.->|"uses cloud services"| node_cloud_control
node_app -->|"uses relay"| node_relay
node_app -.->|"queries data"| node_engine_data
node_engine_data -.->|"queries"| node_duckdb
node_storage_ui -->|"reads state"| node_app

click node_app "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/src/state/store.tsx"
click node_setup "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/src/components/EngineSetup.tsx"
click node_electron "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/electron/main.mjs"
click node_server "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/engine-memory.ts"
click node_config "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/config.ts"
click node_contracts "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/contracts.ts"
click node_drivers "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/drivers/engine-errors.ts"
click node_browser "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/browser/engines.ts"
click node_browser_live "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/browser-live.ts"
click node_browser_runtime "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/browser-runtime.ts"
click node_browser_steps "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/browser-steps.ts"
click node_cloud_computer "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/cloud-browser/index.ts"
click node_local_vm "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/evals/runners/local-vm-world.ts"
click node_composio "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/shared/composio-storage.ts"
click node_skill_apps "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/shared/skill-burger/apps.ts"
click node_cloud_sync "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/electron/cloud-sync-engine.mjs"
click node_cloud_control "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/cloudflare/control-plane/src/index.ts"
click node_relay "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/relay/src/server.ts"
click node_engine_data "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/data/engine.ts"
click node_storage_ui "https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/src/components/settings/StorageView.tsx"

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_setup,node_electron,node_storage_ui toneBlue
class node_server,node_config,node_contracts,node_drivers,node_engine_data,node_duckdb toneAmber
class node_browser,node_browser_live,node_browser_runtime,node_browser_steps,node_cloud_computer,node_local_vm toneMint
class node_composio,node_skill_apps toneRose
class node_cloud_sync,node_cloud_control,node_relay,node_person,node_agent_cli toneIndigo
```

## Components

### Desktop app

- [Chat and state](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/src/state/store.tsx): `src/state/store.tsx`
- [Engine setup](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/src/components/EngineSetup.tsx): `src/components/EngineSetup.tsx`
- [Desktop main](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/electron/main.mjs): `electron/main.mjs`
- [Storage settings](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/src/components/settings/StorageView.tsx): `src/components/settings/StorageView.tsx`

### Agent harness

- [Harness server](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/engine-memory.ts): `server/engine-memory.ts`
- [Runtime config](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/config.ts): `server/config.ts`
- [Engine contracts](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/contracts.ts): `server/contracts.ts`
- [Agent drivers](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/drivers/engine-errors.ts): `server/drivers/engine-errors.ts`
- [Agent data access](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/data/engine.ts): `server/data/engine.ts`

### Computer runtime

- [Browser engine](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/browser/engines.ts): `server/browser/engines.ts`
- [Browser live runtime](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/browser-live.ts): `server/browser-live.ts`
- [Browser runtime](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/browser-runtime.ts): `server/browser-runtime.ts`
- [Browser steps](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/browser-steps.ts): `server/browser-steps.ts`
- [Cloud computer](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/server/cloud-browser/index.ts): `server/cloud-browser/index.ts`
- [Local VM](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/evals/runners/local-vm-world.ts): `evals/runners/local-vm-world.ts`

### Apps and services

- [Connected apps](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/shared/composio-storage.ts): `shared/composio-storage.ts`
- [App catalog](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/shared/skill-burger/apps.ts): `shared/skill-burger/apps.ts`

### Cloud coordination

- [Cloud file sync](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/electron/cloud-sync-engine.mjs): `electron/cloud-sync-engine.mjs`
- [Cloud control plane](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/cloudflare/control-plane/src/index.ts): `cloudflare/control-plane/src/index.ts`
- [Relay service](https://github.com/phongtrinhdinh/openmausbot_clone/blob/main/relay/src/server.ts): `relay/src/server.ts`

### Other components

- **Person**
- **Local agent CLIs**
- **DuckDB**

## Connections

- Person → Chat and state: chats with (evidence: `README.md`)
- Chat and state → Engine setup: configures agents (evidence: `src/components/EngineSetup.tsx`)
- Engine setup → Harness server: sets up engines
- Chat and state → Harness server: sends requests
- Harness server → Runtime config: reads settings (evidence: `server/config.ts`)
- Harness server → Engine contracts: uses contracts (evidence: `server/engine-memory.ts`)
- Harness server → Agent drivers: reports failures (evidence: `server/drivers/engine-errors.ts`)
- Harness server → Local agent CLIs: runs locally (evidence: `README.md`)
- Harness server → Browser engine: provides browser (evidence: `server/browser/engines.ts`)
- Browser engine → Browser live runtime: routes sessions (evidence: `server/browser/engines.ts`)
- Browser engine → Browser runtime: routes sessions (evidence: `server/browser/engines.ts`)
- Browser engine → Browser steps: routes sessions (evidence: `server/browser/engines.ts`)
- Harness server → Cloud computer: offers computer (evidence: `README.md`)
- Harness server → Local VM: offers computer (evidence: `README.md`)
- Harness server → Connected apps: connects apps (evidence: `README.md`)
- Connected apps → App catalog: uses app catalog
- Chat and state → Cloud file sync: syncs files (evidence: `src/state/store.tsx`)
- Chat and state → Cloud control plane: uses cloud services (evidence: `README.md`)
- Chat and state → Relay service: uses relay (evidence: `src/state/store.tsx`)
- Chat and state → Agent data access: queries data
- Agent data access → DuckDB: queries (evidence: `server/data/engine.ts`)
- Storage settings → Chat and state: reads state (evidence: `src/components/settings/StorageView.tsx`)
