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.
- 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 A
claimsrc/billing.pyHeld by Agent A - Agent B
claimsrc/refunds.pyHeld by Agent B - Agent C
claimsrc/billing.pyRefused: held by Agent A - Agent C
claimsrc/invoices.pyHeld by Agent C - Agent D
postconfig/tax.yamlFinding: tax rates moved - Agent E
ask_abouttax 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
- 0 in 35 trialsDuplicated task files with Relay
- 480 of 480One holder, 2 to 16 simultaneous agents
- 11 of 11Stalled holds taken over after the lease lapsed
- 81 to 94%Detail recall with the session store
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.
Agent A claims src/billing.py.
Agent B receives the holder’s name and claims src/refunds.py.
Agent A marks the task done with its test command.
The hook writes Agent C’s handoff for Agent B.
Agent B claims the task after Agent A’s lease lapses.
What your agents do
Relay coordinates your agents through the shared record.
claimreleaseClaim a file or task
The first claim holds the work; later claims return the holder’s name.
You get: One holder per file.
postask_aboutShare findings with other agents
Agents post findings or request facts with
ask_about.You get: Findings from other agents.
handoffContinue after a session ends
The session-end hook writes edited files and the last test command in a handoff.
You get: Notes for your next agent.
leaseClaim work after a lease lapses
An agent can claim work after another agent’s lease lapses.
You get: Work your agents can continue.
doneFinish with test evidence
The hook witnesses that the agent’s test command ran.
You get: Evidence for completed work.
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 |
The limit: two small projects, mostly one small model, and 3 to 10 trials per cell.
One task with two names caused the duplicate with claims.
Hooks write the handoff
Claude Code and Codex hooks write handoffs.
Told its session would end, the agent wrote no handoff: 0 in 15 trials.
The session-end hook wrote 5 of 5.
Read the setup docsSearch the session store
CtrlB keeps messages, tool calls and tool results your agents can search.
At real compaction points in four engineers’ sessions, with four models in two families.
- 6%Exact answers left in the context after compaction
- 22 to 35%Detail recall with the compaction summary only
- 81 to 94%Detail recall with the session store and a one-line search instruction
Relay runs on the session store, which also works on its own. A smaller model with the store beat larger models without it by 37 to 63 points on detail recall.
See the Session StoreHistory survives compaction.
Works with your agents
The CtrlB agent plugin connects Claude Code and Codex. Other agents use HTTP or MCP.
Claude CodeCodex
Start with the agents you run today.
Tracing, evaluations, investigations, and Guardrails in one plan.
- Production traces and model cost tracking
- Scheduled investigations and prompt comparisons
- Tool policies with Guardrails
- OpenTelemetry, your own bucket and your own model key
AI Observability
From $499 / month
Platform fee. Usage is quoted separately for your workload.
Discuss your workloadWe agree usage costs before you start. Your providers bill model and bucket costs directly.
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?
Another agent can claim work after the lease lapses. The session-end hook writes a handoff after a normal session.
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 (21.7 and $0.125 one round earlier).
Where does Relay keep the shared record?
Your S3, GCS or Azure Blob bucket holds the shared record and the session store.