Agent Swarm Fusion
Fusion is a plugin for Claude Code, Codex CLI and AndrewCode that lets the model you are talking to coordinate other models: blind panels, cross-examining councils, scoped coding teams and nested swarms. Every participant is a real command-line program on your machine that Fusion starts and reads back. Fusion holds no model, no API key and no cloud service, and its Python runtime uses only the standard library (Python 3.10 or newer).
Version 3.3.0+swarm, MIT licensed.
Naming. This repository is agent-swarm-fusion. The plugin id, the /fusion:* slash commands, the Python package fusion_swarm, the MCP servers fusion-coordination and fusion-board, and the FUSION_* environment variables keep the fusion name.
What you can do with it
| You want | Use | Read |
|---|
| A second opinion that does not share the author's blind spots | /fusion:panel, /fusion:council, /fusion:debate, /fusion:vote | docs/MODES.md |
| A scoped coding team with a chosen leadership style | /fusion:sidekick, /fusion:genius-boss, /fusion:idiot-boss, /fusion:team (16 native team forms) | docs/CODING_TEAMS.md |
| A large, multi-subsystem mission | /fusion:hive (architect, captains and children on one board) and /fusion:designer | docs/HIVE.md |
| A coordination pattern with a call budget, a deadline and crash recovery | The 10 runtime forms, such as /fusion:tournament, /fusion:refute and /fusion:hedge | docs/FORMS.md |
| A shared task board for agents, with claims, leases and cursor waits | VBoard (Vercel Board compatible) and the native HiveBoard | docs/VBOARD.md, docs/COORDINATION.md |
| To watch a prepared run | A loopback web dashboard and a one-shot terminal snapshot | docs/COCKPIT.md |
The repository ships 54 command files under commands/ and 24 skill directories under skills/. Claude Code and AndrewCode load both. Codex loads the skills and the MCP servers, not the command files.
Install
You need Python 3.10 or newer with sqlite3 and Bash. At least one host CLI (Claude Code, Codex CLI or AndrewCode) is needed for the slash commands. Provider CLIs matter only when you dispatch real work.
git clone https://github.com/andrewr303/agent-swarm-fusion.git
cd agent-swarm-fusion
bash install.sh --dry-run # prints the plan, changes nothing
bash install.sh --hosts claude # or codex, andrewcode; omit --hosts for all three
On Windows run .\install-all.ps1. The installer copies a slim package to an install root, verifies it, and registers it through each host's own plugin commands. Installing signs you in to nothing and makes no model calls. Per-host steps, the runtime-only install and verification are in docs/GETTING_STARTED.md. Every installer option is in INSTALL.md. Host guides: CODEX.md for Codex, and KIMI.md for AndrewCode, which reads kimi.plugin.json.
Quick start
These commands need no host and no model account. Run them from a checkout. The scratch state directory keeps anything they write out of ~/.fusion.
export PYTHONPATH=python FUSION_STATE_DIR="$(mktemp -d)"
bash scripts/fusion.sh detect # which provider CLIs are on this machine
bash scripts/fusion.sh route "refactor the auth module across every file"
route is a keyword heuristic that advises a mode and decides nothing. On one machine it printed:
MODE=swarm
TASK_TYPE=code
REASON=large/parallelizable build — decompose and fan subtasks across panelists
PANEL=copilot,opencode,grok
SIGNALS=code:1 verifiable:0 deliberate:0 debate:0 large:1 graph:0 ureview:0 len:42
LEDGER=none yet
NOTE=advisory default — the Conductor may override based on task nuance + LEDGER
Plan a runtime form and preview a swarm without dispatching anything:
python3 -m fusion_swarm.forms plan --task "review the auth change" --providers grok,opencode,agy --kind review --verifier
bash scripts/swarm.sh hive "smoke" --dry-run --json
plan picks a form and prints its budget. The --dry-run hive run builds a validated SwarmSpec, seeds a board under $FUSION_STATE_DIR/hive/<run_id>/ and starts no AndrewCode process. Inside a host, invoke the commands directly:
/fusion:panel Review this auth middleware for session fixation and timing side-channels
/fusion:council Should we shard the event log by tenant_id or time_bucket?
/fusion:hive Build a webhook retry service with SQLite persistence and tests
How a run works
flowchart LR
A[Task] --> B[detect providers]
B --> C[route: advisory mode]
C --> D[dispatch real CLIs]
D --> E[judge from returned files]
E --> F[record in ledger]