Learn how to effectively combine Agency Swarm’s SendMessage tools with OpenAI SDK Handoffs for multi-agent coordination.
SendMessage
tool variants.SendMessageHandoff
+ OpenAI SDK.SendMessage
tool variantsOrchestrator -> Worker -> Response to Orchestrator
SendMessageHandoff
tool class + OpenAI SDKWorker -> Specialist
(control stays with Specialist)Primary Communication Uses Orchestrator Pattern
SendMessage
, Agent B will always send its response back to Agent A. This ensures predictable communication flow—you always know where responses will go.Internal Processing Can Use Handoffs
Best of Both Worlds
SendMessageHandoff
tool.
ProjectManager delegates to Developer
send_message_to_Developer
: “Implement user authentication with security best practices”.Developer consults a specialist
SecurityExpert advises
Developer finalizes and responds
ProjectManager receives a comprehensive answer
SendMessageHandoff
tools only. The agent.handoffs
parameter is not supported.