[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3
Handoffs & Multi-Agent Patterns
Agent-to-Agent Delegation
Handoffs are the primary mechanism for multi-agent collaboration. When Agent A encounters a task outside its expertise, it delegates to Agent B by executing a handoff - a typed tool call that transfers control and conversation history.
from agents import Agent, Runner
billing_agent = Agent(
name="Billing Agent",
instructions="Handle billing questions, refunds, and subscription changes.",
model="o3-mini"
)
tech_agent = Agent(
name="Tech Support",
instructions="Handle technical issues, bugs, and feature requests.",
model="o3-mini"
)
triage_agent = Agent(
name="Triage Agent",
instructions="Determine if the user needs billing help or technical support. Hand off accordingly.",
handoffs=[billing_agent, tech_agent],
model="o3-mini-mini" # Use cheaper model for routing
)
result = await Runner.run(triage_agent, "I was charged twice last month")
# Triage → Billing Agent (automatic handoff)
Multi-Agent Patterns
| Pattern | Description | Use Case |
|---|---|---|
| Manager/Router | Central agent routes to specialists | Customer support triage |
| Pipeline | Agents chain sequentially | Research → Write → Edit |
| Peer-to-Peer | Agents hand off freely between each other | Collaborative problem solving |
🎯 Cost Tip: Use cheaper models (OpenAI o3-mini Mini) for routing/triage agents, and premium models (OpenAI o3-mini Thinking) for specialist agents that need deep reasoning.
SYNAPSE VERIFICATION
QUERY 1 // 3
What happens during a handoff?
The first agent is destroyed
Control and conversation history transfer to the target agent
Both agents run in parallel
The user must restart the conversation