Many agents, one score.
You are the Kapellmeister.
kapelle is a terminal workspace for a team of coding agents. Give your loop to a lead agent: it plans, hands out the work and stops for every choice. They play. You direct.
npm$ npm install -g kapelle
pnpm$ pnpm add -g kapelle
bun$ bun add -g kapelle
from source · no build step$ git clone https://github.com/EdwardLiuyc/kapelle.git $ cd kapelle && npm install && node cli.ts --help
try it · no agent, no account# a room with an offline demo agent $ kapelle demo
- role
- the stage, not an agent
- agents
- pi, claude, codex, copilot, …
- loop
- a Markdown recipe
- protocol
- ACP over stdio
- isolation
- a worktree per agent
- keys
- never touched
- runtime
- Node ≥ 24, no build step
- platform
- macOS, Linux, WSL
- license
- MIT
3 agents
01 why kapelle
An ensemble,
not another agent.
A Kapelle is the ensemble a Kapellmeister directs: the players, not the conductor. That is the right way round. kapelle is the stage. The agents are the players. The baton stays in your hand.
Run pi, Claude Code, Codex, Copilot, opencode and more side by side on one repository. Each one works in its own git worktree, on its own branch. You choose who plays what, answer what they ask, and merge when the work is right.
You direct
Pick who plays. Answer what they ask. Nothing lands in your checkout until you take it.
Agents play
Different vendors in one room. Each logs in by itself. kapelle never touches a key.
Each its own part
One worktree and one branch per agent. Your own checkout stays yours.
02 loop
Hand the loop to a lead.
Keep every decision.
Most issues run the same loop: pick up, build, review, open the PR, answer the bot reviews, hand over. Give the loop to one agent, the orchestrator. It adds the others to the room when their step comes, gives them the work, reads their reports, and stops each time a choice is yours.
You write the loop once, as a Markdown recipe. kapelle ships the skill that drives any recipe, so the same lead serves any project.
1 agent
- The plan, then "go"
- Its first turn joins the recipe, the task and your note into one plan. It does no work before you say go, so a wrong plan costs nothing.
- Every message in plain sight
- The lead talks to the others only through kapelle, in your timeline: po → dev. It does none of the work itself.
- A reply to the sender
- When a worker's turn ends, its answer goes back to the lead. When you talk to a worker yourself, the lead gets a copy, and goes on from there.
- A stop for every choice
- The lead decides no choice alone. It ends its turn with the options and a recommendation, and waits for your answer.
- A hard limit on bot rounds
- The recipe names the outside review and its most rounds, 3 if it does not say. At the limit, the lead hands over the open findings.
- A cap on its turns
- The lead may send 40 messages to workers in a room. At the cap, kapelle refuses the next one and rings the bell. /cap <n> raises it.
- Next soon
- A stop button, a bell when it waits for you, and a log of every decision.
03 recipes
Write the loop
in your own words.
A recipe is a Markdown file: the team and each one's agent, the steps, the outside review, the paths that need your yes, and rules for every worker. kapelle never reads it. Only the lead does. kapelle ships one, starter: one agent builds, a second reviews. Keep your own in .kapelle/loops/ to share it with your team, or in ~/.config/kapelle/loops/ for every repository. A note changes one run and leaves the file alone.
$ kapelle loop list fix-issue .kapelle/loops/fix-issue.md starter …/kapelle/assets/loops/starter.md $ kapelle loop fix-issue 312 # or with a note for this run, and a pi lead $ kapelle loop fix-issue 312 "skip rev2" --agent pi
04 worktrees
Every agent plays
its own role.
Each agent gets a git worktree and a branch. Parallel work never collides, and your uncommitted changes never reach an agent. Read each agent's diff in the side pane. Fast-forward one agent to another, or take the work into your checkout.
$ git branch --list 'kapelle/*' kapelle/room-…-q8ac/p-1ti0u5ix # po kapelle/room-…-q8ac/p-myzvyp6p # dev kapelle/room-…-q8ac/p-t798yhxc # rev
05 ask mode
You answer what they ask.
In ask mode, an agent shows you the diff before it writes. Each answer has a number. A key only moves the cursor, and only Enter answers. Deny comes first, so a stray Enter says no. A question that waits off screen rings the bell and marks its room.
cli.ts +54 −7
tests/cli.test.ts +61
06 daemon
Rooms always stay.
One background daemon holds every room for all your repositories. Type kapelle, and it starts the daemon when none runs. Close the terminal and come back tomorrow: the agents, their branches and the whole history are still there. The chats stay too: one agent each, outside every room, like a person you message.
$ kapelle # the chat; starts the daemon $ kapelle daemon add . # later, from any terminal $ kapelle chat attach <roomId> $ kapelle daemon stop
07 setup
It finds your agents.
At the first start, kapelle lists the agents it finds, and what is missing. Check an agent whose ACP adapter is missing, and kapelle installs the pinned version for you. It checks each agent's login with no prompt, so it spends no tokens, and keeps each agent's models. Pick one with --model when an agent joins, and its thinking level with @name /level. kapelle never logs in for you.
$ kapelle setup pi ready (pi 0.74.0, pi-acp 0.0.34) claude ready (claude 2.1.3, claude-agent-acp 0.89.1) codex codex 0.51.0; needs codex-acp: npm i -g @agentclientprotocol/[email protected] kimi not installed: no kimi on the daemon's PATH After an install, run /setup in the chat, or kapelle setup.
08 runs
Many tasks at once.
A run hands out many tasks from one file. Each has its own prompt, agent and mode, and ends with a result. kapelle commits each task's work on its own branch. You merge when you are ready.
$ kapelle run --file tasks.json --detach $ kapelle ps $ kapelle merge <runId> --squash
09 agents
Agents speak ACP.
ACP, the Agent Client Protocol, is one way to talk to every agent. Pick one with --agent, or bring your own with --cmd.
| --agent | what it runs | tested |
|---|---|---|
| pi | pi, the default | yes |
| claude | Claude Code, through its ACP adapter | yes |
| copilot | GitHub Copilot CLI | yes |
| opencode | opencode | yes |
| codex | Codex CLI, through its ACP adapter | yes |
| kimi | Kimi Code CLI | yes |
10 limits
What kapelle does not do.
kapelle stays small on purpose. It is the stage, not another agent. Here is where its edges are.
No model of its own
kapelle runs no model loop and edits no file itself. The agents do the work.
No sandbox
A mode is a filter. An agent that edits through its own shell does not ask. pi never asks, and opencode asks only for a write outside the workspace. kapelle tells you so. Use a container if you need a wall.
No keys
Each agent logs in by itself. kapelle never reads, stores or sends an API key. It installs only an ACP adapter you check, and never logs in.
No back channel
Agents never talk to each other directly. Every message goes through your timeline.
No merge behind your back
Work stays on the agents' branches until you take it.
No cloud
Local first. One person, one machine. Nothing goes into your repository.
11 get involved