Multi-Agent Systems with LangGraph

Design multi-agent pipelines using the LangGraph Supervisor pattern. Covers StateGraph construction, TypedDict shared state, add_messages reducer, checkpointers, human-in-the-loop interrupts, parallel branches, and error routing between specialist agents.

Overview

Overview

Multi-agent systems split a complex task across specialist agents that each own one narrow concern. LangGraph wires them together: agents become graph nodes and messages flow through shared state, which gives you explicit control over routing, state and persistence that a single monolithic agent chain cannot provide.

This chapter follows one example, a supervisor with two specialists. A user request goes to the supervisor, which routes and does no work itself. When the supervisor sets next to the researcher, the Researcher uses web search tools and appends a summary to the shared state. When it sets next to the writer, the Writer drafts the report and appends the draft. The shared state, the messages plus a few flags, flows back to the supervisor after each specialist, and when the supervisor sets next to end, the graph stops at END with the final draft. All the while, a checkpointer keyed by thread_id saves a snapshot of the state at every superstep, one round of node execution.

Interview questions

  • Design a multi-agent system where a Researcher agent gathers data from the web, and a Writer agent drafts a report. How do they communicate, and how do you handle state?
  • How does state persistence work in LangGraph? What is the difference between MemorySaver and SqliteSaver?
  • How do you run the Researcher and Writer agents in parallel instead of sequentially?
  • How do you add a human approval checkpoint between the Researcher and Writer stages?

Sign up free to read the full topic

More Agentic AI topics

Start free on Cariara · Coding problems · System design studio