LangChain & LangGraph for AI Agents
Back to Production Patterns: Multi-Agent, Memory & Observability

Multi-Agent Systems and Supervisor Patterns

When one agent isn't enough. Coordinator patterns for systems with specialized workers. FIND_VIDEO: search 'multi-agent system supervisor LangGraph tutorial' — recommended channel: LangChain / CrewAI / Sam Witteveen. Aim for 11 min or under.

10 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.
Loading progress...

Key moments

  1. Architecture Overview — Introduction to centralized multi-agent orchestration and the supervisor coordination pattern.
  2. Prebuilt Sub-Agents Setup — Configuring specialized ReAct sub-agents with tools and initializing the supervisor graph.
  3. Graph Invocation Schema — Compiling the supervisor graph and executing queries using the MessagesState dictionary structure.
  4. Handoff Mechanics & Tracing — Inspecting tool calls, ToolMessages, and intermediate execution steps across agent handoffs.
  5. Custom Graph Sub-Agents — Integrating arbitrary LangGraph StateGraph agents using explicit compilation naming.
  6. Output Modes & Context — Comparing full_history and last_message output modes to manage token consumption.
  7. Supervisor Library Internals — Analyzing create_supervisor source code, tool name normalization, and model binding mechanisms.
PDF notes

Frequently asked questions

How does the supervisor know which tools belong to which sub-agent?

The supervisor does not see individual sub-agent tools; it only sees high-level `transfer_to_<agent_name>` tools generated automatically by `create_supervisor`.

Can I mix prebuilt ReAct agents and custom StateGraph workflows in the same supervisor?

Yes, provided the custom graphs use `MessagesState` and are compiled with a `name` argument, both agent types can be passed together in the `agents` list.

What happens after a sub-agent completes its execution?

The sub-agent's output is wrapped in a `ToolMessage` and returned to the supervisor, which either delegates to another agent or synthesizes the final user answer.

Why does the supervisor generate an empty AIMessage during delegation?

The supervisor's `AIMessage` contains tool call definitions under `tool_calls` rather than textual content, instructing LangGraph runtime to execute the handoff.

How was this lesson?

Your feedback helps us refine explanations and catch bugs.