# thinkwee/opendot architecture

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

- Interactive diagram: https://gitdiagram.com/thinkwee/opendot
- Repository: https://github.com/thinkwee/opendot

## Overview

OpenDot is a self-hosted personal agent team: a person chats with agents, who use tools and their own persistent computers to complete work; sensitive actions can pause for approval. The web app also exposes team, inbox, calendar, apps, memory, and automation surfaces. Messaging channels and connected apps extend how agents receive and carry out work. The excerpts establish the server/runtime, policy, storage, and event layers; several feature modules are represented from the tree and README, so their internal wiring is intentionally not asserted.

Main entry points: [`opendot/runtime.py`](https://github.com/thinkwee/opendot/blob/master/opendot/runtime.py) (Agent runtime), [`opendot/server.py`](https://github.com/thinkwee/opendot/blob/master/opendot/server.py) (HTTP server), [`opendot/gatekeeper.py`](https://github.com/thinkwee/opendot/blob/master/opendot/gatekeeper.py) (Action gatekeeper), [`opendot/tools.py`](https://github.com/thinkwee/opendot/blob/master/opendot/tools.py) (Agent tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_webapp["Web application<br/>[App.jsx]"]
  node_webstore["Web state and API<br/>[store.js]"]
  node_server["HTTP server<br/>[server.py]"]
end

subgraph group_agent["Agent execution"]
  node_runtime["Agent runtime<br/>[runtime.py]"]
  node_tools["Agent tools<br/>[tools.py]"]
  node_computer["Agent computer<br/>[core.py]"]
  node_memory["Agent memory<br/>[memory.py]"]
end

subgraph group_control["Trust and integrations"]
  node_gatekeeper["Action gatekeeper<br/>[gatekeeper.py]"]
  node_reviewer["Second-look reviewer<br/>[reviewer.py]"]
  node_connectors["App connectors<br/>[connectors.py]"]
end

subgraph group_capabilities["Product capabilities"]
  node_channels["Messaging channels<br/>[base.py]"]
  node_calendar["Calendar and plans<br/>[calendar.py]"]
  node_inbox["Inbox and approvals<br/>[gatekeeper_api.py]"]
  node_automations["Automations and routines<br/>[scheduler.py]"]
end

subgraph group_state["State and events"]
  node_database[("SQLite state<br/>[db.py]")]
  node_bus["Event bus<br/>[bus.py]"]
end

node_person(("Person"))
node_model{{"AI model provider"}}
node_connectedapps{{"Connected services"}}

node_person -->|"uses"| node_webapp
node_webapp -->|"reads state"| node_webstore
node_webstore -.->|"requests API"| node_server
node_server -->|"dispatches work"| node_runtime
node_runtime -->|"invokes tools"| node_tools
node_tools -->|"uses computer"| node_computer
node_runtime -.->|"requests inference"| node_model
node_tools -->|"checks actions"| node_gatekeeper
node_gatekeeper -->|"requests review"| node_reviewer
node_connectors -->|"connects apps"| node_connectedapps
node_gatekeeper -->|"checks app tools"| node_connectors
node_channels -.->|"routes conversations"| node_runtime
node_channels -->|"mirrors events"| node_bus
node_runtime -->|"uses memory"| node_memory
node_runtime -->|"reads and writes"| node_database
node_gatekeeper -->|"stores policy"| node_database
node_bus -.->|"streams updates"| node_webstore
node_server -.->|"mounts feature"| node_calendar
node_server -.->|"mounts feature"| node_inbox
node_runtime -.->|"supports scheduled work"| node_automations

click node_webapp "https://github.com/thinkwee/opendot/blob/master/web/src/App.jsx"
click node_webstore "https://github.com/thinkwee/opendot/blob/master/web/src/store.js"
click node_server "https://github.com/thinkwee/opendot/blob/master/opendot/server.py"
click node_runtime "https://github.com/thinkwee/opendot/blob/master/opendot/runtime.py"
click node_tools "https://github.com/thinkwee/opendot/blob/master/opendot/tools.py"
click node_computer "https://github.com/thinkwee/opendot/blob/master/opendot/computer/core.py"
click node_gatekeeper "https://github.com/thinkwee/opendot/blob/master/opendot/gatekeeper.py"
click node_reviewer "https://github.com/thinkwee/opendot/blob/master/opendot/reviewer.py"
click node_connectors "https://github.com/thinkwee/opendot/blob/master/opendot/connectors.py"
click node_channels "https://github.com/thinkwee/opendot/blob/master/opendot/channels/base.py"
click node_calendar "https://github.com/thinkwee/opendot/blob/master/opendot/ext/calendar.py"
click node_inbox "https://github.com/thinkwee/opendot/blob/master/opendot/ext/gatekeeper_api.py"
click node_automations "https://github.com/thinkwee/opendot/blob/master/opendot/scheduler.py"
click node_memory "https://github.com/thinkwee/opendot/blob/master/opendot/memory.py"
click node_database "https://github.com/thinkwee/opendot/blob/master/opendot/db.py"
click node_bus "https://github.com/thinkwee/opendot/blob/master/opendot/bus.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_webapp,node_webstore,node_server toneBlue
class node_runtime,node_tools,node_computer,node_memory toneAmber
class node_gatekeeper,node_reviewer,node_connectors toneMint
class node_channels,node_calendar,node_inbox,node_automations toneRose
class node_database,node_bus,node_person,node_model,node_connectedapps toneIndigo
```

## Components

### User experience

- [Web application](https://github.com/thinkwee/opendot/blob/master/web/src/App.jsx): `web/src/App.jsx`
- [Web state and API](https://github.com/thinkwee/opendot/blob/master/web/src/store.js): `web/src/store.js`
- [HTTP server](https://github.com/thinkwee/opendot/blob/master/opendot/server.py): `opendot/server.py`

### Agent execution

- [Agent runtime](https://github.com/thinkwee/opendot/blob/master/opendot/runtime.py): `opendot/runtime.py`
- [Agent tools](https://github.com/thinkwee/opendot/blob/master/opendot/tools.py): `opendot/tools.py`
- [Agent computer](https://github.com/thinkwee/opendot/blob/master/opendot/computer/core.py): `opendot/computer/core.py`
- [Agent memory](https://github.com/thinkwee/opendot/blob/master/opendot/memory.py): `opendot/memory.py`

### Trust and integrations

- [Action gatekeeper](https://github.com/thinkwee/opendot/blob/master/opendot/gatekeeper.py): `opendot/gatekeeper.py`
- [Second-look reviewer](https://github.com/thinkwee/opendot/blob/master/opendot/reviewer.py): `opendot/reviewer.py`
- [App connectors](https://github.com/thinkwee/opendot/blob/master/opendot/connectors.py): `opendot/connectors.py`

### Product capabilities

- [Messaging channels](https://github.com/thinkwee/opendot/blob/master/opendot/channels/base.py): `opendot/channels/base.py`
- [Calendar and plans](https://github.com/thinkwee/opendot/blob/master/opendot/ext/calendar.py): `opendot/ext/calendar.py`
- [Inbox and approvals](https://github.com/thinkwee/opendot/blob/master/opendot/ext/gatekeeper_api.py): `opendot/ext/gatekeeper_api.py`
- [Automations and routines](https://github.com/thinkwee/opendot/blob/master/opendot/scheduler.py): `opendot/scheduler.py`

### State and events

- [SQLite state](https://github.com/thinkwee/opendot/blob/master/opendot/db.py): `opendot/db.py`
- [Event bus](https://github.com/thinkwee/opendot/blob/master/opendot/bus.py): `opendot/bus.py`

### Other components

- **Person**
- **AI model provider**
- **Connected services**

## Connections

- Person → Web application: uses (evidence: `README.md`)
- Web application → Web state and API: reads state (evidence: `web/src/App.jsx`)
- Web state and API → HTTP server: requests API
- HTTP server → Agent runtime: dispatches work (evidence: `opendot/server.py`)
- Agent runtime → Agent tools: invokes tools (evidence: `opendot/runtime.py`)
- Agent tools → Agent computer: uses computer (evidence: `opendot/tools.py`)
- Agent runtime → AI model provider: requests inference
- Agent tools → Action gatekeeper: checks actions (evidence: `opendot/gatekeeper.py`)
- Action gatekeeper → Second-look reviewer: requests review (evidence: `opendot/gatekeeper.py`)
- App connectors → Connected services: connects apps (evidence: `opendot/connectors.py`)
- Action gatekeeper → App connectors: checks app tools (evidence: `opendot/gatekeeper.py`)
- Messaging channels → Agent runtime: routes conversations (evidence: `opendot/channels/base.py`)
- Messaging channels → Event bus: mirrors events (evidence: `opendot/channels/base.py`)
- Agent runtime → Agent memory: uses memory (evidence: `opendot/runtime.py`)
- Agent runtime → SQLite state: reads and writes (evidence: `opendot/runtime.py`)
- Action gatekeeper → SQLite state: stores policy (evidence: `opendot/gatekeeper.py`)
- Event bus → Web state and API: streams updates
- HTTP server → Calendar and plans: mounts feature (evidence: `opendot/server.py`)
- HTTP server → Inbox and approvals: mounts feature
- Agent runtime → Automations and routines: supports scheduled work
