AI Agents and Agentic Systems
Intermediate 15 min Module 4 of 6
Module 4 of 6

Multi-Agent Systems

One agent is powerful. A team of agents working together can tackle problems that no single agent could handle alone, because they can specialize, parallelize work, and check each other's reasoning. This module covers the main patterns for multi-agent coordination and when you actually need more than one agent.

By the end of this module you will be able to

Why More Than One Agent?

Imagine a project manager, a researcher, a writer, and an editor all working on the same report. Each person has a specific job. The project manager coordinates. The researcher gathers facts. The writer drafts. The editor reviews. The whole output is better than any one person working alone, not because any individual is smarter, but because specialization reduces errors and allows work to happen in parallel.

Multi-agent systems work the same way. One agent handles planning. Another handles research. Another handles writing. Another checks the result. The division of labor produces better outcomes for complex tasks, and it allows parts of the work to run simultaneously rather than sequentially.

The core benefit Specialization and parallelism. Each agent is better at its narrow job than a single generalist agent would be, and multiple agents can work at the same time rather than waiting for each other.
Fig 4 · Orchestrator-Worker Pattern
Orchestrator Agent plans, routes tasks, synthesizes results Research Agent gathers data Analysis Agent processes results Writer Agent drafts output solid = task assignment · dashed = result return

The Main Coordination Patterns

Pattern 1
Orchestrator-Worker
One orchestrator agent breaks the task into subtasks and assigns them to specialized worker agents. The orchestrator collects results and synthesizes the final output.
Pattern 2
Peer-to-Peer
Agents communicate directly with each other, passing information and requests without a central coordinator. Works well for loosely coupled tasks.
Pattern 3
Sequential Pipeline
Agent A completes its task and hands the result to Agent B, which hands its result to Agent C. Each step transforms the output from the previous one.
Pattern 4
Critic-Reviewer
One agent produces a draft and a second agent reviews it, flags problems, and requests revisions. Improves quality through independent review.

Orchestrator-worker is the most common pattern in enterprise agentic systems. A planning agent (orchestrator) accepts the top-level goal, breaks it into specific subtasks, and routes each subtask to a specialized worker agent. The research agent fetches data. The analysis agent processes it. The drafting agent writes the output. The orchestrator assembles the final result.

Critic-reviewer is particularly useful for high-stakes tasks where accuracy matters. Rather than trusting a single agent's output, you have a second agent review it specifically looking for errors, missing information, or flawed reasoning. The two agents argue the problem from different angles, which catches mistakes a single pass would miss.

A Concrete Example: Research Report

A consultant's team wants to produce a competitive intelligence report on a target company. A single general agent could do this, but it would work sequentially and might drift in focus. A multi-agent version works like this:

The orchestrator receives the request and creates a plan with four subtasks: search for recent news, pull financial filings, identify key executives, and compile analyst coverage. It assigns each subtask to a worker agent.

Four worker agents run in parallel. Each fetches its specific information, formats it according to the orchestrator's specification, and returns it.

The synthesis agent receives all four outputs, removes duplicates, resolves conflicts, and writes the structured report.

The critic agent reviews the synthesis for factual gaps, unsupported claims, and anything that requires citation. It returns a list of items to fix.

The synthesis agent incorporates the feedback and produces the final version. Total time: parallel execution means the research phase takes the duration of the slowest worker, not the sum of all workers.

When should you stick with a single agent rather than building a multi-agent system?
Multi-agent systems add coordination overhead. Each handoff between agents is a potential point of failure. If the task is straightforward and can be handled by one agent with a good set of tools, adding more agents adds complexity without benefit. Use multiple agents when: the task is too large for one context window, the subtasks genuinely benefit from specialization, or independent review is worth the extra cost. For most simple agentic tasks, one well-designed agent is easier to build, test, and debug than a team of agents.

Risks of Multi-Agent Systems

Error amplification. When Agent A makes a mistake, Agent B may rely on that mistake as a fact and build further mistakes on top of it. Errors compound across agent handoffs. A single bad data point can cascade into a confidently wrong final report.

Coordination failures. If the orchestrator assigns ambiguous subtasks, worker agents may make incompatible assumptions and produce outputs that cannot be cleanly combined. Clear task specifications between agents matter as much as clear prompts in single-agent systems.

Runaway cost. Each agent call costs tokens. A multi-agent system running many parallel workers on a long task can consume far more tokens than expected. Always estimate the token budget of a multi-agent workflow before deploying it.

A Second Analogy: The Kitchen Brigade

Professional restaurant kitchens operate using a brigade system developed in the 19th century. There is an executive chef (the orchestrator) who owns the menu, assigns stations, and checks every dish before it leaves. There is a sous chef who runs the floor. There are station chefs for sauces, meats, fish, and pastry, each a deep specialist. There is a garde manger for cold preparations. Each person focuses on their station and hands finished components to the next station or to the pass.

