#Colonizer protocol v1
Three hops, one event vocabulary:
agent runner ──stdio JSONL──▶ colonizer-agentd ──WS (mesh)──▶ colonizer ──WS──▶ browser
All messages are single-line JSON objects with a type field. Unknown types and unknown fields must be ignored (forward compatibility).
Model calls take a path of their own, outside these hops: a routed <provider>/<model> goes from the colony through the mothership's provider gateway (§6.5), which holds the provider keys, and an unrouted model goes from the colony straight to the API its agent module's manifest names (egress.api in module.json: api.anthropic.com for Claude Code, api.openai.com for Codex).
#Areas
The protocol, one file per area. Each area file opens with its own title and links back here.
Generated by node scripts/doc-index.mjs write: add a file under docs/protocol/ and rerun; don't edit by hand. <!-- doc-index:start -->
- Activity log
- 3. colonizer-agentd API (VM, port 7070)
- Accounts, tokens and install settings
- Autonomous and burn-down modes
- Decisions inbox
- Duplicate-colony prevention and issue claims
- 6.6 Findings
- 6.11 Fleet export bundle (#687)
- Fleet: hosts, pairing, history and member health
- 4. Harness API (browser)
- Updates, downloads and telemetry
- Loops
- 6.2 Shared memory (runner ⇄ mothership)
- Model routing, tiers and the second opinion
- 6.3 Mothership API additions
- Observability:
GET /metrics - Plugin directories
- Pre-flight scan
- 6.5 Provider gateway (v1.2, issue #5)
- 6.7 Red-team runs
- 6.10 Remote access (tunnel)
- 2. Agent runner contract (module ⇄ agentd, stdio JSON Lines)
- Saved secrets:
/api/secrets - Sessions: events, transcript and terminal
- Spend and cost history
- Token savings
- 7. Standard names (UHP)
- 1. Files inside the VM
- Web UI
- Webhooks
<!-- doc-index:end -->
#Where the old sections went
Every heading of the single-page protocol, in its original order, and the area file it moved to:
| Old section | Now in |
|---|---|
| 1. Files inside the VM | protocol/vm-files.md |
| Where the agent runtime comes from | protocol/vm-files.md |
| 2. Agent runner contract (module ⇄ agentd, stdio JSON Lines) | protocol/runner-contract.md |
| Commands (agentd → runner stdin) | protocol/runner-contract.md |
| Events (runner stdout → agentd) | protocol/runner-contract.md |
| 3. colonizer-agentd API (VM, port 7070) | protocol/agentd-api.md |
| Origins | protocol/agentd-api.md |
GET /v1/health | protocol/agentd-api.md |
GET /v1/events?since=<seq> (WebSocket) | protocol/agentd-api.md |
GET /v1/pty?cols=<n>&rows=<n> (WebSocket) | protocol/agentd-api.md |
POST /v1/shutdown | protocol/agentd-api.md |
| 4. Harness API (browser) | protocol/harness-api.md |
| Add your phone | protocol/auth.md |
| Scoped API tokens | protocol/auth.md |
| Connections: GitHub and Claude credentials | protocol/auth.md |
| Device and install settings | protocol/auth.md |
GET /api/stream | protocol/harness-api.md |
| Duplicate-colony prevention and issue claims | protocol/duplicates.md |
| Automatic reclamation | protocol/duplicates.md |
| Plugin directories | protocol/plugins.md |
| Token savings | protocol/token-savings.md |
| Pre-flight scan | protocol/preflight.md |
GET /api/status | protocol/harness-api.md |
GET /api/hosts | protocol/fleet.md |
| Fleet pairing (issue #686) | protocol/fleet.md |
| Fleet history push (issue #762) | protocol/fleet.md |
| Fleet history on the owner (issue #762) | protocol/fleet.md |
| Member health (issue #764) | protocol/fleet.md |
GET /api/version | protocol/install.md |
GET /api/update and PUT /api/update | protocol/install.md |
POST /api/update/apply | protocol/install.md |
POST /api/sandbox/pull and GET /api/sandbox/pull | protocol/install.md |
POST /api/headroom/download and GET /api/headroom | protocol/install.md |
GET /api/telemetry and PUT /api/telemetry | protocol/install.md |
GET /api/telemetry/usage and PUT /api/telemetry/usage | protocol/install.md |
GET /api/sessions/{id}/transcript?format=common&limit=&cursor= | protocol/sessions.md |
GET /api/sessions/{id}/events?since=<seq>&epoch=<epoch> (WebSocket) | protocol/sessions.md |
GET /api/sessions/{id}/terminal?cols=<n>&rows=<n> (WebSocket) | protocol/sessions.md |
POST /api/handoff | protocol/sessions.md |
GET /api/sessions/{id}/handoff | protocol/sessions.md |
Saved secrets: /api/secrets | protocol/secrets.md |
Colony secrets: POST /api/secrets/colony | protocol/secrets.md |
| 5. Web UI contract | protocol/web-ui.md |
| 6. v1.1 additions: model routing, org workspaces, shared memory, watchdog | the areas index |
| 6.1 Model routing (runner) | protocol/model-routing.md |
| 6.1b Per-task model tiers (mothership) | protocol/model-routing.md |
| 6.1c Jev second opinion (shadow mode) | protocol/model-routing.md |
| 6.2 Shared memory (runner ⇄ mothership) | protocol/memory.md |
| 6.2b Autonomous mode (Mothership) | protocol/autonomy.md |
| 6.2c Burn-down mode (Mothership) | protocol/autonomy.md |
| 6.3 Mothership API additions | protocol/mothership-api.md |
| 6.4 UI additions | protocol/web-ui.md |
| 6.5 Provider gateway (v1.2, issue #5) | protocol/providers.md |
| 6.6 Findings | protocol/findings.md |
| 6.6b Colony-to-colony coordination | protocol/findings.md |
| 6.7 Red-team runs | protocol/red-team.md |
| 6.8 Spend (per org and per day) | protocol/spend.md |
GET /api/spend/history?days=30&tz_offset_minutes=0 | protocol/spend.md |
| 6.9 Activity log | protocol/activity.md |
GET /api/activity?before=&limit=&kind=&actor=&org=&repo=&q= | protocol/activity.md |
| 6.10 Remote access (tunnel) | protocol/remote-access.md |
GET /api/remote | protocol/remote-access.md |
PUT /api/remote {"enabled": bool} | protocol/remote-access.md |
POST /api/remote/reset | protocol/remote-access.md |
PUT /api/remote/require-github {"require_github": bool} | protocol/remote-access.md |
Signing a browser in on the link: /api/remote/devices | protocol/remote-access.md |
Pairing: GET /api/remote/pairing, POST /api/remote/pairing/confirm, POST /api/remote/pairing/reject, DELETE /api/remote/owner | protocol/remote-access.md |
| The tunnel, version 1 | protocol/remote-access.md |
| 6.11 Fleet export bundle (#687) | protocol/fleet-export.md |
| 6.12 GitHub loops (issue #778, PR actions issue #807) | protocol/loops.md |
| 7. Standard names (UHP) | protocol/uhp.md |
| 7.1 Rules for every rename | protocol/uhp.md |
| 7.2 Harness selection | protocol/uhp.md |
| 7.3 Continuation | protocol/uhp.md |
| 7.4 Streaming | protocol/uhp.md |
| 7.5 Files | protocol/uhp.md |
| 7.6 Cancellation | protocol/uhp.md |
| 7.7 Errors | protocol/uhp.md |
| Loops | protocol/loops.md |
| Docs & README loop | protocol/loops.md |