Working with Multi-Agent Systems

Working with Multi-Agent Systems

GenAI-Powered .NET Β· double-click any text to add a note Β· hover dotted terms for definitions
Tutorial 22 of 27 Advanced C#

1 Overview: From Building Blocks to Working Systems

Tutorials 17 through 21 gave you every building block a multi-agent system needs: agents in two frameworks, planners, orchestration patterns, agent-first architecture, governance, and MCP for shareable tools. This tutorial assembles them into complete, production-oriented systems. Rather than introducing new mechanisms, it names the recurring shapes those mechanisms combine into — multi-agent design patterns — and addresses the questions that only arise once a system is real: how do you orchestrate a whole workflow end to end, how does it scale under load, and how do you know it actually works?

This advanced tutorial covers multi-agent design patterns (pipeline, specialist, critic, hierarchical); workflow orchestration for coordinating a multi-step process reliably; scaling multi-agent systems as load grows; evaluation and testing of agent systems, since 'it worked in the demo' is not evidence of production readiness; and two worked syntheses — a multi-agent document-processing example and a collaborative analysis pipeline — that combine every subtopic into runnable designs.

Nothing here is a new mechanism. Every pattern in this tutorial is built from tutorials 17–21's agents, orchestration, governance, and MCP tools — this tutorial's job is naming the recurring shapes and closing the production gaps (scale, evaluation) those tutorials didn't need to cover individually.

2 Learning Objectives

  • Recognize and apply the four common multi-agent design patterns: pipeline, specialist, critic, and hierarchical.
  • Design workflow orchestration for a multi-agent process, including state tracking and failure handling.
  • Identify scaling considerations for multi-agent systems and address bottlenecks with horizontal scaling.
  • Build an evaluation and testing strategy for agent systems using golden datasets, metrics, and regression testing.
  • Design a multi-agent document-processing system and a collaborative analysis pipeline end to end.

3 Prerequisites

  • Tutorials 17–19: agents, planners, and orchestration in Semantic Kernel and AutoGen.
  • Tutorial 20: agent-first architecture, communication models, and governance (capability scoping, policy engines, audit trails).
  • Tutorial 21: MCP servers, for tool-sharing across the agents in a multi-agent system.
  • General familiarity with testing practices (unit/integration tests) and basic queueing/scaling concepts from traditional distributed systems.
This tutorial is a synthesis. If a pattern here feels unfamiliar, it's worth a quick look back at the specific earlier tutorial it draws from — the reference is called out in each deep-dive.

4 Key Concepts: Naming the Recurring Shapes

A multi-agent system is several specialized agents coordinating — via a communication model (tutorial 20) and an orchestration pattern (tutorial 18) — toward work no single agent does as well alone. Across many real systems, the same handful of design patterns recur: pipeline (fixed sequence), specialist (route to the right expert), critic (produce then review), and hierarchical (a supervisor delegates). Recognizing which pattern a problem fits is faster than re-deriving an orchestration from scratch every time.

Concept Question it answers Built from
Design pattern What shape should this multi-agent collaboration take? Orchestration patterns (tutorial 18) + communication models (tutorial 20)
Workflow orchestration How does the whole multi-step process run reliably start to finish? Agents + governance + ordinary distributed-systems reliability practice
Scaling What happens to this system under 100x the load? Horizontal scaling of agent instances + identifying bottlenecks
Evaluation & testing How do we know this system actually works, and keeps working? Golden datasets, metrics, regression testing

The two worked examples — document processing and collaborative analysis — are not new topics; they are the previous four concepts applied to concrete, common enterprise scenarios, showing how a design pattern, an orchestration, scaling considerations, and an evaluation strategy come together in one real system.

A useful mental test throughout this tutorial: for any real multi-agent system you're designing, you should be able to name its design pattern, describe its workflow orchestration, state its scaling plan, and point to its evaluation suite. If you can't answer one of the four, that's the gap to close before calling it production-ready.

5 Deep Dive 1: Multi-Agent Design Patterns

Four patterns cover most multi-agent systems in practice, each a named combination of the orchestration patterns and communication models from tutorials 18 and 20. The pipeline pattern runs agents in a fixed sequence, each consuming the previous one's output — sequential orchestration with direct handoff, well suited when the stages are known and always run in the same order (research, then draft, then edit). The specialist pattern routes each incoming request to whichever specialized agent best matches it — handoff orchestration, well suited when requests vary in kind and each kind has a clear expert (billing questions to a billing agent, technical questions to a technical agent).

The critic pattern has one agent produce work and a second agent review and critique it before acceptance — group chat orchestration between exactly two roles, well suited whenever quality control benefits from an independent second look (a Developer/Reviewer pair from tutorial 19). The hierarchical pattern has a supervising agent decompose a goal into sub-tasks and delegate them to subordinate agents, then combine their results — closest to a planner (tutorial 18) driving several specialist agents, well suited for genuinely complex goals that don't map to one fixed sequence.

🎬 Four patterns, side by side
The same idea — several agents, one goal — shaped four different ways.
Pipeline fixed sequence
➜
Specialist route to expert
➜
Critic produce + review
➜
Hierarchical supervisor delegates
Pattern Orchestration basis Pick when
Pipeline Sequential orchestration Stages are known and always run in the same fixed order
Specialist Handoff orchestration Requests vary in kind, each kind has a clear expert agent
Critic Group chat (2 roles) An independent second look measurably improves quality
Hierarchical Planner + specialist agents The goal is broad and doesn't map to one fixed sequence
Patterns compose. A hierarchical system's subordinate agents are often themselves pipelines or specialist routers — pick the pattern at each level of the design independently rather than forcing one pattern to cover the whole system.

6 Deep Dive 2: Workflow Orchestration

Workflow orchestration is the practical machinery that runs a multi-step, possibly multi-agent process reliably — tracking which step is active, what state has accumulated, and what happens when a step fails. Where tutorial 18's termination strategies decided when an agent conversation should stop, workflow orchestration decides how an entire business process (of which agent turns may be only one part) moves from start to finish, including steps that aren't agent calls at all — saving state, sending a notification, waiting for a human approval.

A simple workflow tracking state across steps (illustrative)
public enum WorkflowStatus { Pending, Extracting, Reviewing, Approved, Failed }
public sealed record WorkflowState(string Id, WorkflowStatus Status, string? Result, string? Error);

async Task RunDocumentWorkflowAsync(string documentId, IWorkflowStore store)
{
    var state = new WorkflowState(documentId, WorkflowStatus.Extracting, null, null);
    await store.SaveAsync(state);   // checkpoint before risky work -- durable execution

    try
    {
        string extracted = await extractionAgent.InvokeAsync(documentId);
        state = state with { Status = WorkflowStatus.Reviewing, Result = extracted };
        await store.SaveAsync(state);   // checkpoint again

        string reviewed = await reviewAgent.InvokeAsync(extracted);
        state = state with { Status = WorkflowStatus.Approved, Result = reviewed };
    }
    catch (Exception ex)
    {
        state = state with { Status = WorkflowStatus.Failed, Error = ex.Message };
    }
    await store.SaveAsync(state);
}

Checkpointing state after each meaningful step, as above, is what gives durable execution: if the process crashes after extraction but before review, a restart can resume from 'Reviewing' with the extracted text already in hand, rather than re-running (and re-billing) the extraction step. This matters more for multi-agent workflows than single-call systems because they take longer, involve more steps, and each step is a real cost (a model call, a tool invocation) worth not repeating unnecessarily.

Workflow orchestration is where tutorial 20's governance concretely attaches: a policy check or human-approval step is just another node in the workflow, and the audit trail is simply logging every state transition — 'orchestrating a workflow' and 'enforcing governance' are the same activity viewed from two angles.

7 Deep Dive 3: Scaling Multi-Agent Systems

