# mammut001/conveyor architecture

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

- Interactive diagram: https://gitdiagram.com/mammut001/conveyor
- Repository: https://github.com/mammut001/conveyor
- Video tour (about a minute): https://gitdiagram.com/mammut001/conveyor/video

## Overview

Conveyor is a self-hosted developer-agent control plane for operating a personal workstation from Telegram, Feishu, or a Web PWA. The main workflow routes an operator request into conversational chat or a coding/operations task, then returns results for review and explicit approval before changes are applied. The graph includes documented queue, worktree, desktop-control, tools, agent, and transcript capabilities. Some subsystem links are documented in the README rather than verified in sampled implementation; unsampled details are omitted.

Main entry points: [`handlers/dispatch.py`](https://github.com/mammut001/conveyor/blob/main/handlers/dispatch.py) (Intent dispatch), [`runner/operators/run.py`](https://github.com/mammut001/conveyor/blob/main/runner/operators/run.py) (Codex task runner), [`handlers/intent.py`](https://github.com/mammut001/conveyor/blob/main/handlers/intent.py) (Intent router), [`agents.py`](https://github.com/mammut001/conveyor/blob/main/agents.py) (Agent orchestration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_surfaces["Operator surfaces"]
  node_telegram["Telegram bot<br/>[telegram.py]"]
  node_feishu["Feishu adapter<br/>[feishu.py]"]
  node_web_console["Web console<br/>[App.tsx]"]
end

subgraph group_routing["Request routing"]
  node_dispatch["Intent dispatch<br/>[dispatch.py]"]
  node_intent["Intent router<br/>[intent.py]"]
  node_chat["Fast chat tier<br/>[chat_client.py]"]
  node_agent["Agent orchestration<br/>[agents.py]"]
end

subgraph group_execution["Task execution"]
  node_job_queue["Persistent job queue<br/>[job_queue.py]"]
  node_runner["Codex task runner<br/>[run.py]"]
  node_worktree["Git worktrees<br/>[worktree.py]"]
  node_tool_registry["Host tool catalog<br/>[registry.py]"]
  node_executors["Tool executors<br/>[executors.py]"]
  node_personal_tools["Personal tools<br/>[registry.py]"]
  node_mcp["MCP connectors<br/>[manager.py]"]
end

subgraph group_computer["Desktop computer use"]
  node_computer_requests["Computer task requests"]
  node_computer_loop["Computer-use loop"]
end

subgraph group_state_safety["State and safety"]
  node_approval["Approval controls<br/>[confirm.py]"]
  node_transcripts[("Transcript store")]
  node_agent_context["Agent identity context<br/>[agent_context.py]"]
  node_security["Agent security<br/>[agent_security.py]"]
end

node_operator(("Operator"))

node_operator -->|"sends request"| node_telegram
node_operator -->|"sends request"| node_feishu
node_operator -->|"sends request"| node_web_console
node_telegram -.->|"routes request"| node_dispatch
node_feishu -.->|"routes request"| node_dispatch
node_web_console -.->|"routes request"| node_dispatch
node_dispatch -->|"routes intent"| node_intent
node_dispatch -->|"answers conversation"| node_chat
node_dispatch -->|"escalates task"| node_runner
node_intent -->|"resolves tools"| node_tool_registry
node_intent -->|"requests computer task"| node_computer_requests
node_agent -->|"enqueues delegated task"| node_job_queue
node_job_queue -->|"dispatches jobs"| node_runner
node_runner -->|"runs in isolation"| node_worktree
node_tool_registry -->|"registers executors"| node_executors
node_executors -->|"starts computer task"| node_computer_requests
node_personal_tools -.->|"exposes connector tools"| node_mcp
node_computer_requests -.->|"runs task"| node_computer_loop
node_agent_context -->|"resolves agent identity"| node_agent
node_agent_context -->|"derives session identity"| node_transcripts
node_agent -->|"stores conversation"| node_transcripts
node_approval -->|"gates changes"| node_runner
node_security -->|"checks agent access"| node_agent_context

click node_telegram "https://github.com/mammut001/conveyor/blob/main/channel/telegram.py"
click node_feishu "https://github.com/mammut001/conveyor/blob/main/channel/feishu.py"
click node_web_console "https://github.com/mammut001/conveyor/blob/main/web/src/App.tsx"
click node_dispatch "https://github.com/mammut001/conveyor/blob/main/handlers/dispatch.py"
click node_intent "https://github.com/mammut001/conveyor/blob/main/handlers/intent.py"
click node_chat "https://github.com/mammut001/conveyor/blob/main/runner/chat_client.py"
click node_agent "https://github.com/mammut001/conveyor/blob/main/agents.py"
click node_job_queue "https://github.com/mammut001/conveyor/blob/main/handlers/job_queue.py"
click node_runner "https://github.com/mammut001/conveyor/blob/main/runner/operators/run.py"
click node_worktree "https://github.com/mammut001/conveyor/blob/main/runner/worktree.py"
click node_tool_registry "https://github.com/mammut001/conveyor/blob/main/handlers/tools/registry.py"
click node_executors "https://github.com/mammut001/conveyor/blob/main/handlers/tools/executors.py"
click node_personal_tools "https://github.com/mammut001/conveyor/blob/main/personal_tools/registry.py"
click node_mcp "https://github.com/mammut001/conveyor/blob/main/mcp_client/manager.py"
click node_computer_requests "https://github.com/mammut001/conveyor/blob/main/desktop_computer_requests.py"
click node_computer_loop "https://github.com/mammut001/conveyor/blob/main/desktop_computer_loop.py"
click node_approval "https://github.com/mammut001/conveyor/blob/main/handlers/tools/confirm.py"
click node_transcripts "https://github.com/mammut001/conveyor/blob/main/transcript_store.py"
click node_agent_context "https://github.com/mammut001/conveyor/blob/main/agent_context.py"
click node_security "https://github.com/mammut001/conveyor/blob/main/agent_security.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_telegram,node_feishu,node_web_console toneBlue
class node_dispatch,node_intent,node_chat,node_agent toneAmber
class node_job_queue,node_runner,node_worktree,node_tool_registry,node_executors,node_personal_tools,node_mcp toneMint
class node_computer_requests,node_computer_loop toneRose
class node_approval,node_transcripts,node_agent_context,node_security,node_operator toneIndigo
```

## Components

### Operator surfaces

- [Telegram bot](https://github.com/mammut001/conveyor/blob/main/channel/telegram.py): `channel/telegram.py`
- [Feishu adapter](https://github.com/mammut001/conveyor/blob/main/channel/feishu.py): `channel/feishu.py`
- [Web console](https://github.com/mammut001/conveyor/blob/main/web/src/App.tsx): `web/src/App.tsx`

### Request routing

- [Intent dispatch](https://github.com/mammut001/conveyor/blob/main/handlers/dispatch.py): `handlers/dispatch.py`
- [Intent router](https://github.com/mammut001/conveyor/blob/main/handlers/intent.py): `handlers/intent.py`
- [Fast chat tier](https://github.com/mammut001/conveyor/blob/main/runner/chat_client.py): `runner/chat_client.py`
- [Agent orchestration](https://github.com/mammut001/conveyor/blob/main/agents.py): `agents.py`

### Task execution

- [Persistent job queue](https://github.com/mammut001/conveyor/blob/main/handlers/job_queue.py): `handlers/job_queue.py`
- [Codex task runner](https://github.com/mammut001/conveyor/blob/main/runner/operators/run.py): `runner/operators/run.py`
- [Git worktrees](https://github.com/mammut001/conveyor/blob/main/runner/worktree.py): `runner/worktree.py`
- [Host tool catalog](https://github.com/mammut001/conveyor/blob/main/handlers/tools/registry.py): `handlers/tools/registry.py`
- [Tool executors](https://github.com/mammut001/conveyor/blob/main/handlers/tools/executors.py): `handlers/tools/executors.py`
- [Personal tools](https://github.com/mammut001/conveyor/blob/main/personal_tools/registry.py): `personal_tools/registry.py`
- [MCP connectors](https://github.com/mammut001/conveyor/blob/main/mcp_client/manager.py): `mcp_client/manager.py`

### Desktop computer use

- [Computer task requests](https://github.com/mammut001/conveyor/blob/main/desktop_computer_requests.py): `desktop_computer_requests.py`
- [Computer-use loop](https://github.com/mammut001/conveyor/blob/main/desktop_computer_loop.py): `desktop_computer_loop.py`

### State and safety

- [Approval controls](https://github.com/mammut001/conveyor/blob/main/handlers/tools/confirm.py): `handlers/tools/confirm.py`
- [Transcript store](https://github.com/mammut001/conveyor/blob/main/transcript_store.py): `transcript_store.py`
- [Agent identity context](https://github.com/mammut001/conveyor/blob/main/agent_context.py): `agent_context.py`
- [Agent security](https://github.com/mammut001/conveyor/blob/main/agent_security.py): `agent_security.py`

### Other components

- **Operator**

## Connections

- Operator → Telegram bot: sends request (evidence: `README.md`)
- Operator → Feishu adapter: sends request (evidence: `README.md`)
- Operator → Web console: sends request (evidence: `README.md`)
- Telegram bot → Intent dispatch: routes request
- Feishu adapter → Intent dispatch: routes request
- Web console → Intent dispatch: routes request
- Intent dispatch → Intent router: routes intent (evidence: `README.md`)
- Intent dispatch → Fast chat tier: answers conversation (evidence: `README.md`)
- Intent dispatch → Codex task runner: escalates task (evidence: `README.md`)
- Intent router → Host tool catalog: resolves tools (evidence: `handlers/intent.py`)
- Intent router → Computer task requests: requests computer task (evidence: `handlers/intent.py`)
- Agent orchestration → Persistent job queue: enqueues delegated task
- Persistent job queue → Codex task runner: dispatches jobs (evidence: `README.md`)
- Codex task runner → Git worktrees: runs in isolation (evidence: `runner/operators/run.py`)
- Host tool catalog → Tool executors: registers executors (evidence: `handlers/tools/registry.py`)
- Tool executors → Computer task requests: starts computer task (evidence: `handlers/tools/executors.py`)
- Personal tools → MCP connectors: exposes connector tools
- Computer task requests → Computer-use loop: runs task
- Agent identity context → Agent orchestration: resolves agent identity (evidence: `agent_context.py`)
- Agent identity context → Transcript store: derives session identity (evidence: `agent_context.py`)
- Agent orchestration → Transcript store: stores conversation (evidence: `agents.py`)
- Approval controls → Codex task runner: gates changes (evidence: `README.md`)
- Agent security → Agent identity context: checks agent access (evidence: `agent_security.py`)
