
AgentBrain Handoffs
io.github.willykeenan由 GitHub 帳號 willykeenan 發布v0.1.0更新於 Oct 25, 2026
Exact, durable handoffs between AI coding agents: one turn in the right session, never twice.
發布方自己的服務:BrainDog
概覽
一個本機 MCP 伺服器,讓編碼代理對其他已註冊的代理工作階段送出並接收持久、恰好一次的工作交接。
- 可以做什麼
- 向已註冊代理送出交接訊息與附標題的工作契約,可設定截止時間與冪等鍵,並讀取寄給目前代理身分的收件匣。接受工作、回傳結果或阻塞原因,並以接受、修改或阻塞結案。檢視投遞狀態,釋放卡住的投遞以空出接收方。搭配選用的 ContextLib 外掛,可將專案決策、事實與經驗以 Markdown 記錄、搜尋、取代與匯出。
- 適用情境
- 適用於多個 AI 編碼代理組成團隊協作、需要訊息準確送達正確工作階段且只送一次、在對方忙碌時等待,並在限定次數內重試而不遺失或重複的情境。MCP 伺服器只寫入收件匣,實際投遞由獨立的引擎程序完成。
- 執行需求
- 需要本機 Python 3.9+ 套件(僅用標準函式庫)提供 handoffs 指令,或使用已發佈的 Docker 映像。每個工作階段以 --agent 固定代理身分啟動自己的伺服器,所有程序須透過 --db 或 HANDOFFS_DB 共用同一個資料庫。投遞引擎(handoffs serve 或 handoffs run)須執行在代理所在的機器上。Codex 與 Claude Code 轉接器為實驗性。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 AgentBrain Handoffs,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
AgentBrain Handoffs
Exact, durable handoffs between AI coding agents. Each handoff is one new turn in the recipient's existing session.
Real screenshot of the demo; the data in it is invented sample data.
Open the URL it prints (http://127.0.0.1:8765/). Four simulated agents hand work to each other. Ctrl+C stops and deletes the demo data.
Why this exists
A team of coding agents already has sessions, inboxes and tools. What it lacks is delivery: a message that reaches the right session, waits if that agent is busy, is sent once, and is retried within a bound when the provider drops it.
Without that, handoffs get lost, delivered twice, or pasted into a session that is already in the middle of a turn. AgentBrain Handoffs is the delivery layer. It is a local Python package (Python 3.9+, standard library only) with a command handoffs, a live page, and an MCP server.
60-second quickstart
From a clone of this repository:
Or, once the package is on PyPI:
You should see:
The page updates every few seconds. Handoffs move through Accepted → Working → Finished. Work is returned and closed on its own. --speed 4 makes the simulated turns finish faster.
To keep the demo on another port: handoffs demo --port 9876.
A longer walkthrough, including your own agents, is in docs/QUICKSTART.md.
Concepts
A handoff is a message addressed to one registered agent. The delivery engine turns it into exactly one new turn for that agent, at the session it had when the handoff was enrolled.
A work contract is a handoff with a title. The recipient returns a result (or a blocker); the sender closes it as accepted, revision, or blocked. A due time is optional; if it passes, the sender gets one non-waking reminder.
Delivery states, in plain words:
Guarantees
- Exact recipient. A handoff is delivered only to the agent it was addressed to, at the endpoint it had when enrolled.
- One write per attempt. The attempt is reserved before sending. A lost reply goes to UNCERTAIN and is reconciled by observation. A refused write is retried once; a second refusal ends the delivery as FAILED, so it never holds the recipient.
- Never interrupt. A busy recipient keeps its turn. A second handoff to the same agent waits as BUSY.
- Bounded resend. An errored turn is resent up to twice; an interrupted turn once, after ten minutes, and only while the work is still open. Each resend has a new request id.
- Honest release. An UNCERTAIN delivery that three complete history scans over an hour prove was never received is CANCELLED. An accepted turn nobody can observe for 10 minutes becomes UNCERTAIN, so the same rule applies. When you know how a stuck delivery ended,
handoffs release IDcancels it; nothing is resent either way. - Outages hold. A provider status-page guard can hold delivery without spending an attempt.
- Deadlines. Work past its due time alerts the sender once, as a non-waking notification.
Adapters
See docs/ADAPTERS.md for settings, examples and the experimental caveats.
MCP
Each agent session launches its own MCP server. The identity is fixed at start, so a tool call cannot act as another agent.
Claude Code
Replace me with the agent id you registered (handoffs agent add me --provider claude-code ...).
Codex (~/.codex/config.toml)
Cursor (MCP servers in Cursor settings)
Point every process at the same database with --db or HANDOFFS_DB. The engine (handoffs serve or handoffs run) is what actually delivers; the MCP server only writes to the inbox. Details: docs/MCP.md.
Project memory: the ContextLib plugin
ContextLib keeps a project's decisions, facts and lessons as plain Markdown files. Install it and point the same server at a library, and each agent gets the context_* tools (brief, search, get, record, supersede, review, capture, export, import, status) next to its handoff tools:
$CONTEXTLIB_ROOT works in place of the flag. The plugin runs as the server's fixed agent id, so an agent's records are authored by exactly the agent that sent its handoffs. Without a library, the server offers handoff tools only.
CLI
--db PATH or HANDOFFS_DB selects the database (default ./.handoffs/handoffs.sqlite3). --json is accepted on the commands that print records. Usage errors exit 2.
Security
The live page binds to loopback and refuses non-loopback Host headers (DNS-rebinding). POST /api/send needs the token in <db>.token (mode 0600). --public-demo exists only on handoffs demo (simulated agents, temporary data); that page cannot send and shows plain state sentences instead of adapter errors. MCP identity is the --agent you started with. Full model: docs/SECURITY-MODEL.md.
Roadmap
- Keep the demo and command adapters stable.
- Harden the Codex and Claude Code adapters as those app protocols settle.
- More status-page presets for
outageGuard. - Planned: Agent Rooms will use this delivery contract.
Run with Docker
The image is published at ghcr.io/willykeenan/agentbrain-handoffs for Apple silicon and Intel.
The MCP server writes to the handoff database in ~/.handoffs; run the engine (handoffs serve) on the machine where your agents live so it can deliver.
License
Apache-2.0. Copyright KE Studios.
Source: github.com/willykeenan/agentbrain-handoffs. Live demo: huggingface.co/spaces/willykeenan/agentbrain-handoffs.
AgentBrain Handoffs is the open delivery layer for AgentBrain, the agent runtime coming to Agent Rooms (agentrooms.io).
來源:README.md,提交 e1c71ee
工具
0版本歷史
1- v0.1.0最新Sep 27, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Brain 整合

BrainDog
dog.brain官方發布者
BrainDog 是一個託管記錄庫,集中保存專案、決策與金錢,接入的 AI 代理在開工前讀取、結束後寫入。

danao 智能组织大脑
由 GitHub 帳號 z4215699 發布
面向受治理自主代理平台的遠端 MCP 伺服器,在審批與稽核約束下為助理提供知識庫、記憶、能力呼叫與代理委派工具。

WorldQuant BRAIN (unofficial)
由 GitHub 帳號 tukorama 發布
非官方的 WorldQuant BRAIN 伺服器,讓助理瀏覽資料欄位與算子、回測 FASTEXPR alpha 並檢視結果。
Armiqo Brain — Free B2B Account Management Playbook
由 GitHub 帳號 matt-warchol 發布
遠端 MCP 伺服器,為助理提供免費的 B2B 客戶管理手冊,涵蓋客戶留存、續約、成長與客戶規劃。

Codebase Brain
由 GitHub 帳號 Nomannazir 發布
為本機或公開 git 程式碼庫建立索引,讓助理能檢索程式碼、追溯 git 歷史、分析變更影響並找出過時文件,結果都附上檔案路徑與行號引用。