匠人学院 JR Academy
Skip to article
Engineering handbook
AI Agent Engineering Handbook

Start with tool calls. Understand how an agent acts, reads observations and stops when something fails. Verify each boundary with complete code and offline tests.

5 chapters·16 guides·Open access
Multi-agent Orchestration
On this page

Multi-Agent Orchestration

Use multiple agents when distinct responsibilities need different context, tools or evaluation criteria. Adding roles does not automatically improve quality; it also adds handoffs, latency and opportunities to lose evidence.

#Three orchestration patterns

PatternSuitable taskMain risk
SequentialResearch, then write, then reviewA weak handoff contaminates every later step
HierarchicalA coordinator delegates bounded subtasksCoordinator becomes a bottleneck or duplicates work
ConversationalRoles critique or negotiate alternativesRepeated discussion without a stopping rule

CrewAI illustrates role/task-oriented coordination. AutoGen illustrates agent interaction patterns. Their APIs and supported integrations change; use documentation for a pinned release rather than copying an old import blindly.

#Define the handoff contract

A researcher should return claims, source URLs, publication dates, uncertainty and unresolved questions. A writer should use that packet rather than inventing missing evidence. A reviewer checks the resulting artifact against the packet and acceptance criteria.

Give each role only its required capabilities. For example, a writer can receive source extracts without gaining permission to browse private databases or publish externally. Shared state should preserve source IDs so facts remain traceable across roles.

#Bound the team

Set limits for turns, retries, parallel work and total usage. Decide which role owns the final deliverable and which conditions require a stop. Independent tasks can run concurrently; dependent work must wait for its input.

Compare the team with a single-agent or fixed-workflow baseline on the same cases. Measure factual accuracy and completed outcomes, not number of messages. Keep a smaller design if the extra roles add no measurable benefit.

Research-team lab · LangChain multi-agent concepts↗

System Design

Core system design concepts and practical case studies

Learn the trade-offs and patterns that matter in technical interviews.

Open System Design →

FAQ

Which language should I use?
Python and TypeScript both work. Start with the language you can debug; the first exercise uses Python 3.10+ and its standard library.
Does MCP require a specific model?
No. MCP connects applications to tools and context services. Compatibility depends on the host client, transport, protocol version and authorisation; model tool-calling support is a separate check.
Does learning agents guarantee employment?
No. Use a small project to demonstrate requirements analysis, permissions, testing and maintenance. Employment outcomes depend on the role market and your actual skills.

Done reading? Next steps