LangGraph blueprint · Research & Consulting
Multi-agent supervisor
One supervisor agent routes a task between specialist agents and decides when it is done.
- Steps
- 5
- Subjective questions
- 32
- Objective questions
- 32
The problem and the outcome
Problem: One giant prompt cannot research, code and write a report well at once.
Outcome: Specialist agents, each doing one job, coordinated by a supervisor.
Architecture
How it works, step by step
- A user task arrives at the supervisor.
- The supervisor is a model that decides which specialist should act next.
- Each worker is its own agent with its own prompt and tools; the supervisor hands off to it.
- Workers write results into the shared graph state, and control returns to the supervisor.
- When the task is complete, the supervisor writes the final answer.
Tech stack
- LangGraph
- Supervisor agent with handoff tools (or the langgraph-supervisor package)
- Specialist agents with their own tools
- Shared message state
- LangSmith for per-agent traces
Key design decisions
- Each specialist has a narrow job and few tools, which makes it more reliable than one agent with everything.
- The supervisor only routes and decides when the task is done; it does not do the specialists' work.
- Pass each specialist only the context it needs, not the full history, to save tokens and reduce confusion.
Common mistakes
- Agents handing work back and forth in a loop with no stopping rule.
- Every agent seeing every message, so costs grow quickly.
- Using multiple agents where one agent with good tools would do.
What to measure
- Handoffs per task
- Task success rate per specialist
- Tokens per task vs. a single-agent baseline
Most-asked interview questions
Subjective questions 32
1When is a multi-agent system better than a single agent?Asked almost every time
When the task splits into distinct skills with different tools and prompts, when one agent's tool list or context gets too large to choose well, or when parts can run in parallel. The costs are more tokens, more latency and harder debugging, so start with one agent and split when you measure a problem.
2Design a multi-agent research assistant with a supervisor.Asked almost every time
A supervisor agent reads the request and decides which specialist to call next: a search agent with web tools, a data agent with SQL, and a writer agent. Each specialist is its own graph or create_agent with focused tools and prompt. The supervisor receives their results, decides whether more work is needed, and ends when the writer produces the final report.
3How do you prevent agents from passing huge contexts to each other?Asked almost every time
Specialists return concise summaries or structured results rather than full transcripts, shared state holds only what others need, large artifacts are stored outside and referenced, and each agent keeps its own private message history.
4How do you evaluate a multi-agent system?Asked almost every time
Evaluate end-to-end task success and cost, plus each agent separately on its own subtasks, check routing decisions (did the supervisor pick the right agent), count handoffs and loops, and compare against a single-agent baseline.
5Compare the supervisor and network (swarm) patterns.Very often asked
In a supervisor pattern a central agent decides who acts next, and specialists report back to it: predictable and easy to trace. In a network or swarm, agents hand off directly to each other: more flexible and fewer hops, but harder to control and debug.
6How do agents share information in LangGraph?Very often asked
Through the graph state: usually a shared list of messages, or a typed state with fields per agent. Handoffs are tool calls or Command objects that update the state and name the next node. Subgraphs can keep private state and return only a result.
7How does a supervisor decide which agent to call?Very often asked
It is an LLM with a routing prompt and either structured output naming the next agent or handoff tools (one per agent); its decision is routed with conditional edges or Command(goto=...).
8What are handoffs in LangGraph?Very often asked
A tool or node returns Command(goto='agent_name', update={...}), moving control to another agent and passing state updates, which is how swarm and supervisor patterns transfer work.
9How do you stop agents from looping between each other?Very often asked
Cap handoffs and the recursion limit, track visited agents in state, require the supervisor to state why another round is needed, and route to a finishing node after a maximum number of steps.
10When does a swarm pattern beat a supervisor?Very often asked
When agents are peers and the right next expert depends on the conversation, such as customer service routing between billing and tech support. The active agent hands off directly, avoiding an extra supervisor call each turn.
11How do you give each agent different models?Very often asked
Each agent is its own node or subgraph with its own model: a strong reasoning model for the supervisor or planner, cheaper fast models for simple specialists, balancing cost and quality.
12How do subgraphs help in multi-agent systems?Very often asked
Each agent can be a compiled subgraph with its own state schema, added as a node in the parent graph; state keys shared with the parent pass through, and private keys stay inside, keeping agents modular and testable.
13How do you run specialists in parallel?Very often asked
The supervisor can fan out with Send to several agents at once when subtasks are independent, then gather results with a reducer before deciding the next step.
14How do you fan out work to a variable number of parallel workers in LangGraph?Very often asked
Return a list of Send objects from a conditional edge, one per item, each naming the worker node and the state to pass it. The workers run in parallel and write into a state key with a reducer, such as list concatenation, and a later node combines the results.
Sourced from Docs by LangChain (MCP)
15How does an agent in a subgraph hand control to a node in the parent graph?Very often asked
It returns a Command with goto set to the target node, an update, and graph set to Command.PARENT, which navigates to the closest parent graph. Any state key updated this way that both graphs share must have a reducer defined in the parent state.
Sourced from Docs by LangChain (MCP)
16How do you trace a multi-agent run?Often asked
LangSmith shows nested runs per agent, with model and tool calls, so you can see which agent made which decision, its tokens and latency, and where errors started.
17What is the hierarchical supervisor pattern?Often asked
Supervisors managing teams of agents, which themselves report to a top-level supervisor, useful for very large systems such as a research team and a writing team coordinated by a project lead.
18How do you share memory across agents?Often asked
Use shared state keys for the current task, a store for long-term facts any agent can read, and avoid letting every agent write everywhere; define which agent owns which data.
19How do you handle a failing specialist?Often asked
Return an error result to the supervisor, which can retry, choose another agent, or report partial results; protect with timeouts and limits per agent.
20What are the costs of multi-agent systems?Often asked
More model calls and tokens, more latency from coordination, harder debugging and evaluation, and possible inconsistency between agents. They pay off only when specialisation or parallelism improves outcomes.
21How do you design specialist prompts?Often asked
Give each agent a narrow role, clear inputs and outputs, only the tools it needs, and instructions on what to return to the supervisor, so its behaviour is predictable and testable.
22How does the langgraph-supervisor library help?Often asked
It provides a prebuilt create_supervisor that wires agents with handoff tools and the supervisor loop, which you can customise or replace with your own graph as needs grow.
23How do you deploy a multi-agent graph?Often asked
Deploy it as one LangGraph application with persistence, or deploy agents as separate services communicating via APIs or protocols such as A2A when teams own them independently.
24What context should a handoff tool pass to the next agent?Often asked
Pass only what the next agent needs, typically the last AI message and a ToolMessage confirming the transfer, rather than the full history. Subgraph handoffs need deliberate context engineering, otherwise agents receive malformed or bloated histories.
Sourced from Docs by LangChain (MCP)
25When should you prefer a single agent with middleware over multiple agent subgraphs?Often asked
For most handoff cases, because it is simpler: one agent changes its prompt and tools based on state. Use multiple agent subgraphs only when an agent needs a bespoke implementation, such as its own graph with reflection or retrieval steps.
Sourced from Docs by LangChain (MCP)
26How do you put a time limit on one slow parallel worker?Often asked
Pass a timeout on the Send for that worker, which overrides the target node's static timeout for that dispatch only. Without one, the node's timeout set at add_node time applies, so you can keep a default and tighten it per call.
Sourced from Docs by LangChain (MCP)
27How can a supervisor call an agent that is deployed separately?Often asked
Wrap the deployment in a RemoteGraph and add it as a subgraph node. RemoteGraph exposes the same interface as a compiled graph, so the parent can invoke and stream it; use UUIDs as thread IDs if the parent has a checkpointer.
Sourced from Docs by LangChain (MCP)
28What is the A2A protocol?Sometimes asked
Agent-to-agent communication standard for agents built by different teams or vendors to discover each other's capabilities and exchange tasks and results over HTTP.
29How do you decide the number of agents?Sometimes asked
Start with one agent, split only where prompts or tools become too large or responsibilities clearly differ, and confirm each split improves evaluation metrics.
30How do you show multi-agent progress to users?Sometimes asked
Stream which agent is working and short status updates, then the final combined answer, so users understand delays and trust the result.
31How do you prevent conflicting outputs between agents?Sometimes asked
Make one agent (often the supervisor or writer) responsible for the final answer, give it all specialist results, and instruct it to reconcile or flag disagreements.
32How do you route one query to several knowledge sources at once and merge the answers?Sometimes asked
A classify node decides which sources apply, a routing function returns one Send per chosen source node so they run in parallel, and each source node writes its findings for a synthesize node that combines them into one answer.
Sourced from Docs by LangChain (MCP)
Objective questions 32
1What is the supervisor's main job?Asked almost every time
Why: It plans and delegates; the specialists do the work with their own tools.
2What should specialists return to the supervisor?Asked almost every time
Why: Keeps shared context small.
3How does an agent hand control to another in LangGraph?Asked almost every time
Why: It moves control with state updates.
4What should multi-agent systems be compared against?Asked almost every time
Why: Multi-agent must earn its cost.
5What is a common downside of multi-agent systems?Very often asked
Why: Extra coordination messages and model calls add cost and time.
6What stops agents from bouncing work forever?Very often asked
Why: Route to finish after a limit.
7When does a swarm beat a supervisor?Very often asked
Why: Avoids an extra supervisor call.
8How do specialists run in parallel?Very often asked
Why: Gather results with a reducer.
9How do subgraphs keep agents modular?Very often asked
Why: Shared keys pass through.
10Which agent typically gets the strongest model?Very often asked
Why: Routing decisions matter most.
11What does a failing specialist return?Very often asked
Why: Supervisor retries or reroutes.
12Which LangGraph primitive fans out to a variable number of parallel nodes?Very often asked
Why: Each Send dispatches one node invocation with its own state.
Sourced from Docs by LangChain (MCP)
13graph=Command.PARENT in a Command means…Very often asked
Why: Subgraph agents use it to hand off.
Sourced from Docs by LangChain (MCP)
14In LangGraph, how does one agent hand control to another?Often asked
Why: A handoff updates the state and routes execution to the target agent's node.
15The hierarchical pattern adds…Often asked
Why: It organises teams within teams.
16Which prebuilt helper wires a supervisor loop?Often asked
Why: From langgraph-supervisor.
17Specialist prompts should be…Often asked
Why: Predictable behaviour.
18A main cost of multi-agent systems is…Often asked
Why: Coordination overhead.
19Long-term facts shared by agents belong in…Often asked
Why: Readable across threads.
20Which tool shows nested runs per agent?Often asked
Why: Find where errors start.
21Which protocol lets agents from different vendors collaborate?Often asked
Why: Agent-to-agent tasks over HTTP.
22Who should own the final answer?Often asked
Why: Avoids conflicting outputs.
23A shared key updated from a subgraph into the parent needs…Often asked
Why: Concurrent updates must be merged.
Sourced from Docs by LangChain (MCP)
24A per-dispatch timeout for one worker is set on…Often asked
Why: It overrides the node's default timeout for that call.
Sourced from Docs by LangChain (MCP)
25Which lets a deployed graph be used as a subgraph node?Often asked
Why: It exposes the same interface as a compiled graph.
Sourced from Docs by LangChain (MCP)
26For most handoff use cases, the docs recommend…Often asked
Why: It is simpler than multiple agent subgraphs.
Sourced from Docs by LangChain (MCP)
27When should a single agent be split?Sometimes asked
Why: Confirm with evaluations.
28How should progress be shown to users?Sometimes asked
Why: Builds trust during delays.
29Routing accuracy measures…Sometimes asked
Why: A key multi-agent metric.
30Agents owned by separate teams may be deployed…Sometimes asked
Why: Independent ownership.
31Large artifacts between agents should be…Sometimes asked
Why: References save a lot of tokens.
32A handoff tool usually passes the next agent…Sometimes asked
Why: Lean context avoids malformed or bloated histories.
Sourced from Docs by LangChain (MCP)
Track your progress through every blueprint in your dashboard.
Start learning