Install
git clone https://github.com/dyngai/handoffkitInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →HandoffKit
Reliable handoffs for AI agent systems.
HandoffKit is a Go reference implementation for coordinating LLM agents with
explicit message passing instead of shared coordination scratchpads. It includes
mailboxes, select-style waits, routed handoffs, joins/quorums, pub/sub,
budgets, supervision, dead letters, corpus-backed compaction, and message-level
tracing.
"Do not communicate by sharing memory; instead, share memory by communicating." (Rob Pike)
Read the full blog post here: HandoffKit: coordinate agents by passing messages, not sharing memory.
- Interfaces:
sketch/ - Runtime primitives:
runtime/ - LLM-backed agents:
llm/ - Examples:
examples/ - Design notes:
docs/
Integration status:
| Surface | Status | Setup | Notes |
|---|---|---|---|
| OpenAI SDK LLM agents | Supported API path | OPENAI_API_KEY |
Uses the official OpenAI Go SDK. |
| Codex plugin / skills | Supported Codex extension path | codex plugin marketplace add dyngai/handoffkit, then install HandoffKit from /plugins |
Provides the handoffkit and handoffkit-scaffold skills inside Codex. |
| Codex transport LLM agents | Local / unsupported | codex login |
Reverse-engineered ChatGPT-session transport used for demos and experiments; it can change or break without notice. |
Core Idea
Treat each agent as an actor: private state, an addressable mailbox, and a single-owner run loop. Move work by sending messages. Ownership transfers with the message, so the sender stops touching the task after handoff.
Use message passing for control flow, and a shared Corpus of referenced
knowledge. Its default merge is last-write-wins for single-writer keys; use a
merge policy that is associative, commutative, and idempotent when multiple
agents write the same key.
Why it helps:
Selectwaits on peer messages, interrupts, budgets, cancellation, and timeouts in one place.- Single-owner handoff avoids shared-scratchpad races.
- Unbuffered mailboxes provide natural backpressure.
Tracergives a complete message-level record.
What Is Included
| Primitive | Purpose |
|---|---|
ChanMailbox |
Channel-backed inbox; unbuffered mailboxes provide rendezvous/backpressure. |
Selector |
reflect.Select over messages, deadlines, budgets, and cancellation. |
Router |
Point-to-point delivery by address. |
Broker |
Broadcast one event to every subscriber. |
JoinAgent / QuorumAgent |
Fan-in barriers. |
Budget |
Selectable resource ceiling. |
Nursery |
Structured concurrency and topology guard. |
MemCorpus / Compactor |
Shared referenced knowledge plus bounded handoff summaries. |
WithDeadLetters |
Capture undeliverable messages. |
RunTraced / Tracer |
Message-level observability. |
How It Compares
Ranked by overall similarity (language, the actor/message-passing model, and the LLM-agent domain together), the closest repos are:
Similar plugs
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
Bash is all you need - A nano claude code–like 「agent harness」, built from 0 to 1
Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro,…
Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…