Skip to main content

Module handoff

Module handoff 

Source
Expand description

Structured agent handoff protocol (Swarm pattern).

Implements handoff types that allow one agent to transfer control to another agent with full conversation context. This follows the Swarm pattern described in “The Hitchhiker’s Guide to Agentic AI” §18.5.3:

  • Agents have instructions and tools.
  • Handoffs are special tools that transfer control.
  • Context variables are shared state passed between agents.
  • The active agent changes dynamically based on task needs.

Structs§

BoundaryItem
A single item in the boundary list that explicitly marks what is done, in-progress, or not started. This prevents the next agent from guessing whether something is intentionally incomplete or a leftover mess.
HandoffReceipt
The handoff receipt that the target agent writes back.
HandoffRequest
A handoff request from one agent to another.

Enums§

BoundaryStatus
Status of a single feature or deliverable at handoff time.