A single agent fails when one persona cannot hold conflicting goals, huge disjoint tool sets, or parallel specialties. A multi-agent system coordinates multiple agents with roles, handoffs, and shared or partitioned memory. You previewed this in Vol. 14 with CrewAI (role crews), AutoGen (conversable agents), and LangGraph (explicit multi-actor graphs).
This lecture teaches the design those frameworks implement. Module 15.4 will cross-reference the same libraries again after you have fundamentals, memory types, and MCP.
Learning Objectives
By the end of this lesson, students should be able to:
- Define a multi-agent system as multiple autonomous (or semi-autonomous) actors plus a coordination policy.
- Compare supervisor, sequential crew, and conversation/swarm styles.
- Design role prompts, handoff contracts, and shared state carefully.
- Identify failure modes: chatter loops, cost blowups, credit assignment.
- Place CrewAI, AutoGen, and LangGraph on the coordination map.
- Decide when multi-agent is justified versus a single agent + workflow.
A multi-agent system (MAS) is a set of two or more agents that interact according to a coordination policy (handoffs, a supervisor, or a conversation protocol) to achieve a goal none of them owns alone. Each agent has its own prompt/tools (and often memory); the system still needs global halt rules and eval.
Coordination Styles
| Style | How work moves | Closest Vol. 14 analog | Watch-out |
|---|---|---|---|
| Sequential crew | A → B → C tasks | CrewAI Process.sequential | Brittle if A’s output is vague |
| Supervisor / hierarchical | Router assigns specialists | CrewAI hierarchical; LangGraph router | Supervisor becomes a god-prompt |
| Conversation / swarm | Agents message until terminate | AutoGen group chat | Chatter & unclear halt |
| Graph of actors | Explicit edges + state | LangGraph | More design up front |
Minimal Supervisor Sketch
Even without a framework, you can run two specialists behind a router. Notice the handoff contract: JSON the next agent can consume—not a novel.
Contracts, Memory, and Eval
Handoff contract
- Schema, not free chat
- Explicit done_when
- Tool allowlists per role
Memory
- Shared state vs private
- Who may write long-term?
- Preview Module 15.2 types
Eval
- Score the system, not vibes
- Trace per agent
- Cost per successful task
Strengths
- Specialization & parallel work
- Separation of conflicting goals
- Mirrors human org charts
- Rich Vol. 14 framework support
Tradeoffs
- Chatter and token blowups
- Handoff lossiness
- Harder debugging
- More failure surfaces
“More agents means more intelligence.” Extra agents multiply coordination errors. A vague researcher dumping ungrounded prose on a writer creates confident nonsense faster. Prefer fewer roles, stricter handoff schemas, and a global step/cost budget—then add HITL on the risky handoff.
Knowledge Check
- Short Answer: What extra ingredient turns several agents into a MAS? Answer: A coordination policy (handoffs, supervisor, or conversation protocol) plus global halt/eval.
- True/False: AutoGen is relatively conversation-centric compared with LangGraph’s explicit graphs. Answer: True.
- Multiple Choice: CrewAI emphasizes: (a) CUDA, (b) role-based crews and tasks, (c) pooling. Answer: (b).
- Short Answer: Why use a JSON handoff instead of free chat? Answer: Parsable contracts reduce lossy, vague transfers.
- True/False: Multi-agent always beats single-agent on cost. Answer: False—chatter often costs more.
- Multiple Choice: A supervisor risk is: (a) becoming a god-prompt, (b) better stride, (c) smaller vocabs. Answer: (a).
- Short Answer: Name one MAS failure mode. Answer: Chatter loops, cost blowups, vague handoffs, or credit-assignment issues (any).
- Short Answer: When is MAS justified? Answer: Conflicting goals, disjoint tool sets, or true parallel specialties after single-agent eval fails.
- Multiple Choice: Shared vs private memory matters because: (a) fonts, (b) who can write durable facts / leak PII, (c) CNNs. Answer: (b).
- True/False: Global halt rules still apply in multi-agent systems. Answer: True.
Key Takeaways
- MAS = multiple agents + coordination + global budgets/eval.
- Pick a style deliberately: crew, supervisor, conversation, or graph.
- Handoffs need schemas; memory write rights need policy.
- CrewAI, AutoGen, and LangGraph are implementations—not a reason to skip design.
- Next: human-in-the-loop, the last fundamental control surface.
Whiteboard: Redesign a 6-agent vendor demo down to 2 roles + a workflow. Keep only handoffs that change permissions or goals.
Lab: Add a max_handoffs=3 counter to supervisor(). Force terminate with a partial answer when exceeded.
Recap: Multi-agent systems coordinate specialized actors under global halt rules. Continue with Human in the Loop.