A multi-agent system that works for ten requests a day faces new questions at ten thousand: which agent is the bottleneck, and how much can horizontal scaling — running more instances of an agent in parallel — help. Because each agent typically wraps a model call, the honest first bottleneck is almost always the model deployment's own rate limit (tutorial 11's tokens-per-minute quota), not the agent code itself; scaling agent instances beyond what the underlying model deployment can serve just produces more requests waiting in a queue, not more completed work.

🎬 Finding the real bottleneck
More agent instances help only up to the next constraint.
Incoming load growing
➜
Agent instances horizontally scaled
➜
Model deployment rate-limited
➜
Downstream tool/API its own limits

Beyond model-level limits, throughput improves through familiar distributed-systems practice applied to agents: run stateless agent instances behind a queue so bursts don't overwhelm downstream systems; batch independent work where the pattern allows it (concurrent orchestration, tutorial 18); cache results for repeated or near-duplicate requests (especially useful for retrieval steps); and apply tutorial 13's resilience patterns (retry, circuit breaker) so one overloaded dependency degrades gracefully instead of cascading. None of this is agent-specific — it's the same scaling discipline any high-throughput service needs, applied to a system whose 'service calls' happen to be model invocations.

Multi-agent systems can be more expensive to scale than they look: a hierarchical or critic pattern may issue several model calls per logical request, so 'throughput' for these systems means throughput against the model deployment's aggregate token budget, not just request count.

8 Deep Dive 4: Evaluation and Testing of Agent Systems

Tutorial 18 taught testing an individual workflow's termination behavior (does it converge, does the backstop fire); evaluation and testing of agent systems generalizes this to the whole system's ongoing correctness. The foundation is a golden dataset: a curated set of representative inputs with known-correct expected outputs, built from real or realistic cases, covering both the common path and known edge cases. Against it, define evaluation metrics appropriate to the system — accuracy of extracted data, groundedness of a generated answer (tutorial 15), whether a routing decision picked the right specialist, plus operational metrics like latency and cost per request.

A minimal evaluation harness against a golden dataset (illustrative)
public sealed record GoldenCase(string Input, string ExpectedCategory);

async Task<EvaluationReport> EvaluateAsync(
    IReadOnlyList<GoldenCase> goldenSet, ISpecialistRouter router)
{
    int correct = 0;
    var failures = new List<string>();

    foreach (var testCase in goldenSet)
    {
        string actualCategory = await router.RouteAsync(testCase.Input);
        if (actualCategory == testCase.ExpectedCategory) correct++;
        else failures.Add($"'{testCase.Input}' routed to {actualCategory}, expected {testCase.ExpectedCategory}");
    }

    double accuracy = (double)correct / goldenSet.Count;
    return new EvaluationReport(accuracy, failures);
}

Run this evaluation as regression testing — automatically, on every change to prompts, agent instructions, tools, or the underlying model — because agent behavior can shift in subtle ways that ordinary unit tests over deterministic code would never catch. Tutorial 18's two-sided termination test (does the intended path converge, does the backstop actually fire) generalizes here too: a complete agent-system test suite includes the happy path, known edge cases, adversarial inputs (tutorial 20's manipulation concern), and the failure/backstop paths (what happens when a tool errors, when a model call times out).

Building the golden dataset is usually the most time-consuming and most valuable part of this work. A team that skips it and relies on 'it looked right when I tried it' has no way to detect when a prompt change quietly regresses behavior on the cases they didn't happen to try.

9 Ecosystem and Tools

