Multi-Agent Handoffs

Kontextfreie Agent-Kommunikation

7 / 13

Multi-Agent Handoffs

Parent-Child Architektur mit Tool-based Communication

Parent Graph

Shared State: messages, active_agent

Flight Agent

handoff_tool
Private State: flight_data, bookings
Tools: search_flights, book_flight, handoff_to_hotel

Hotel Agent

handoff_tool
Private State: hotel_data, reservations
Tools: search_hotels, book_hotel, handoff_to_flight
Command Object State Update + Control Flow

Handoff Flow Beispiel

"Book me a hotel"

User Input

Calls handoff_to_hotel tool

Flight Agent

Command Object routes to hotel_agent

Orchestrator Framework

Receives full context & responds

Hotel Agent

Separation of Concerns durch kontextfreie Agenten — Swarm Framework Implementation