Barefoot AI HubTHE BAREFOOT FREELANCER
Start learning
⬢ AI Agents · Lesson 5 of 7

10Agent Design Patterns & Multi-Agent Systems

Prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer and multi-agent teams — when to use each, with business examples.

⏱ 22 min📶 Advanced🧪 3-question check

What you'll learn

  • Recognize the six core agentic patterns
  • Pick the simplest pattern that solves a problem
  • Understand when multi-agent systems help (and when they hurt)
  • Plan observability and cost control

Patterns, from simplest to most autonomous

Most production AI systems are built from a small set of reusable patterns. Knowing them lets you design systems on paper before writing code.

1 · Prompt chaining

LLMOutline
GATECheck
LLMDraft
LLMPolish

Fixed sequence of steps, each consuming the last. Use for: content production, report generation, translation + localization.

2 · Routing

INPUTTicket
LLMClassifierbilling / tech / sales
ROUTESpecialist promptor cheaper model

Classify first, then send to a specialized handler. Also great for cost: simple questions to a small model, hard ones to a big model. Use for: support desks, inbox triage, lead qualification.

3 · Parallelization

Run several calls at once — either sectioning (different sub-tasks in parallel) or voting (same task several times, compare answers). Use for: reviewing a contract for five risk types simultaneously; content moderation where you want high confidence.

4 · Orchestrator–workers

ORCHESTRATORPlans & delegates
WORKERSSub-agents ×None per competitor
ORCHESTRATORSynthesizes

A lead model breaks the job into sub-tasks it can't predict in advance, delegates them, then combines results. Use for: market research across many sources, large codebase changes.

5 · Evaluator–optimizer

One model generates, another critiques against criteria, loop until it passes. Use for: proposals, ad copy, translations — anything with clear quality criteria.

6 · Autonomous agent

The full loop from Lesson 06: the model plans and uses tools freely within guardrails. Use for: open-ended tasks where steps depend on discoveries.

PatternPredictabilityCostPick it when…
Prompt chainingHighLowSteps are known and sequential
RoutingHighLowInputs fall into distinct categories
ParallelizationHighMediumSub-tasks are independent, or you want consensus
Orchestrator–workersMediumMed–HighSub-tasks can't be known in advance
Evaluator–optimizerMediumMediumQuality criteria are clear and iteration helps
Autonomous agentLowerHighestOpen-ended goals with tools and verification

Multi-agent systems

A multi-agent system uses several agents with different roles, instructions or tools — e.g. a researcher, a writer and a reviewer, or a planner with specialized executors. Frameworks like CrewAI, AutoGen and LangGraph make these easy to set up.

When they help

  • Work splits naturally into parallel, independent parts
  • Each part benefits from focused instructions and tools
  • The context would be too large for one agent
  • You want a separate reviewer that didn't produce the work

When they hurt

  • Tasks are tightly coupled and need shared context
  • Coordination overhead costs more than it saves
  • Errors compound between agents with no verification
  • You can't trace which agent did what

See a simulated researcher → writer → reviewer team in the AI Lab.

Running agents responsibly: observability & cost

  1. Trace every run

    Log each model call, tool call, arguments, result, tokens and time. Tools like LangSmith, Langfuse or simple JSON logs all work.

  2. Budget per run

    Cap steps, tokens and money. Alert when a run approaches the limit.

  3. Use the right model per step

    Small/cheap (or local) models for classification and extraction; strong models for planning and hard reasoning.

  4. Cache what repeats

    Long, stable system prompts and documents can often be cached by the provider to cut cost and latency.

  5. Review failures weekly

    Read failed traces, add the case to your test set, fix the prompt or tool.

Key takeaways

  • Six patterns cover most systems: chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer, autonomous agent.
  • Choose the most predictable pattern that works; add autonomy only when needed.
  • Multi-agent helps with parallel, separable work — but adds coordination cost and failure points.
  • Trace, budget, route by difficulty and review failures to keep agents reliable and affordable.

Knowledge check

0 / 3

Q1Support tickets fall into billing, technical and sales. Which pattern fits first?

Q2Generate → critique → revise until it meets criteria is called…

Q3A key risk of multi-agent systems is…

Finished this lesson?Your progress is saved in this browser.