Piece Role in a multi-agent system
Semantic Kernel / AutoGen (tutorials 17, 19) Implement the individual agents that a design pattern combines
Orchestration patterns (tutorial 18) The mechanical basis pipeline/specialist/critic/hierarchical patterns are named combinations of
Agent-first governance (tutorial 20) Capability scoping, policy engines, and audit trails attached at each workflow step
MCP servers (tutorial 21) Shared tools multiple agents in the system (and other systems) can reuse
Workflow/orchestration frameworks Durable execution engines for checkpointing long-running, multi-step processes
Message queues Decouple agent instances from load spikes for horizontal scaling
Evaluation/observability tooling (extends tutorial 13's logging) Runs golden-dataset evaluations and tracks metrics over time
Azure AI Foundry (tutorial 16) Where evaluation runs and model deployments for a multi-agent system can be managed together

Every row in this table is something tutorials 12 through 21 already introduced individually. This tutorial's contribution is showing how they combine into named, recognizable system shapes and closing the two gaps (scale, evaluation) that only appear once a system moves from demo to production.

10 Use Cases

  • Contract review pipeline: extraction agent, then a clause-classification agent, then a risk-summary agent — a pipeline pattern with workflow orchestration tracking each document's progress.
  • Customer support routing: a specialist pattern with a router agent directing billing, technical, and account questions to dedicated expert agents.
  • Content generation with quality gates: a critic pattern where a writer agent drafts and a reviewer agent enforces house style before publication.
  • Complex research tasks: a hierarchical pattern where a supervisor agent decomposes 'evaluate these three vendors' into sub-tasks delegated to specialist research agents, then synthesizes their findings.
  • Invoice processing at scale: a multi-agent document-processing system handling thousands of invoices a day, requiring horizontal scaling and durable workflow execution to survive restarts mid-batch.
  • Incident investigation: a collaborative analysis pipeline where log, metrics, and configuration-review agents each examine the same incident independently, synthesized into one root-cause report.
  • Any agent system heading to production: evaluation and testing against a golden dataset before launch, and as regression testing on every subsequent change.

11 Code Examples: A Multi-Agent Document-Processing System

This example works through the tutorial's first synthesis subtopic: a document-processing pipeline combining the pipeline pattern, workflow orchestration, and governance from tutorial 20.

Example 1 — The pipeline: extraction, classification, validation agents
public sealed record DocumentResult(string ExtractedText, string Category, bool IsValid, string? ValidationError);

async Task<DocumentResult> ProcessDocumentAsync(string documentId, IWorkflowStore store)
{
    // Step 1: extraction agent -- pulls text/fields from the raw document.
    string extracted = await extractionAgent.InvokeAsync(documentId);
    await store.CheckpointAsync(documentId, "Extracted", extracted);

    // Step 2: classification agent -- decides document type (invoice, contract, etc.).
    string category = await classificationAgent.InvokeAsync(extracted);
    await store.CheckpointAsync(documentId, "Classified", category);

    // Step 3: validation agent -- checks required fields are present for this category.
    (bool isValid, string? error) = await validationAgent.ValidateAsync(extracted, category);
    await store.CheckpointAsync(documentId, isValid ? "Validated" : "ValidationFailed", error);

    return new DocumentResult(extracted, category, isValid, error);
}
Example 2 — A governance gate before the pipeline's final action
// Following tutorial 20's pattern: consequential actions get a policy check.
if (result.IsValid && result.Category == "invoice")
{
    var decision = policyEngine.Evaluate(
        new AgentAction("InvoiceAgent", "schedulePayment", ExtractAmount(result), documentId));
    if (decision.RequiresHumanApproval)
        await humanApproval.RequestAsync("Invoice payment needs approval", result);
    else
        await SchedulePaymentAsync(result);
}
Example 3 — Horizontal scaling with a queue (illustrative shape)
// A queue decouples document arrival from processing capacity --
// N worker instances pull from the same queue, scaling horizontally.
await documentQueue.EnqueueAsync(new DocumentJob(documentId));

// Each worker instance runs the same loop; add more instances to raise throughput,
// up to whatever the model deployment's rate limit allows.
await foreach (DocumentJob job in documentQueue.ConsumeAsync(ct))
{
    await ProcessDocumentAsync(job.DocumentId, store);
}

12 Step by Step: A Collaborative Analysis Pipeline

This walkthrough builds the tutorial's second synthesis subtopic: a collaborative analysis pipeline where several specialist agents examine the same input independently and a synthesis step combines their findings — extending tutorial 20's blackboard example into a complete, evaluated system.

  1. Define the scenario: analyzing a customer-support incident using three specialist agents — a log-analysis agent, a metrics agent, and a customer-history agent — each examining the same incident id independently.
  2. Implement each specialist as an agent (Semantic Kernel or AutoGen) with a narrow tool set: the log agent queries log storage, the metrics agent queries a metrics API, the history agent queries customer records — via MCP servers if these are shared enterprise systems (tutorial 21).
  3. Run the three specialists concurrently (concurrent orchestration, tutorial 18) since their findings are independent and don't depend on each other's output.
  4. Implement a synthesis step: a dedicated agent (or a single well-grounded prompt function) that receives all three findings and produces one coherent root-cause hypothesis, citing which specialist findings support it.
  5. Wrap the whole thing in workflow orchestration: checkpoint after the specialists complete and after synthesis, so a failure doesn't require re-running specialists that already succeeded.
  6. Add evaluation: build a golden dataset of past incidents with known root causes, run the pipeline against each, and measure how often the synthesized hypothesis matches the known cause.
  7. Add scaling: since the three specialists run concurrently per incident, and multiple incidents may be analyzed at once, confirm each specialist's backing system (log storage, metrics API) can handle the resulting concurrent load, not just the orchestration code.
  8. Test the two-sided termination-adjacent case: what happens when one specialist's tool times out or errors — confirm the synthesis step still produces a (clearly caveated) result from the remaining findings rather than failing the whole pipeline.
  9. Run the evaluation suite as a regression test after any change to a specialist's instructions or tools, and track accuracy over time.
  10. Reflect on pattern identity: this system is a hybrid — concurrent specialists (not quite the 'critic' pattern) feeding a hierarchical-style synthesis step — a reminder that real systems often combine named patterns rather than matching one exactly.
Log which specialist findings the synthesis step actually used in its conclusion. When the evaluation suite flags a wrong hypothesis, this tells you immediately whether a specialist's finding was wrong or the synthesis step misweighted correct findings — the same 'log to separate root cause from generation' discipline from tutorial 15's RAG debugging, applied to multi-agent synthesis.

13 Limitations and Caveats

  • The four design patterns are common shapes, not an exhaustive taxonomy — real systems often combine or deviate from them, as the collaborative analysis walkthrough's hybrid shape shows.
  • Workflow orchestration and durable execution add real complexity (a state store, checkpoint logic) that a short-lived, low-stakes workflow may not need — apply it where restart cost or duration genuinely justifies it.
  • Scaling agent instances is capped by the underlying model deployment's rate limits; teams that scale infrastructure without also addressing model quota will see queuing, not more completed work.
  • Multi-agent systems can be substantially more expensive per request than a single model call (a hierarchical or critic system may issue several calls per logical request) — throughput and cost planning must account for this multiplier.
  • A golden dataset is only as good as its coverage; a dataset that only reflects the common path will not catch regressions in edge-case or adversarial handling.
  • Evaluation metrics like 'accuracy' can be harder to define precisely for open-ended agent outputs than for classification tasks — some systems need human-graded evaluation or a model-as-judge approach, each with its own caveats.
  • This tutorial's code examples (workflow state stores, evaluation harnesses, queues) are illustrative shapes, not endorsements of a specific product; real systems typically adopt an existing workflow engine, queue, or evaluation platform rather than hand-rolling these from scratch.
  • Collaborative analysis and document-processing examples here are illustrative scenarios; a real deployment needs the full governance stack from tutorial 20 (capability scoping, authorization, audit) that space here only partially shows.

14 Best Practices

  • Name the design pattern for any multi-agent system you build (pipeline, specialist, critic, hierarchical, or an explicit hybrid) — it clarifies the orchestration and communication model choices immediately.
  • Checkpoint workflow state after every meaningful step in a long-running or multi-agent process, so failures cost minutes of re-work, not hours.
  • Diagnose the real bottleneck (usually the model deployment's rate limit or a downstream tool) before scaling agent instances horizontally — more instances against the same constraint just queues more work.
  • Build a golden dataset before launch, not after an incident, and treat evaluation as regression testing that runs on every change to prompts, tools, or instructions.
  • Test both the intended path and the failure/backstop paths for every multi-agent workflow, extending tutorial 18's two-sided termination testing to the whole system.
  • Attach governance (capability scoping, policy checks, audit logging) at workflow steps, not as an afterthought bolted onto the finished system.
  • Log which agent or specialist contributed to a final synthesized or routed outcome, so evaluation failures can be traced to a specific component.
  • Expect and design for hybrid patterns in real systems rather than forcing a design into one named pattern that doesn't quite fit.
Common mistake Do this instead
No design-pattern vocabulary for the system Name the pattern (or explicit hybrid) — it clarifies design decisions immediately
No checkpointing in a long multi-agent workflow Checkpoint state after each meaningful step for durable execution
Scaling agent instances without checking model quota Diagnose the real bottleneck first — often the model deployment's rate limit
Shipping without a golden dataset Build one before launch; run it as regression testing on every change
Testing only the happy path Test failure/backstop paths too — tool timeouts, model errors, adversarial input
Governance added after the system is built Attach policy checks and audit logging at each workflow step from the start

20 Summary

  • Four multi-agent design patterns — pipeline, specialist, critic, hierarchical — name recurring combinations of tutorials 18/20's orchestration patterns and communication models; real systems often combine them into deliberate hybrids.
  • Workflow orchestration coordinates an entire multi-step process reliably, including non-agent steps, with durable execution (checkpointing) so failures don't force costly re-work.
  • Scaling multi-agent systems means diagnosing the real bottleneck — usually the model deployment's rate limit — before adding agent instances horizontally, since scaling past the true constraint just adds queuing.
  • Evaluation and testing of agent systems requires a golden dataset, meaningful metrics, and regression testing on every prompt/instruction/model change, because agent behavior shifts in ways deterministic-code tests can't catch.
  • The document-processing pipeline and collaborative analysis pipeline syntheses show every prior concept — design pattern, orchestration, governance, scaling, evaluation — working together in one concrete system.
  • This tutorial introduced no new mechanisms: it named recurring shapes and closed the scale and evaluation gaps that only appear once a system built from tutorials 17–21's building blocks needs to run in production.

You now have a complete, production-oriented view of multi-agent systems: recognizable design patterns, reliable workflow orchestration, a scaling discipline that finds the real bottleneck instead of guessing, and an evaluation practice that provides evidence instead of impressions. Every piece traces back to tutorials 12 through 21 — nothing here was new mechanism, only synthesis and the operational maturity production demands. With a working, evaluated, scalable multi-agent system in hand, the course now turns to the final step: actually deploying these GenAI applications reliably.

21 Next Steps

Next tutorial: Deploying GenAI Applications (deploying-genai-applications). You've now built, architected, governed, and evaluated multi-agent systems — the next tutorial addresses getting them safely into production: deployment strategies, environment configuration, and the operational practices that keep a GenAI application running reliably once it's live.

  • Practice: identify which of the four design patterns (or hybrid) best fits a real system you're building or have built, and justify the choice in writing.
  • Practice: add checkpointing to an existing multi-step agent workflow and simulate a crash between steps, confirming a restart resumes correctly without re-running completed work.
  • Practice: build a golden dataset of 20-30 cases for a system you've built in this course, run an evaluation, and identify at least one edge case your manual testing had missed.
  • Practice: complete the collaborative analysis pipeline walkthrough, including the partial-failure test (one specialist times out), and confirm the synthesis step degrades gracefully.
  • Read: general distributed-systems material on horizontal scaling and bottleneck analysis, plus any current guidance on evaluation frameworks for LLM-based and agentic systems.
Keep your golden dataset and evaluation harness from this tutorial — the deployment tutorial's discussion of monitoring and rollback assumes you already have a way to measure whether a new deployment's behavior is still correct.

15 Quiz: Working with Multi-Agent Systems

Pick an answer for each question, then press Check answer. (Notes are disabled in this tab.)

1. What is a multi-agent system, as defined in this tutorial?

βœ… Correct!
❌ Not quite β€” the correct answer is .
A multi-agent system combines several specialized agents through a communication model (tutorial 20) and an orchestration pattern (tutorial 18), aiming for combined capability that exceeds what one general-purpose agent would achieve alone.

2. Which multi-agent design pattern fits a task where stages are known and always run in the same fixed order?

βœ… Correct!
❌ Not quite β€” the correct answer is .
The pipeline pattern runs agents in a fixed sequence, each consuming the previous one's output — sequential orchestration — well suited when the stages are known in advance and always occur in the same order, like research then draft then edit.

3. Which pattern routes each incoming request to whichever specialized agent best matches it?

βœ… Correct!
❌ Not quite β€” the correct answer is .
The specialist pattern uses handoff orchestration: a router directs each request to the specialized agent best suited to it, fitting scenarios where requests vary in kind and each kind has a clear expert, like billing versus technical support.

4. What does the critic pattern involve?

βœ… Correct!
❌ Not quite β€” the correct answer is .
The critic pattern is group chat orchestration between two roles — a producer and a reviewer — where an independent second look improves quality before the work is accepted, as in tutorial 19's Developer/Reviewer pair.

5. What characterizes the hierarchical pattern?

βœ… Correct!
❌ Not quite β€” the correct answer is .
The hierarchical pattern pairs a planner-like supervisor with several specialist subordinate agents, fitting genuinely complex goals that don't map to one fixed sequence — the supervisor decomposes, delegates, and synthesizes the combined results.

6. What is the primary purpose of workflow orchestration in a multi-agent system?

βœ… Correct!
❌ Not quite β€” the correct answer is .
Workflow orchestration manages the whole business process — which step is active, what state has accumulated, what happens on failure — including non-agent steps like saving state or waiting for human approval, distinct from a single agent conversation's termination logic.

7. What does durable execution provide for a long-running multi-agent workflow?

βœ… Correct!
❌ Not quite β€” the correct answer is .
By checkpointing state after each meaningful step, a crashed or restarted workflow can resume from where it left off rather than re-running earlier steps — important because each step may be a costly model or tool call worth not repeating unnecessarily.

8. When scaling a multi-agent system under increasing load, what is usually the first real bottleneck?

βœ… Correct!
❌ Not quite β€” the correct answer is .
Because each agent typically wraps a model call, the model deployment's tokens-per-minute quota is usually the real constraint; scaling agent instances beyond what the model deployment can serve just produces more requests waiting in a queue, not more completed work.

9. What is horizontal scaling in the context of a multi-agent system?

βœ… Correct!
❌ Not quite β€” the correct answer is .
Horizontal scaling adds more parallel instances (e.g. worker processes pulling from a queue) rather than making one instance faster — a standard distributed-systems technique applied to agents, useful only up to whatever the true bottleneck (often the model deployment) allows.

10. What is a golden dataset used for?

βœ… Correct!
❌ Not quite β€” the correct answer is .
A golden dataset provides representative inputs with known-correct outputs so an evaluation harness can measure whether the system's actual behavior matches expectations — the foundation for meaningful evaluation metrics and regression testing.

11. Why should evaluation be run as regression testing on every change to prompts or agent instructions?

βœ… Correct!
❌ Not quite β€” the correct answer is .
Because agent behavior depends on prompts, instructions, and model responses rather than only deterministic code paths, a prompt or instruction change can quietly regress behavior on cases a team didn't happen to manually try — automated evaluation against a golden dataset catches this.

12. In the multi-agent document-processing example, what does checkpointing after each pipeline step (extraction, classification, validation) provide?

βœ… Correct!
❌ Not quite β€” the correct answer is .
Saving state after extraction and after classification means a failure during validation can be retried from that point rather than re-running extraction and classification, saving both time and the cost of repeating already-successful model/tool calls.

13. In the collaborative analysis pipeline, why do the log-analysis, metrics, and customer-history agents run via concurrent orchestration rather than sequentially?

βœ… Correct!
❌ Not quite β€” the correct answer is .
Since each specialist examines the same incident independently without needing another specialist's output first, concurrent orchestration (tutorial 18) is both a correct fit and faster than an unnecessary sequential dependency, illustrating pattern selection driven by actual data dependencies.

14. What is the role of a synthesis step in a collaborative analysis pipeline?

βœ… Correct!
❌ Not quite β€” the correct answer is .
The synthesis step is where independently-gathered findings (from log, metrics, and history agents, for example) converge into one combined root-cause hypothesis — a conclusion no single specialist agent could produce alone from its own narrow view.

15. Why does this tutorial describe its two worked examples (document processing, collaborative analysis) as syntheses rather than new topics?

βœ… Correct!
❌ Not quite β€” the correct answer is .
Both examples combine the pipeline/specialist/critic/hierarchical patterns, workflow orchestration with checkpointing, scaling considerations, and evaluation strategy into concrete systems — demonstrating how the tutorial's concepts fit together rather than presenting unrelated new material.

16 Exam: Written Questions

Try answering each question yourself before expanding the model answer.

1. Define each of the four multi-agent design patterns and state the orchestration/communication basis each one builds on from tutorials 18 and 20.
Pipeline: agents run in a fixed sequence, each consuming the previous agent's output, built on sequential orchestration with direct handoff between stages — fits known, fixed-order stages. Specialist: a router directs each request to whichever specialized agent best matches it, built on handoff orchestration — fits varying request types each with a clear expert. Critic: one agent produces work and a second reviews/critiques it before acceptance, built on group chat orchestration restricted to two roles — fits scenarios where an independent second look improves quality, as in a Developer/Reviewer pair. Hierarchical: a supervising agent decomposes a goal into sub-tasks and delegates them to subordinate specialist agents, then combines their results, built on a planner (tutorial 18) driving multiple specialist agents — fits complex goals that don't map to one fixed sequence. Each pattern is a named, recognizable combination of mechanisms already established, not a new mechanism itself.
2. Explain workflow orchestration's relationship to a single agent's termination strategy, and why a multi-agent business process needs more than agent-level termination logic.
A single agent's termination strategy (tutorial 18) decides when one agent conversation or plan execution should stop — a keyword, a goal-met check, a turn cap. Workflow orchestration operates at a broader scope: it coordinates an entire multi-step business process, of which one or more agent conversations may be only a part, alongside non-agent steps like persisting state, sending notifications, or waiting for human approval. A multi-agent business process needs this broader layer because termination logic alone answers 'should this specific agent conversation end,' not 'what state has this whole process reached, what should happen next given a failure at any step, and how do we resume if the process is interrupted partway through.' Workflow orchestration provides the state tracking, checkpointing, and failure handling that ties together potentially several distinct agent interactions (and ordinary code steps) into one coherent, resumable process — a concern that exists above and independent of any single agent's own termination behavior.
3. Explain durable execution and, using the document-processing pipeline's extraction/classification/validation steps as an example, describe exactly what is preserved and what is avoided by checkpointing.
Durable execution is the property that a long-running process's progress is checkpointed so it can resume after a crash or restart without repeating completed steps. In the document-processing pipeline, checkpointing state after extraction preserves the extracted text; if the process then crashes during classification, a restart resumes with that extracted text already available rather than re-invoking the extraction agent, avoiding both the redundant model/tool call and its associated cost and latency. Checkpointing again after classification preserves the determined category, so a subsequent failure during validation similarly avoids re-running extraction and classification. What is preserved, concretely, is the output of each completed step plus an indicator of which step is next; what is avoided is redundant re-execution of steps whose results are already known and saved, which matters specifically because each step is a real, costly operation (a model call, a tool invocation) rather than a cheap, purely computational step that would be harmless to simply re-run.
4. Walk through the reasoning for identifying the real bottleneck before scaling a multi-agent system horizontally, using a concrete scenario.
Consider a document-processing system currently running 5 worker instances, each an agent pipeline, and hitting a throughput ceiling under growing load. The naive response is to add more worker instances. But if each worker's agents call the same shared Azure OpenAI deployment, and that deployment's tokens-per-minute quota is already being consumed at or near its limit by the existing 5 workers, adding a 6th worker does not increase completed work — it only adds another consumer competing for the same fixed quota, meaning requests queue longer rather than complete faster. The correct diagnostic approach is to measure where requests are actually waiting: if they're queuing at the model call step, the real bottleneck is model quota (solved by requesting higher quota, using a more efficient model, or reducing tokens per request), not worker instance count. If instead requests are waiting on a downstream enterprise API accessed via an MCP server, that API's own rate limit is the bottleneck, and no amount of scaling agent workers or model quota resolves it. Effective scaling requires this diagnosis step before investing in horizontal scaling, since scaling the wrong layer produces no throughput improvement despite real added infrastructure cost.
5. Design an evaluation and testing strategy for a multi-agent specialist-routing customer support system, covering the golden dataset, metrics, and regression testing practice.
Golden dataset: collect a representative sample of real or realistic customer messages spanning every specialist category (billing, technical, account, etc.), each labeled with the correct expert category a human agent would assign it to, deliberately including ambiguous cases (messages that plausibly fit more than one category) and edge cases (very short messages, messages mixing multiple topics) rather than only clear-cut examples. Metrics: routing accuracy (does the system send each message to the labeled correct specialist) as the primary metric, supplemented by operational metrics — average routing latency and cost per routed message — since a routing system that is accurate but too slow or expensive is not production-ready either. For genuinely ambiguous cases where more than one specialist could reasonably help, define an acceptable-set metric (did it route to any of the acceptable specialists) rather than a single strict correct answer, since ambiguity is a property of the task, not a system failure to penalize as strictly as a clear miscategorization. Regression testing: run this full evaluation automatically whenever the router agent's instructions, the specialist agent roster, or the underlying model deployment changes, and track accuracy over time so a regression introduced by a seemingly small prompt tweak is caught immediately rather than discovered by a customer complaint weeks later.
6. The collaborative analysis pipeline described in this tutorial is called a 'hybrid' pattern rather than a pure instance of one of the four named patterns. Explain why, and argue whether this is a design weakness or a normal outcome.
The three specialist agents (log-analysis, metrics, customer-history) run concurrently and independently, examining the same input without any one depending on another's output — that part matches concurrent orchestration, not quite any of the four named multi-agent design patterns cleanly (it isn't pipeline, since there's no fixed sequential dependency; it isn't specialist/handoff, since all three run rather than one being chosen; it isn't critic, since there's no produce-then-review relationship among them). The subsequent synthesis step, which combines the three independent findings into one conclusion, resembles the combining/delegating role of a hierarchical pattern's supervisor, but without the supervisor having decomposed the goal into the sub-tasks in the first place (the three specialist roles were fixed by the scenario, not dynamically delegated). This is a normal outcome, not a design weakness: the four named patterns are common, recognizable shapes meant to speed up design and communication, not an exhaustive classification every real system must fit into exactly. Insisting on forcing this system into one pure pattern would likely produce a worse design (e.g., artificially sequencing the independent specialists, or inventing an unnecessary supervisor-delegation step) than honestly describing it as a hybrid: concurrent specialist gathering plus a hierarchical-style synthesis. Recognizing and naming a hybrid accurately is better practice than distorting a design to match a pattern label.
7. Explain how tutorial 20's governance concepts (capability scoping, policy engine, audit trail) attach concretely to workflow orchestration in the document-processing example.
Capability scoping attaches at the agent level within each workflow step: the extraction agent should only have tools for reading the raw document, the classification agent only tools for categorization, and only the step that actually schedules a payment (not the extraction or classification agents) should have access to any tool capable of financial action — scoping is decided per step/agent role, not applied uniformly across the whole workflow. The policy engine attaches as an explicit node in the workflow, specifically before any consequential action: in the example, after validation succeeds and the document is categorized as an invoice, the workflow inserts a policy evaluation step before scheduling payment, checking the amount against approval thresholds — this is a workflow step like any other, just one whose 'work' is a governance decision rather than an extraction or classification. The audit trail attaches as logging at every checkpoint the workflow already performs for durable execution — since the workflow is already saving state after extraction, classification, and validation for resumability, extending that same checkpoint logging to include a full audit record (what was extracted, what category was assigned, what the policy decision was, who approved if required) costs little extra and directly satisfies tutorial 20's audit requirement. The overall lesson: governance isn't a separate layer bolted on top of workflow orchestration, it is implemented as specific steps and logging within the same workflow structure that orchestration already provides.
8. A team scales their multi-agent system from 2 to 20 agent worker instances and observes no meaningful throughput improvement. Diagnose the likely causes and the diagnostic steps you would take.
The most likely cause, per this tutorial's central scaling lesson, is that the true bottleneck lies elsewhere and was never addressed — most commonly the underlying model deployment's rate limit, where 20 workers now compete for the same fixed tokens-per-minute quota that 2 workers were already substantially consuming, so additional workers just add queue depth rather than additional completed work. A second likely cause is a downstream dependency (an enterprise API behind an MCP server, a database, a queue) with its own capacity limit that the added agent workers now saturate instead. A third possibility, less about scaling and more about design, is a serialization point in the workflow itself — for example, if all 20 workers must acquire a lock on a shared resource (like a single workflow state store with poor concurrency handling) before proceeding, that lock becomes the bottleneck regardless of worker count. Diagnostic steps: first, measure where requests actually spend their time waiting — instrument the model call, any downstream tool calls, and any shared-resource access separately, rather than treating 'agent processing' as one opaque block. Check the model deployment's actual utilization against its quota during the test. Check whether downstream tool/API calls show increased latency or error rates under the higher worker count, indicating saturation there. Only after identifying which specific layer is actually saturated should the team invest further — in additional model quota, a faster or cached downstream dependency, or removing an unnecessary serialization point — rather than continuing to add agent workers against an unaddressed constraint.
9. Explain the relationship between the pipeline pattern and workflow orchestration — are they the same thing? Justify your answer.
They are related but distinct concepts at different levels of abstraction. The pipeline pattern is a design-pattern-level description of a multi-agent collaboration's shape: agents run in a fixed sequence, each consuming the previous one's output. Workflow orchestration is the operational machinery that actually runs any multi-step process reliably — tracking state, checkpointing, handling failures — regardless of what design pattern (or non-agent logic) the steps represent. A pipeline pattern is typically implemented using workflow orchestration (the sequence of agent calls is one specific kind of workflow, and checkpointing after each pipeline stage is durable execution applied to that pipeline), but workflow orchestration is not limited to pipelines: a hierarchical pattern's supervisor-delegates-then-synthesizes flow, or even a single agent's longer-running task with a human-approval step in the middle, also benefits from workflow orchestration despite not being a pipeline pattern at all. So the relationship is that workflow orchestration is a general capability (reliable multi-step execution) that any design pattern, including but not limited to pipeline, can and typically should be implemented on top of — they answer different questions ('what shape is this collaboration' versus 'how does this process run reliably') and are not interchangeable terms.
10. Why does this tutorial insist that evaluation of agent systems requires more than the unit and integration tests a team might already write for deterministic code?
Ordinary unit and integration tests over deterministic code verify that given a specific input, the code produces a specific, exactly-predictable output — a property that holds because the code path is fixed and doesn't depend on a probabilistic model's response. Agent systems break this assumption: the same input can, in principle, produce a somewhat different response across runs or across small changes to a prompt, an instruction, or the underlying model version, none of which would show up as a code diff a traditional test suite would flag for review. A prompt tweak intended to fix one specific behavior can silently shift behavior on cases nobody thought to re-check manually, and a model version update chosen for one improvement can regress unrelated capabilities the team relies on. This is precisely why a golden dataset and evaluation metrics matter: they provide a way to measure 'is the system's behavior still acceptable across a representative range of cases' as an ongoing, automatable check, functioning as regression testing for a category of change (prompt, instruction, or model updates) that conventional code-focused testing has no visibility into at all. The insistence isn't that unit/integration tests are wrong for what they cover — deterministic code paths, tool implementations, workflow state transitions — but that they leave the model-dependent behavior entirely unchecked, which is exactly the gap golden-dataset evaluation is built to close.
11. In the collaborative analysis pipeline, what should happen if one specialist agent's underlying tool times out, and why does this matter for the system's design?
The synthesis step should still produce a result from the remaining successful specialist findings, clearly caveated to note that one specialist's input was unavailable, rather than failing the entire pipeline because one of three independent inputs didn't arrive. This matters because the three specialists are concurrent and independent by design specifically because their findings don't depend on each other — a failure in one has no logical reason to invalidate the other two, which completed successfully and still carry genuine diagnostic value. Designing the pipeline so a single specialist's failure cascades into total pipeline failure would be a poor translation of the concurrent orchestration pattern into implementation: the whole point of running specialists concurrently and independently is that they can be evaluated on their own merits, and that independence should extend to failure handling too. Practically, this requires the synthesis step to be written expecting a variable number of inputs (one, two, or three findings) rather than assuming all three will always be present, and to communicate reduced confidence when working from partial information — a design detail easy to overlook if only the happy path (all three specialists succeed) is considered during development and testing.
12. How would you decide, for a new multi-agent system you're designing, whether to build a fresh golden dataset from scratch or whether existing test data can be adapted?
I would first check whether existing production logs, support tickets, or historical records already contain real examples of the inputs the system will handle, since real examples are generally more representative of actual usage patterns than synthetically constructed ones, and adapting them (labeling each with its correct expected output) is usually faster than authoring new cases from scratch. If such historical data exists, I'd sample it deliberately to ensure coverage of both common cases and known edge cases, rather than taking a purely random sample that might under-represent rare-but-important scenarios (like the ambiguous or adversarial inputs tutorial 20 raised). If historical data is sparse, unrepresentative, or doesn't exist (a genuinely new capability with no prior usage), I would construct golden cases deliberately, drawing on domain expertise about what the system should handle and specifically including edge cases the team already anticipates as risky. In both cases, I would treat the golden dataset as a living artifact rather than a one-time deliverable, adding new cases whenever a real production issue reveals a scenario the dataset didn't cover, gradually improving its representativeness of the actual distribution of inputs the system will face in production.
13. Explain why the tutorial frames scaling and evaluation as necessary additions specifically once a multi-agent system moves from demo to production, rather than concerns for the design patterns and orchestration mechanisms alone.
Design patterns and orchestration mechanisms (pipeline, specialist, critic, hierarchical, and the underlying workflow orchestration) determine whether a system produces correct behavior for a single request under ideal conditions — they answer 'does this system do the right thing when it runs.' Scaling and evaluation answer different, additional questions that only become pressing once a system faces real, sustained, and varied traffic rather than a developer's own test invocations: scaling asks 'does this system continue to work, and work economically, when load grows by an order of magnitude,' and evaluation asks 'does this system's correctness, demonstrated on the handful of cases a developer tried by hand, actually hold across the full range of inputs production traffic will present, and does it keep holding as the system changes over time.' A system can have an excellent, well-chosen design pattern and orchestration, and still fail in production if it was never load-tested against realistic traffic (revealing an unaddressed model-quota bottleneck) or never evaluated against a representative dataset (revealing that the pattern, while structurally sound, was fed inadequately-instructed agents that perform worse on real-world input diversity than on the developer's own test cases). This is why the tutorial treats scaling and evaluation as the two gaps that specifically separate 'a working demo built from tutorials 17-21's mechanisms' from 'a production-ready multi-agent system' — they are not more design patterns to memorize, they are operational disciplines that must be applied regardless of which design pattern was chosen.
14. Design a governance-aware, evaluated, horizontally-scalable version of the specialist customer-support routing system, integrating concepts from this entire tutorial.
Design pattern: specialist pattern, with a router agent directing incoming messages to billing, technical, or account specialist agents via handoff orchestration. Workflow orchestration: each routed conversation is tracked as a workflow with checkpointed state (message received, routed to specialist X, specialist responded, conversation resolved or escalated), enabling durable execution so a system restart mid-conversation doesn't lose context. Governance: the router agent is capability-scoped to only route, never to directly resolve billing actions itself; each specialist agent is scoped only to its own domain's tools (the billing specialist cannot access technical diagnostic tools); any specialist action with financial consequence (e.g., issuing a credit) passes through a policy engine gate requiring approval above a threshold, exactly as in tutorial 20; every routing decision and specialist action is logged to an audit trail. Scaling: router and specialist agents run as horizontally-scaled worker instances behind a message queue absorbing incoming conversation volume, with monitoring specifically on the underlying model deployment's rate-limit utilization to catch the real bottleneck before it causes queuing, and on any downstream systems (a CRM behind an MCP server) the specialists depend on. Evaluation: a golden dataset of labeled historical support messages evaluates routing accuracy as the primary metric, plus specialist-level correctness metrics (did the billing specialist's resolution match a human agent's on the same historical ticket) and operational metrics (latency, cost per conversation); this evaluation runs as regression testing on every change to router or specialist instructions, with results tracked over time. This design demonstrates every subtopic of the tutorial working together in one coherent system rather than as isolated concerns.
15. Reflecting on tutorials 17 through 22, articulate what this tutorial specifically added to the course's treatment of agentic AI that the individual framework and architecture tutorials did not.
Tutorials 17-19 taught how to build individual agents within specific frameworks (Semantic Kernel, AutoGen) and how those frameworks' own orchestration constructs work. Tutorial 20 stepped back to architectural questions — which components should be agents, how they communicate, what governance autonomy requires — largely independent of any specific system's scale or evaluation needs. Tutorial 21 added a standard for sharing tools across agents and applications. What this tutorial specifically adds is twofold: first, a vocabulary of recurring design patterns (pipeline, specialist, critic, hierarchical) that names common ways the previous tutorials' mechanisms combine, making system design faster and more communicable than re-deriving an orchestration from first principles each time; second, and more substantively new, it addresses two concerns that simply don't arise until a system is handling real, sustained, production traffic and needs to keep working correctly over time — scaling (what happens under load, where the real bottlenecks are) and evaluation/testing (how do we know, with evidence rather than impression, that the system works and keeps working as it changes). Neither scaling nor evaluation is meaningfully addressable at the scope of a single agent or a single framework tutorial; they only become visible and pressing once multiple agents, patterns, and governance controls are assembled into one system serving real, ongoing demand — which is exactly the gap this synthesis tutorial exists to close before the course moves on to deployment.

17 Flashcards

Click a card to reveal the back.

Multi-agent system
Several specialized agents coordinating (via a communication model + orchestration pattern) toward work no single agent handles as well alone.
Pipeline pattern
Fixed sequence, each agent consumes the previous one's output. Sequential orchestration. Fits known, fixed-order stages.
Specialist pattern
A router directs each request to the best-matching specialized agent. Handoff orchestration. Fits varying request types, each with a clear expert.
Critic pattern
One agent produces, a second reviews/critiques before acceptance. Group chat orchestration (2 roles). Fits when a second look improves quality.
Hierarchical pattern
A supervisor decomposes a goal, delegates sub-tasks to subordinate agents, combines results. Planner + specialist agents. Fits complex, non-sequential goals.
Workflow orchestration
Coordinates a whole multi-step process reliably (state, failure handling) — broader than one agent's termination logic; includes non-agent steps too.
Durable execution
Checkpoint state after each meaningful step so a crash/restart resumes without repeating already-completed (costly) steps.
Real scaling bottleneck
Usually the MODEL DEPLOYMENT's rate limit, not agent code. Scaling agent instances past this just queues more work — diagnose before scaling.
Horizontal scaling
Run more agent/service instances in parallel to handle more load — standard distributed-systems technique, useful only up to the true bottleneck.
Golden dataset
Curated inputs + known-correct expected outputs. Foundation for evaluation metrics and regression testing of agent behavior.
Evaluation as regression testing
Run the golden-dataset evaluation on EVERY prompt/instruction/model change — agent behavior shifts subtly in ways deterministic-code tests never catch.
Document-processing pipeline
Pipeline pattern example: extraction → classification → validation agents, checkpointed for durable execution, with a policy gate before consequential actions.
Collaborative analysis
Multiple specialist agents examine the SAME input independently (concurrent orchestration); a synthesis step combines their findings into one conclusion.
Synthesis step
Combines multiple agents' independent findings into one coherent output, citing supporting findings — a hierarchical-style combining role.
Real systems are often hybrids
The 4 named patterns are common shapes, not an exhaustive taxonomy. Naming an accurate hybrid beats distorting a design to fit one pattern label.

18 Interview Questions and Answers

1. Walk me through the four multi-agent design patterns and when you'd reach for each.
Pipeline runs agents in a fixed sequence, each consuming the last one's output — I use it when stages are known upfront and always happen in the same order, like research then draft then edit. Specialist routes each request to whichever expert agent fits it best, via handoff — I use it when requests vary in kind and each kind has a clear owner, like billing versus technical support. Critic has one agent produce and a second review before acceptance — I use it when an independent second look genuinely improves quality, like a writer and an editor. Hierarchical has a supervisor break a broad goal into sub-tasks, delegate them to specialists, and combine the results — I use it for genuinely complex goals that don't reduce to one fixed sequence, like 'evaluate these three vendors' where the sub-tasks aren't known until the supervisor figures out what needs investigating. None of these are new mechanisms — they're named combinations of the orchestration patterns and communication models I'd already be using; the value of the names is faster, clearer design conversations.
2. How is workflow orchestration different from a single agent's termination strategy?
Termination strategy answers a narrow question: should this one agent conversation or plan execution stop now. Workflow orchestration answers a broader one: how does this entire multi-step business process — which might include several distinct agent interactions plus ordinary steps like saving state, sending a notification, or waiting for a human approval — run reliably from start to finish, including what happens if something fails partway through. A single agent's termination logic lives inside that agent's own loop; workflow orchestration sits above potentially multiple agents and non-agent steps, tracking overall state and handling failure at the process level. I think of termination as 'when does this one conversation end' and orchestration as 'how does the whole job get done reliably,' which is why a workflow can contain several agent conversations, each with its own termination logic, nested inside the larger orchestrated process.
3. A team wants to scale their multi-agent system by adding more agent instances, but throughput isn't improving. What's your diagnostic approach?
First question I ask: what's actually saturated? Almost always, the honest first bottleneck is the underlying model deployment's own rate limit, not the agent code — if five workers were already consuming most of the tokens-per-minute quota, adding five more just means ten workers competing for the same fixed budget, so requests queue longer instead of completing faster. I'd instrument where requests actually spend time waiting — the model call specifically, versus any downstream tool or API call, versus any shared resource like a workflow state store — rather than treating 'processing' as one opaque block. If it's the model quota, the fix is requesting more quota, a more efficient model, or reducing tokens per request — not more workers. If it's a downstream enterprise API behind an MCP server, that system's own limits need addressing. The core lesson I apply here: horizontal scaling only helps up to the actual constraint, and skipping the diagnosis step means paying for more infrastructure that produces zero throughput improvement.
4. How would you evaluate whether a multi-agent system actually works, beyond manually trying it a few times?
I'd build a golden dataset — real or realistic inputs with known-correct expected outputs, deliberately covering the common path and known edge cases, not just the cases that happen to occur to me. Against that, I'd define metrics appropriate to the system: routing accuracy for a specialist system, groundedness for a RAG-backed answer, or an acceptable-set metric for genuinely ambiguous cases where more than one outcome is reasonable. Then I'd run that evaluation as regression testing — automatically, on every change to prompts, instructions, tools, or the underlying model — because agent behavior can shift subtly in ways a normal deterministic-code test suite has no visibility into at all; a prompt tweak that fixes one case can quietly break others nobody happened to re-check by hand. Manual spot-checking tells me the system worked on the specific cases I tried; a golden-dataset evaluation tells me, with evidence, whether it works across the range of inputs production traffic will actually present, and whether it keeps working as the system changes over time.
5. Design a document-processing system that needs to handle thousands of documents a day reliably. What would you build?
I'd use the pipeline pattern — extraction, classification, validation agents in a fixed sequence — wrapped in workflow orchestration that checkpoints state after each stage, so a crash during validation doesn't force re-running extraction and classification, which is durable execution paying for itself given the volume. For any consequential action coming out of the pipeline — say, scheduling a payment for a validated invoice — I'd insert a policy-engine gate before it executes, with amounts above a threshold requiring human approval, following the same governance discipline I'd apply to any agent system. For scale, I'd run stateless worker instances behind a queue so document arrival is decoupled from processing capacity, but before assuming more workers solves throughput, I'd check whether the underlying model deployment's rate limit is actually the constraint at the target volume — thousands a day is enough that this needs to be verified, not assumed. And before calling it production-ready, I'd build a golden dataset of representative documents with known-correct extraction/classification/validation results and run that evaluation as a regression suite on every change to any of the three agents' instructions.
6. How would you build a collaborative analysis system where multiple specialists examine the same problem?
I'd run the specialists concurrently rather than sequentially, since if their findings are genuinely independent — say a log-analysis agent, a metrics agent, and a customer-history agent all examining the same incident — there's no reason to force an artificial order, and concurrent orchestration gets the answer faster. I'd add a dedicated synthesis step that receives all the independent findings and produces one coherent conclusion, explicitly citing which specialist findings support it, since that traceability is what lets me debug a wrong conclusion later — was a specialist's finding wrong, or did synthesis misweight correct findings. I'd design the synthesis step to handle a variable number of successful findings, not assume all specialists always succeed, so one tool timeout doesn't cascade into total pipeline failure when the other two specialists' input is still valuable on its own. And I wouldn't force this into one of the four named design patterns if it doesn't cleanly fit — it's really concurrent specialist gathering plus a hierarchical-style combining step, and naming it accurately as a hybrid is better than distorting the design to match a label.
7. What's your position on hand-rolling a workflow orchestration system versus adopting an existing workflow engine?
For anything beyond a short-lived, low-stakes process, I'd lean toward an existing workflow/durable-execution engine rather than hand-rolling state checkpointing and failure handling myself — that's a well-solved problem with mature tooling, and reinventing it usually means missing edge cases (like handling a crash exactly between two checkpoint writes) that a mature engine has already addressed. I'd hand-roll something simple only for illustration or for a genuinely trivial workflow where the overhead of adopting a full engine isn't justified — a two-step process that costs almost nothing to fully re-run on failure doesn't need durable execution machinery at all. The decision mirrors the one I'd make about MCP servers versus native functions: match the tooling investment to whether the complexity and stakes actually justify it, rather than defaulting to either extreme.
8. How does governance from tutorial 20 concretely show up in a workflow-orchestrated multi-agent system, rather than being a separate concern?
It shows up as specific steps and logging within the same workflow structure, not as a bolt-on layer. Capability scoping is decided per agent role at the point each agent is invoked in the workflow — the extraction agent gets read-only document tools, only the step handling a validated invoice gets any tool with financial capability. A policy engine check is literally just another node in the workflow, positioned right before any consequential action, evaluating the proposed action and either letting it proceed or routing to human approval. And since the workflow is already checkpointing state for durable execution — saving what happened after each step — extending that same checkpoint logging to capture a full audit record costs very little extra and satisfies the audit-trail requirement directly. So I don't think of 'add governance' as a separate task from 'design the workflow' — designing the workflow correctly, with the right steps and the right checkpoints, is largely how governance gets implemented in the first place.
9. Why do you evaluate a specialist-routing system differently for clear-cut cases versus genuinely ambiguous ones?
Because ambiguity is a property of the task itself, not necessarily a system failure, and grading it the same way as a clear miscategorization would penalize the system for something it can't reasonably be expected to get 'right' in a single-answer sense. For a message that unambiguously belongs to one category, I evaluate against that single expected label — a miss there is a genuine routing error. For a message that a human reviewer would say could reasonably go to more than one specialist, I define an acceptable-set metric instead — did the system route to any of the acceptable specialists — rather than demanding it match one arbitrarily chosen 'correct' answer. Building the golden dataset with this distinction in mind, rather than forcing every case into a single expected label, gives a much more honest picture of the system's actual performance, and prevents chasing phantom accuracy improvements on cases that were never solvable with one right answer in the first place.
10. What would make you recommend against building a full multi-agent system for a given problem, even after seeing this tutorial's patterns?
If the task genuinely resolves into one predictable sequence with no real branching decisions, a single agent or even a plain pipeline of ordinary function calls may be all that's needed — introducing multiple specialized agents, an orchestration layer, and the governance/scaling/evaluation overhead this tutorial covers is only justified when the problem's shape genuinely benefits from specialization, parallel independent perspectives, or delegation. If the expected volume is low enough that scaling concerns never materialize and the stakes are low enough that a manual spot-check is adequate evaluation, building the full production apparatus — golden datasets, regression testing, durable workflow checkpointing — is probably over-engineering for the actual need. I'd apply the same judgment tutorial 20 taught for agents generally: match the architecture's sophistication to the problem's actual complexity and stakes, and be willing to conclude 'this doesn't need to be a multi-agent system' just as readily as concluding it does.
11. How would you explain the difference between the pipeline pattern and workflow orchestration to someone conflating the two?
The pipeline pattern is a design choice about shape — agents run in a fixed sequence, each consuming the previous one's output. Workflow orchestration is the machinery that actually runs any multi-step process reliably, regardless of what pattern the steps follow — tracking state, checkpointing progress, handling failures. A pipeline is typically implemented using workflow orchestration underneath it, but orchestration isn't limited to pipelines — a hierarchical system's decompose-delegate-synthesize flow, or even a single long-running agent task with a human-approval pause in the middle, benefits from the same durable-execution machinery despite not being a pipeline at all. So one is 'what shape does this collaboration take' and the other is 'how does this process run reliably no matter its shape' — they're complementary, operating at different levels, not interchangeable terms for the same thing.
12. What's the first thing you check when a multi-agent system's evaluation accuracy drops after a change?
I look at exactly which cases in the golden dataset regressed and pull the full trace for those specific runs — which agent produced what, what tools were called, what the final output was — rather than starting from the accuracy number alone. If it's a specialist/routing system, I check whether the regression is concentrated in one category, which usually points to that specific specialist's instructions or tools being affected by the change rather than a system-wide issue. If it's a collaborative or synthesis-based system, I check whether a specialist's individual finding was wrong or whether synthesis misweighted correct findings — logging which specialist contributions the synthesis step actually used makes this diagnosis quick rather than guesswork. Only after isolating where the regression actually originates do I look at what changed in that specific component. This mirrors the RAG debugging discipline from earlier in the course — separate retrieval failures from generation failures by looking at what was actually retrieved — applied here to separate 'which agent or step' produced the regression from an aggregate accuracy drop that alone doesn't tell you where to look.
13. How do scaling and evaluation relate to each other in a production multi-agent system?
They're largely independent concerns that both need attention, but they can interact in specific ways worth watching for. Scaling under load can occasionally reveal correctness issues that low-volume testing didn't surface — for example, if a shared resource under concurrent load has a race condition, or if a rate-limited tool starts returning degraded or partial responses under load that an agent wasn't designed to handle gracefully, evaluation metrics that looked fine at low volume can quietly degrade at production scale. So I'd want evaluation to include at least some testing under realistic concurrent load, not only single-request-at-a-time testing, specifically to catch this category of issue. Conversely, evaluation results can inform scaling decisions — if a hierarchical pattern's supervisor-plus-specialists design turns out to need five model calls per logical request to hit acceptable accuracy, that multiplies the effective load on the model deployment fivefold compared to what request-count alone would suggest, which directly changes the scaling and quota-planning math. Treating them as fully separate workstreams risks missing both of these interactions.
14. Someone claims their multi-agent system is 'production-ready' because it passed all their manual testing. How do you respond?
I'd ask what 'passed' means concretely — a system that a developer tried by hand a dozen times and it seemed to work is a very different claim from a system evaluated against a representative golden dataset with measured accuracy, and only the latter gives me confidence about behavior on the inputs that weren't specifically tried. I'd also ask about the two production-specific gaps this tutorial focuses on: has it been tested under realistic concurrent load to confirm the actual scaling bottleneck (usually model quota) has headroom for expected traffic, and is there a regression-testing process in place so the next prompt or instruction change doesn't silently break something that currently works? Manual testing is a reasonable first pass during development, but 'production-ready' implies evidence that the system's correctness holds across a representative range of inputs, that it performs adequately under expected load, and that there's a mechanism to catch regressions going forward — none of which 'I tried it and it worked' actually demonstrates.
15. Looking across this entire course's agent-focused tutorials, what does this one specifically contribute that the others didn't?
The framework tutorials taught how to build individual agents and use their own orchestration constructs; the architecture tutorial stepped back to ask which components should be agents and how they should be governed; the MCP tutorial gave agents and applications a standard way to share tools. This tutorial adds two things specifically. First, a shared vocabulary — pipeline, specialist, critic, hierarchical — that names recurring ways those earlier mechanisms combine, which speeds up design conversations and makes systems more communicable to a team than re-deriving the orchestration from scratch each time. Second, and more substantively, it's the first place the course addresses what happens once a system has to serve real, sustained, production traffic and keep working correctly as it changes: scaling, which doesn't meaningfully arise until load is real, and evaluation, which doesn't meaningfully arise until you need confidence that behaves correctly across more inputs than a developer personally tried. Neither of those questions is visible at the scope of a single agent or a single framework — they only show up once you're looking at a whole system under real conditions, which is exactly the gap between 'I built an agent that works in my demo' and 'I built a multi-agent system I can actually run in production,' and closing that gap is this tutorial's job before the course moves on to deployment itself.

19 Glossary

Multi-agent system
A system of several specialized agents coordinating via a communication model and orchestration pattern to accomplish work no single agent handles as well alone.
Design pattern
A named, reusable solution shape for a recurring problem; multi-agent design patterns name recurring ways to combine specialized agents.
Pipeline pattern
A multi-agent design pattern where agents run in a fixed sequence, each consuming the previous agent's output.
Specialist pattern
A multi-agent design pattern where a router directs each request to whichever specialized agent best matches it.
Critic pattern
A multi-agent design pattern where one agent produces work and a second agent reviews and critiques it before it is accepted.
Hierarchical pattern
A multi-agent design pattern where a supervising agent decomposes a goal and delegates sub-tasks to subordinate agents.
Workflow orchestration
The overall coordination of a multi-step, possibly multi-agent process from start to finish, including sequencing, state, and error handling.
Workflow engine
A component or framework responsible for running a defined workflow's steps in order, tracking state and handling failures.
Durable execution
A workflow property where progress is checkpointed so a long-running process can resume after a crash or restart without repeating completed steps.
Horizontal scaling
Handling more load by running more instances of an agent or service in parallel, rather than making one instance more powerful.
Throughput
The number of tasks or requests a multi-agent system can complete per unit of time.
Bottleneck
The single slowest or most constrained part of a system that limits its overall throughput regardless of how fast other parts run.
Golden dataset
A curated set of inputs with known-correct expected outputs, used to evaluate a system's behavior consistently over time.
Evaluation metric
A measurable criterion (accuracy, groundedness, latency, cost) used to judge whether an agent system's output is acceptable.
Regression testing
Re-running a fixed test suite after a change to confirm previously correct behavior has not broken.
Document-processing pipeline
A multi-agent or multi-step system that extracts, classifies, validates, and acts on information from documents.
Collaborative analysis
A pattern where multiple specialist agents examine the same data from different angles and their findings are synthesized into one conclusion.
Synthesis step
The stage in a collaborative pipeline where a dedicated agent or function combines multiple agents' independent findings into one coherent output.

πŸ—’ My Notes