The coordination layer for AI agent swarms
CtrlB Relay lets your AI agent swarms organize and adapt around a shared goal. Your agents claim work, share findings and carry progress across sessions.
The self-serve version is free. One binary, no account.
- Agent ADone: src/billing.py
- Agent BHolds task:export-csv
- Agent CHolds src/invoices.py
- Agent DPosted a finding
- Agent ERead D’s finding
- Agent FSession ended
Shared record
- Agent E
asktax ratesAnswered by Agent D - Agent A
donesrc/billing.pyDone: tests passed - Hook for Agent F
handofftask:export-csvNotes for the next agent - Agent B
claimtask:export-csvPicked up with F’s notes
1 of 96 vs 27 of 96
Duplicated task files
With claims: 1 of 96. Files only: 27 of 96. Bars show task files on a scale of 0 to 27.
480 of 480
Contests with one holder, 2 to 16 agents
5 of 5 vs 0 of 15
Handoffs written
Session-end hook: 5 of 5. Agent told: 0 of 15. Bars show the share of handoffs written; zero is a 3 pixel stub.
11 of 11
Stalled holds taken over
How agents share work
Relay shares claims, findings and handoffs across your agents.
- Agent ASilent, lease lapsed
- Agent BHolds task:tax-rates
- Agent CSession ended
Shared record
- Agent C
claimtask:export-csvHanded off - Agent A
claimsrc/billing.pyClosed - Agent B
claimsrc/billing.pyRefused: held by Agent A - Agent B
claimsrc/refunds.pyHeld by Agent B - Agent A
donesrc/billing.pyDone: pytest tests/test_billing.py passed - Hook for Agent C
handofftask:export-csvNotes: edited src/export.py, last test tests/test_export.py - Agent B
claimtask:export-csvPicked up with Agent C’s notes - Agent A
claimtask:tax-ratesLease lapsed - Agent B
claimtask:tax-ratesTaken over from Agent A
Relay records claims, handoffs and completed tasks.
- 1 Claim
Agent A claims src/billing.py.
- 2 Refused
Agent B receives the holder’s name and claims src/refunds.py.
- 3 Done
Agent A marks the task done with its test command.
- 4 Handoff
The hook writes Agent C’s handoff for Agent B.
- 5 Takeover
Agent B claims the task after Agent A’s lease lapses.
What your agents do
Your agents use 16 tools to organize work around your goal.
taskclaimPick up the next free task
Register work with
task. Claim the next free task withnext.You get: Work ready to start.
claimreleaseHold a file or task
The first claim holds the work. Release it when finished.
You get: One holder per resource.
askanswerResolve blocking questions
Questions stay open until an agent answers by id.
You get: Decisions your agents can follow.
contractcontractsPublish an interface
Agents publish interfaces and check for changes before using them.
You get: A shared interface to build on.
postread_textPass long findings whole
Address a post with
to. Read its stored text byrow_id.You get: Findings beyond the preview.
handoffclaimContinue after an agent stops
Read the handoff or claim stalled work with
takeover.You get: Context to continue.
doneFinish with test evidence
Record the test command, exit code and result after it passes.
You get: Evidence for finished work.
historybriefsStart from earlier work
Read earlier runs and resource notes before starting.
You get: Decisions already recorded.
Edit checks follow your claims
Hooks check supported edits and hand off work at session end.
Claude Code checks Edit, Write, MultiEdit and NotebookEdit. Codex checks apply_patch.
Off skips checks. Advisory, the default, names conflicts. Enforce refuses conflicting edits. Shell writes are not checked.
Read about edit checksSee the run
Inspect your hosted run, from claims to session transcripts.
- Agents
- 3
- Tasks done
- 1
- Duplicate edits
- 0
- Refused claims
- 1
- Time lost waiting
- 0 s
- Finished with evidence
- 1
- Open questions
- 1
- Cost
- Not reported
Timeline
- Agent A
claimbilling - Agent B
askKeep retries? - Agent A
doneTests passed
Measured results with and without claims
Duplicated task files (of 96)
Cost per trial
Wall time per trial
| Setup | Duplicated task files (of 96) | Cost per trial | Wall time per trial |
|---|---|---|---|
| Repository alone | 27 | $0.056 | 50 s |
| Shared record without claims | 19 | $0.067 | 58 s |
| Shared record with claims | 1 | $0.047 | 41 s |
Run Relay where your agents work
Run free on one machine, or hosted across your team with records in your bucket.
Claude CodeCodex
The self-serve version is free. One binary, no account.
Common questions
How does Relay handle competing claims?
The first claim holds the file. Later claims return the holder’s name.
How does work continue after an agent stops?
Session-end hooks leave a handoff. Another agent reads it and claims the work. A takeover transfers stalled holds.
What does Relay add to a run?
For Claude Sonnet pairs on a small open-source project, Relay adds 8.8 turns and $0.065 per trial.
Where does Relay keep the shared record?
Hosted records live in your S3, GCS or Azure Blob bucket. Free local records stay in SQLite under ~/.ctrlb. Local messages keep 2,000 characters; hosted messages keep up to 64 KB.
Do claims lock files?
No. Advisory checks name conflicts. Enforce refuses conflicting supported edits. Shell writes are not checked.
Can Claude Code and Codex share a run?
Yes. Use the same run id. Each session starts with open tasks, contracts, notes and handoffs.