This is exactly the orchestrator-worker pattern. The executive chef does not cook every dish; coordinating is a full-time job. The station chefs do not think about the whole menu; execution at their station is enough. A single cook trying to do everything would either slow down or make mistakes at busy periods. Specialization is not just about quality, it is about throughput under load.

The parallel holds for multi-agent AI systems: parallelism is the throughput benefit, specialization is the quality benefit, and the orchestrator exists specifically so that coordination does not become the bottleneck.

Common misconception "More agents always means better results." Adding agents adds coordination overhead. Each handoff between agents introduces a point where something can go wrong: the orchestrator might write an ambiguous subtask, the worker might interpret it differently than intended, and the synthesis step might not catch the mismatch. A well-designed single agent with good tools often outperforms a poorly-coordinated team of agents. Build multi-agent systems only when the parallelism or specialization benefit is clearly worth the coordination cost.

A Manufacturing Example

A large automotive manufacturer uses agentic systems for quality control across its supply chain. When a parts shipment arrives, a multi-agent pipeline processes it: a logistics agent reads the manifest and updates inventory records, an inspection agent matches the parts against engineering specifications and flags dimensional outliers, a compliance agent checks that supplier certifications are current and that material compositions meet regulatory standards, and a procurement agent updates the ERP system with delivery confirmation and triggers payment processing. An orchestrator coordinates the four agents so that payment is not triggered until inspection and compliance have both returned clean results. Running these agents in parallel means the entire incoming-shipment workflow completes in a fraction of the time it would take sequentially, while the orchestrator ensures dependencies are respected: payment never precedes successful inspection.

Python · Orchestrator Dispatching to Specialist Agents
import openai

def orchestrator(task: str) -> str:
    """Route a task to the right specialist agent."""
    task_lower = task.lower()
    if any(w in task_lower for w in ["research", "find", "search", "look up"]):
        return research_agent(task)
    elif any(w in task_lower for w in ["analyze", "compare", "evaluate"]):
        return analysis_agent(task)
    elif any(w in task_lower for w in ["write", "draft", "summarize", "report"]):
        return writer_agent(task)
    else:
        return general_agent(task)  # fallback

def research_agent(task: str) -> str:
    response = openai.chat.completions.create(
        model="gpt-4o",
        messages=[
            {"role": "system", "content":
             "You are a research specialist. Gather facts and cite sources."},
            {"role": "user", "content": task}
        ]
    )
    return response.choices[0].message.content

def analysis_agent(task: str) -> str:
    response = openai.chat.completions.create(
        model="gpt-4o",
        messages=[
            {"role": "system", "content":
             "You are an analysis specialist. Identify patterns and insights."},
            {"role": "user", "content": task}
        ]
    )
    return response.choices[0].message.content

def writer_agent(task: str) -> str:
    response = openai.chat.completions.create(
        model="gpt-4o",
        messages=[
            {"role": "system", "content":
             "You are a writing specialist. Produce clear, structured prose."},
            {"role": "user", "content": task}
        ]
    )
    return response.choices[0].message.content

def general_agent(task: str) -> str:
    response = openai.chat.completions.create(
        model="gpt-4o",
        messages=[
            {"role": "system", "content": "You are a general-purpose agent."},
            {"role": "user", "content": task}
        ]
    )
    return response.choices[0].message.content

# Usage
result = orchestrator("Research the top three EHR vendors by market share")
print(result)
Try this

Design a two-agent system for a task you know well. What is the orchestrator's job: what does it need to decide before it can route work? What does each worker specialize in, and what information does it need to receive from the orchestrator to do its job correctly? Write out the handoff specification: what exactly does the orchestrator send to each worker, and what format should each worker return its result in?

Knowledge check
In the orchestrator-worker pattern, what is the orchestrator's primary job?
Correct. The orchestrator is the coordinator. It plans the work, routes subtasks to workers, and synthesizes the results.
The orchestrator coordinates. It breaks the top-level goal into subtasks and routes each to a specialized worker, then assembles the final output.
Which risk of multi-agent systems describes mistakes building on mistakes across agent handoffs?
Correct. Error amplification is what happens when one agent's wrong output becomes the next agent's input, and the system builds on that error confidently rather than catching it.
Error amplification is the right term. It describes how a mistake early in the pipeline compounds as subsequent agents treat that mistake as fact.
Interactive 4: Orchestrator Simulator Try it

Select a task type to see which workers the orchestrator activates. Watch the routing packets travel from orchestrator to workers and back, and see how different tasks require different coordination patterns.

Workers activated: 1    Parallel execution: No    Estimated latency: Low
Before you go
Reflection: Think of a complex task at work that multiple people currently do together. Map each person's role onto an agent, then identify the orchestrator's job and the main risk of error amplification across the handoffs.
You might also like
Was this module helpful?
← Module 3: Memory Module 5: Failure Modes →