Spawn N coordinated Claude Code agents on your repo. Pick a preset — the orchestrator does the rest.
Scale your team's AI agents without the chaos.
Run several agents per developer on different tasks. Several developers with their own agents on the same repo. Specialize by role — one codes, one reviews, one tests. Effort profiles auto-pick Haiku / Sonnet / Opus per phase so you don't waste Opus tokens on coordination chatter.
The agent-loop subscribes to the embedded MQTT broker once. Conflicts, messages, claims and resolutions arrive in real-time and are drained between turns. No separate liaison process, no polling, no extra tokens burned on coordination chatter.
6 agents coordinated via work-stealing phases to rewrite the coordinator's own unit tests from scratch. Another raid found and patched 11 real bugs in the coordinator itself. Zero duplicated work, zero merge conflicts — all via the coordinator's own announce/MQTT/consensus loop.
A live SSE dashboard shows every decision in real-time. Who's working on what, which conflicts were detected, how they were resolved. Per-agent token gauge, Anthropic quota widget, scoring-layer breakdown. Complete traceability — every coordination decision is logged.
Intent detection before code is written. Impact scoring across 4 layers. Automatic consultation when scores exceed thresholds. The coordinator doesn't replace developers — it eliminates the chaos when multiple agents work in parallel. Your agents, your repo, your rules — just without the collisions.
AI coding agents accelerate individual work — but create new team-level problems when running in parallel.
Two agents touch the same file simultaneously. One's changes silently overwrite the other's. The bug only shows up in review — or production.
Without visibility into each other's intent, two agents implement the same feature with different APIs, different schemas, different assumptions.
Nobody knows what the other agents are doing. Plans stay local, decisions are invisible. Misalignment compounds silently until it explodes.
A lightweight coordination loop that runs before every coding session, not after.
Agent declares intent — task description, target files, affected modules — before writing a single line of code.
The scorer evaluates overlap against all active intents across 4 layers: file, dependency, module, and semantic proximity.
The coordinator publishes the new thread on MQTT. Each affected agent-loop drains the event between turns and posts context, constraints, or a resolution proposal — no separate sidecar process.
Proposals are approved, contested, or re-proposed. The thread closes on consensus, or auto-resolves in gray zones. All decisions land on the dashboard timeline.
Every coordination event fans out on an embedded MQTT broker. Agents subscribe once and drain messages between turns — zero polling, zero sidecar.
The coordinator ships its own broker — no Mosquitto, no RabbitMQ to deploy. TCP on port 1883 for local/LAN, WebSocket on /mqtt over the coordinator's HTTP port for remote agents and the Bun binary.
The agent-loop subscribes to every coordinator topic at startup. New threads, messages, claims and completions arrive through a queue drained between turns — latency < 50ms end-to-end with zero wasted tokens.
Each message carries an agent_id. The listener drops messages from the local agent, so the loop never wakes itself on its own actions. One less tokens-burning rabbit hole.
Eight topics cover every event class. Wildcards (+) let agents subscribe to all threads at once.
| Topic | Emitted when | Key payload |
|---|---|---|
coordinator/consultations/new |
A thread is opened | thread_id, subject, initiator_id, target_files |
.../consultations/+/messages |
Someone posts to a thread | agent_id, name, content, type |
.../consultations/+/status |
Thread transitions state | status: open/resolving/resolved/timeout |
.../consultations/+/claimed |
Work-stealing claim (atomic) | claimed_by, thread_id |
.../consultations/+/completed |
Claimed task finishes | agent_id, thread_id, resolution |
coordinator/agents/+/status |
Agent online / offline | status, name, modules |
coordinator/broadcast |
System-wide announcement | arbitrary JSON |
coordinator/quota/update |
Anthropic quota refresh | usage, limit, utilization_pct |
Every agent prompt, hook, and MCP config is assembled — not hand-written. Pick a preset, BCE resolves the behaviors, applies composition rules, and emits prompt.md + hooks/*.sh + .mcp.json.
A preset names the behaviors. The engine resolves, validates, composes, and emits three artifacts.
Each behavior contributes numbered sections. Layers guarantee a stable prompt shape no matter the preset.
Three rules rewrite or strip sections when certain behaviors are combined — so a read-only agent doesn't say "before modifying" and a solo agent doesn't mention coordination at all.
When announce-before-write meets read-only-mode, section 020 is rewritten as "before your analysis" instead of "before modifying".
When sequential-wait meets announce-before-write, section 012 is injected: "wait for predecessor → announce → code".
When coordinator-rules.solo_mode = true, the engine strips announce + conflict-resolution entirely and overrides context with "you work alone".
Behaviors can declare a phase. When a preset has phased behaviors, the agent-loop executes them sequentially with different tool permissions. The execute phase loops: each agent atomically claims one task from the pool, runs it, drains MQTT, claims the next.
| Phase | Tools | Loop | Purpose |
|---|---|---|---|
| discover | read_only |
no | Scan code, list findings. Each agent explores independently. |
| review | none |
no | Compare discoveries to existing threads. Emit NEW/DUP/ENRICH actions — dedup the pool. |
| execute | full |
yes | Work-stealing loop: atomic claim via /api/claim-task, execute, DONE, claim next. Grace period before exit. |
| (no phase) | full |
no | One-shot mode (backward-compat). Preset runs as a single claude session. |
Four levels map to model + thinking keyword + turn budget. Cheap Haiku for ack chatter, full Opus with ultrathink for architecture debates — scoped phase by phase.
| Level | Model | Thinking | maxTurns | Use case |
|---|---|---|---|---|
| low | claude-haiku-4-5 | none | 15 | MQTT ack, coordination chatter, trivial review |
| mid | claude-sonnet-4-6 | think |
8 | Discover phase, standard execute, dispatched workers |
| high | claude-opus-4-6 | think-hard |
20 | Complex execute with thinking headroom |
| max | claude-opus-4-6 | ultrathink |
60 | Architecture debates, deep reasoning |
Worktrees are necessary but not sufficient. They solve file access — the coordinator solves coordination.
Git worktrees isolate at the filesystem level. Two agents can't overwrite the same file. But they CAN produce logically incompatible changes that merge cleanly and break at runtime.
By announcing intentions before coding, agents know what others are planning. A worktree won't tell Agent B that Agent A is about to change the User interface it depends on.
Worktrees handle the filesystem. The coordinator handles the semantics. Together: zero file conflicts AND zero intent conflicts.
Every intent is scored 0–100 against all active agents. Score determines the response.
Two modes of operation — interactive sessions or automated pipelines.
Each developer runs claude normally. Session hooks auto-register the agent, attach the agent-loop's MQTT listener, and track file edits. Coordination is transparent.
essaim run <template> launches N agent-loops in parallel worktrees. Each runs the phased protocol: discover in read-only, dedup via review, then atomically claim tasks from the shared pool until drained.
Observe what every agent is doing, what conflicts were detected, and what decisions were reached.
Self-hosted, no cloud dependency. Runs locally with Docker.
One binary. MCP server, Aedes MQTT broker and dashboard — all in one process.
Writes BCE-assembled hooks + .mcp.json into your project. Picks up the coordinator URL + your identity.
Launch Claude normally — the agent-loop is transparent. Or dispatch a template with N coordinated agents.
Four canonical conflict scenarios — all tested, all resolved correctly.
| Scenario | Description | Score | Outcome |
|---|---|---|---|
| S1 | Same file targeted by two agents simultaneously | 100 | Consultation triggered → consensus reached |
| S3 | Agent A's module depends on Agent B's current output | 80 | Gray zone — dependency flagged, agents notified |
| S2 | Both agents work within the same feature module | 30 | Gray zone — monitored, no blocking |
| S4 | Fully independent tasks, no shared files or modules | 0 | Auto-resolved — both agents proceed |
Pre-composed behavioral presets. Each template assembles agents from reusable YAML behaviors — coordination, workspace, mission, safety.
We used the coordinator to coordinate 4 agents writing tests for the coordinator.
Where we're going next.
12 portable templates, 32 BCE behaviors, 21 presets, 4 effort levels. Work-stealing phases (discover → review → execute). MQTT coordination via embedded Aedes broker. Token diagnostics and quota pre-flight.
Test coverage to 100%. Gray-zone introspection (score 30–89) validated end-to-end. TLS + remote MQTT for team setups. Per-team quota partitioning.
Community preset registry. Publish and install presets via npm. Custom behavior authoring guide. IDE integration for preset browsing.
Coordinate agent swarms across multiple repositories. Shared dependency map across microservice and monorepo boundaries. Directed lead→worker dispatch for large-scale raids.
AST-level analysis above filename scoring. Detect API contract changes, interface incompatibilities, and breaking changes before any thread opens. tengu_harbor server-gated push integration.