liveBook · Manning

Multi-agent system

As explained in AI Agents and Applications

A multi-agent system is a software system in which multiple agents independently or cooperatively perform tasks and pursue goals.

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

How AI Agents and Applications covers it

How deep it goes
Explains router and supervisor architectures, graph assembly, communication, tracing, and reliability practices rather than agent internals.
Examples
Uses travel information, accommodation booking, weather, hotel availability, customer service, research, and trading workflows as examples.
What it assumes
Assumes specialized agents and tools, while introducing their routing, coordination, communication, and monitoring.
What you can do after
Build it from scratch with LangGraph using router or supervisor patterns, specialist tools, structured state, and tracing.
How it connects
Connects agents with routers, supervisors, tools, graph workflows, structured communication, and observability.

Also explained in

Compare how 9 books explain multi-agent system →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents and Applications. The section links point to the parts of the book it draws on.