A multi-agent system coordinates several specialized agents so one application can handle distinct domains or combine their work. A travel assistant can answer destination questions, search accommodation sources, and support booking through separate agents. section 12.0
Common architecture patterns include:
- Router pattern: classify a request and dispatch it to one specialist, such as a travel information agent or an accommodation booking agent. section 12.2.3
- Supervisor pattern: coordinate specialist agents as callable sub-tools when a request requires shared intermediate results or multiple domains. section 12.3
- Hybrid execution: combine deterministic graph routing with flexible, tool-based decisions inside each specialist agent. section 12.2.3
Planning a Cornwall stay
A request for a seaside Cornwall town with good current weather, hotel availability, and a double-room price crosses travel and accommodation domains. A simple router cannot coordinate the required intermediate result; a supervisor can delegate the subtasks and combine their outputs. section 12.3
Listing 12.4 Router-based multi-agent travel assistant graph
graph = StateGraph(AgentState) #1
graph.add_node("router_agent", router_agent_node) #2
graph.add_node("travel_info_agent",
travel_info_agent) #3
graph.add_node("accommodation_booking_agent",
accommodation_booking_agent) #4
graph.add_edge("travel_info_agent", END) #5
graph.add_edge("accommodation_booking_agent", END) #6
graph.set_entry_point("router_agent") #7
travel_assistant = graph.compile() #8
Inspect the router-based LangGraph implementation: register the router and specialist nodes, connect specialists to the workflow end, set the router as entry point, and compile the graph. section 12.2.3
Reliable systems define each agent’s scope, tools, and example queries; handle ambiguous classifications with a default route or clarification; pass interagent data as JSON; and track current_agent and agent_history. LangSmith traces expose routing, tool calls, intermediate results, and handoffs for debugging. section 12.4








