AgentBox runs several AI coding agents against one project at the same time, each in a Linux
container of its own so they can't collide. It is a Go daemon and command-line tool
(cmd/agentbox, internal/) plus an Electron desktop app (desktop/).
flowchart LR
subgraph host["Your machine"]
CLI["CLI (cmd/agentbox)"]
App["Desktop app (desktop/)"]
Daemon["Daemon (internal/daemon)"]
DB[("state.db\ninternal/state")]
CLI -- "unix socket" --> Daemon
App -- "unix socket, via main process" --> Daemon
Daemon --> DB
end
subgraph containers["One Incus container per agent"]
Agent1["agent-01\nworktree + branch + tmux + AI tool"]
Agent2["agent-02\nworktree + branch + tmux + AI tool"]
end
Daemon -- "incus, ssh-less exec" --> Agent1
Daemon -- "incus, ssh-less exec" --> Agent2
Daemon -. "optional tunnel" .-> Hub[("A hub\n(hubapi/)")]
- The daemon owns the state.
internal/daemonis the control plane: every agent operation goes through it, the slow ones as jobs, and it serves the HTTP API frominternal/apiover a unix socket at~/.local/share/agentbox/run/agentbox.sock. All state lives in one SQLite database,state.db, ininternal/state. The CLI is a client of that socket, and so is the desktop app. - The desktop app is a thin client. Its main process only relays the socket to the renderer:
no AgentBox logic, no Incus, no git. The API types the renderer uses are generated from Go into
desktop/src/shared/api.ts. - An agent is a machine, a worktree and a branch.
agentbox creategives it an Incus container, a git worktree on a branch named after its work, likeagentbox/fix-login-redirect(the prefix is a project setting), its own network and a tmux terminal with its AI tool already running. - A project also has a lead — its chat — which runs on the host with no machine of its own, so a project nobody has chatted with costs nothing. It directs the project's agents over MCP tools and never does the work itself.
- Three AI tools: Claude Code, Codex and OpenCode, all driven through ACP (Agent Client Protocol) adapters.
- Project memory is what the project knows, kept across agents: events, memories, tasks, artifacts and reports, searched with SQLite FTS5.
- A hub is optional. It's a separate server program,
npx agentbox-hub, inhub/, which shares only the protocol,hubapi/, with the rest.
- Installing AgentBox — the install script and what it checks, KVM access, AgentBox's VM on Linux and how its agents share memory, moving an installation from before the VM, and macOS and Windows.
- What AgentBox sends — the update check, anonymous usage stats and events, and problem reports: every field, and how to turn each off.
- Architecture — the daemon, the API over a unix socket, the CLI, the desktop
thin client, and the
state.dbschema. - An agent's lifecycle —
agentbox createend to end: the Incus container, the worktree, the branch, the network, the tmux session, and the states an agent and a job pass through. - The lead and its MCP tools — what the lead is, how it's chatted with, and every MCP tool it can call.
- Chat over ACP — how AgentBox drives Claude Code, Codex and OpenCode through the Agent Client Protocol, and how a turn becomes chat history.
- Chatting from your phone — reading and answering your chats from a phone's browser on the same network: pairing it, unpairing it, and what it can reach.
- Project memory — events, memories, tasks, artifacts, reports, consolidation, and the context builder that assembles what an agent is told.
- The token ledger and Claude accounts —
token_usage,agentbox tokens, multiple Claude accounts, and their five-hour and weekly limits. - Diagnostics — the daemon's local performance trace and stalls,
agentbox trace summary, where agents' time goes (agentbox timing), and the diagnostics API. - Connectors — remote MCP servers (Notion, Linear…) that agents use, signed in to with OAuth on the host and relayed so no token reaches an agent; the API routes.
- SnapShots — a shortcut, or
agentbox snap, that sends the window you're in to a chat as a bug report, with its accessibility tree. - A hub —
npx agentbox-hub, its setup link, connecting the app and your environments to it, and approving and revoking devices. - Using AgentBox from another app — Claude Code, Cursor, Claude, ChatGPT and other remote-MCP clients seeing your projects and talking to their leads: on this computer, through a Cloudflare tunnel, or through your hub
- Browser cookies — signing agents' browsers in with a cookie export you make.
- Machines for Claude Code and Codex on your computer —
agentbox machines: a desktop machine per worktree, in Docker or Podman, for AI tools that run outside AgentBox. - Project folders — grouping projects in the sidebar: making, colouring and describing a folder, dragging projects in and out, folding it, and deleting it.
- Project notes and the brief — the per-project notes file, and the brief each AI tool is given about its machine.
- The base image — what's provisioned into the image every agent's container starts from, and how it's built on each machine.
- Building, testing and releasing — the Go and desktop builds, CI, and how a release is cut.
Every page names the Go packages and files it describes, so you can follow a claim into the code that backs it.