Capo
A standing crew of coding agents you run from Slack or Discord.
A manager agent runs a team of worker agents — each one a real coding CLI
(Claude Code, Codex, Gemini, Kimi, …) living in its own tmux pane — and you drive the whole crew
from a chat channel on your phone. The capo takes your orders; the crew does the work.
Why
- Always on. Agents run continuously in tmux, not one-shot. A watchdog keeps every pane and daemon alive (auto-respawn with cooldown), so the team is a standing crew you talk to, not a script you re-run.
- One interface. Every message in the channel goes to the manager. The manager plans, dispatches to workers through a local inbox, and reports back. Workers never see raw boss messages.
- Reshape the roster any time.
capo hire spins up a new agent on any supported CLI, capo fire retires one and archives its workspace. Mix CLIs freely in one team.
- Memory that survives. Every agent keeps durable memory that outlives
/clear and pane respawns, auto-injected on wake. The team shares a pooled experience log and a skills/ library, and is told to reflect on outcomes and fold the lessons back in.
- Ops without an LLM.
!team, !health, !usage, !tmux, !send, !compact, !stop, !clear, !task are answered by the router directly — zero tokens, instant.
- Nothing to host. Stdlib-only Python + one Node sidecar per chat platform (Socket Mode / Gateway WebSocket → NDJSON). Everything is files on disk; no database, no public URL.
Works with your CLI
Any of these can be an agent in the same team:
Claude Code · Codex · Gemini · Qwen · Kimi · MiniMax · opencode · CodeWhale · OpenClaw · Trae · Hermes · Pi
| Adapter |
cli in capo.toml |
| Claude Code |
claude-code (default) |
| Codex CLI |
codex-cli |
| Kimi Code |
kimi-code |
| Gemini CLI |
gemini-cli |
| Qwen Code |
qwen-code |
| MiniMax Mini-Agent |
minimax |
| opencode |
opencode |
| CodeWhale |
codewhale |
| OpenClaw |
openclaw |
| Trae |
trae |
| Hermes |
hermes |
| Pi |
pi |
The last seven are OpenAI-compatible (bring your own key): point them at any endpoint with
OPENAI_BASE_URL + OPENAI_API_KEY. Agents reuse your existing local CLI logins; nothing is
typed into a pane.
[team.agents.manager]
cli = "claude-code"
model = "opus"
role = "团队主管"
[team.agents.worker_codex] # add only if you have codex installed
cli = "codex-cli"
role = "数据分析员工"
How it fits together
you, in #capo ──▶ sidecar.js (WebSocket → NDJSON) ──▶ capo router
│ classify → deliver
▼
┌───────────── tmux session Capo-<team> ─────────────┐
│ manager pane worker_a pane worker_b pane … │
│ (claude) (codex) (gemini) │
└──────────────────────────────────────────────────┘
▲ inbox.json / status / logs / memory (state/)
│
agents reply with `capo say` ──▶ posted under their own name + avatar
capo watchdog ──▶ respawns router / panes, alerts the channel on cooldown
Quick start
Full prerequisites and the step-by-step live in docs/DEPLOYMENT.md.
The core flow once installed (pip install -e ., Node 22+, tmux):
capo init --no-connect # write capo.toml (default: manager + 1 claude worker)
capo slack connect # Slack: paste the manifest → app; paste xoxb- / xapp- tokens; channel ID
# or: capo discord connect # Discord: bot token → invite link → channel ID
capo install-hooks
capo up # start the crew; the manager runs a roll-call in your channel
Then say hello in the channel — no @ needed, every message goes to the manager. Boss-side
commands use the ! prefix (!help, !team, …) because Slack and Discord intercept /…
for their own slash menus.
Slack: one app from a one-paste manifest (Socket Mode — no public URL, works behind NAT):
SLACK_SETUP.md. Discord: bot token + MESSAGE CONTENT intent + one invite:
DISCORD_SETUP.md. Pick the platform per deployment with chat_platform.
Deploying with a coding agent? Paste this into Claude Code / Codex / …:
"Clone this repo, read docs/DEPLOYMENT.md and follow its 'Deploying with a coding agent'
protocol: ask me the intake questions first, walk me through SLACK_SETUP.md or
DISCORD_SETUP.md, bring the team up, then verify every agent's pane before telling me it's done."
More
- One config file —
capo.toml (Cargo-style, comment-friendly): chat platform + channel, agents, models, card colours, publish filters. Every key has a CAPO_<SECTION>_<KEY> env override.
- Team templates — ready domain teams (software dev, research, marketing, data, content) in
templates/: a capo.toml plus a per-role playbook that becomes each agent's CLAUDE.md / AGENTS.md.
[chat.publish] filter — sender→receiver visibility per channel; silence noisy traffic without losing the audit log.
- Per-agent space + shared brain — each agent has its own
workspace/ and an isolated CLI home; the team shares an experience log (capo remember --team) and skills/, both surfaced on wake.
- Task tracking —
capo task / !task: intents, assignments, an approval gate for destructive work.
- Adding a transport — a package
capo.<name> + scripts/<name>_channel/sidecar.js behind chat_transport; see DESIGN.md.
Documentation
FAQ
Does it work with non-Anthropic models?
Yes — see the adapter table; each agent picks its CLI in capo.toml, and the BYOK adapters take any OpenAI-compatible endpoint.
How many agents can I run?
Tested up to 5. Each Claude Code pane uses ~200–400 MB; 8 GB of RAM is comfortable for 5.
An agent crashed — do I lose context?
No. Inbox, status, logs and durable memory live on disk. The watchdog respawns the pane; capo reidentify <agent> re-injects the identity prompt with prior memory pre-loaded.
What does it cost?
Capo is MIT-licensed. Costs come from your CLIs' own API usage. A free Slack workspace or Discord server is enough.
License
MIT