opencode 2.x · v1 fallback
default model deepseek v4.1 flash
A supervised multi-agent runtime for OpenCode. One goal goes in, a plan comes out, and workers run in parallel without ever overwriting each other.
Seven roles, one runtime. Each spawn is a real child session with its own model, brief, and file write-set. Read it like a running order.
One path, three steps. The config never changes — only the file you drop it into. Global puts the swarm in every chat; project scopes it to one repo.
git clone https://github.com/DumDuky/opencode-swarm.git cd opencode-swarm bun install
{
"$schema": "https://opencode.ai/config.json",
"plugins": [
{ "package": "/absolute/path/to/opencode-swarm",
"options": {} }
],
"instructions": [
"/absolute/path/to/opencode-swarm/docs/SWARM.md"
]
}
Every chat, every project. This is the recommended one.
opencode reload opencode plugin list # shows opencode-swarm /swarm Add a health endpoint with tests
Parallel agents are easy to demo and hard to trust. Three layers keep the workspace consistent, and a fourth keeps the bill honest.
Real runs, not screenshots. Every number below comes from the repo's test suite and its recorded swarm runs.
Two workers, one dependency gate, zero overwrites. The tester spawned only after both were done — and the orchestrator re-ran the commands before closing the swarm.
Small surface, boring dependencies. The core talks to a narrow runtime interface, so it stays testable.
Five commands, ten tools, five config groups. That is the whole API you have to remember.
The honest answers, including the parts that are still missing.
No. Any tool-capable provider works. DeepSeek V4.1 Flash on OpenCode Go is only the default because it is cheap and fast at this task shape. Set models.orchestrator to "inherit" to follow whatever model you picked with /models.
Not concurrently. The board rejects overlapping write-sets at plan time, leases serialize whatever still collides, and the content-hash guard refuses a write when the file changed underneath the worker.
A cost budget with warn and pause thresholds, plus member, depth, concurrency, and message-rate caps. /swarm-stop interrupts everything immediately. The budget is tracked per swarm, not per session.
No. It is goal-driven, not a daemon. It stops when the board is done, when you stop it, when the budget is hit, or when a limit is exceeded. It will not invent new goals.
No, and you should not treat it as one. Workers run with the permissions OpenCode gives them. Destructive shell commands are blocked or escalated, but interpreters and repo content are still dangerous. Point it at repositories you trust.
Worktree isolation and a merge queue, a TUI dashboard for live state, an npm package, and richer plan validation. The current model is a shared workspace with leases, which is safe but serializes same-file edits. See the roadmap.
Clone it, add one entry, reload. Then give it a goal and watch the board fill up. No account, no telemetry, no build step.
/swarm Add a health endpoint with tests