Multi-Agent Orchestration
30-second answer
Multi-agent orchestration shares a job between specialist agents. In Microsoft Agent Framework you pick the pattern by who decides the next step: sequential (a fixed line), concurrent (parallel, then merged), handoff (the current agent passes control), group chat (a manager picks the next speaker) or Magentic (a manager plans and delegates open-ended work). Start with one agent and split only when instructions or tools start to collide.
Simulate it » No Azure account neededExam objective: 2.2.4 Implement orchestrated multi-agent solutions. (Skills measured as of April 16, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Open <strong>Build ➜ Workflows</strong> and create a workflow of agents.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Open Build ➜ Workflows and create a workflow of agents.
- Give each agent one narrow job with its own instructions and tools. Small agents are easier to test than one agent that does everything.
- Pick the orchestration pattern. Sequential is a fixed line, concurrent fans out and merges, handoff passes control, group chat has a manager picking speakers, and Magentic plans open-ended work.
- Run it. The trace shows each agent’s turn, so you can see where the answer went wrong when it does.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Multi-agent orchestration
Several specialist agents can share a job. Sequential passes work down a line, concurrent fans out and merges, handoff moves control to the right specialist, group chat lets agents take turns in one shared conversation and Magentic lets a manager agent plan and delegate. Microsoft Agent Framework builds all five.
🤔 What happens if…
Read this tour as text
- Deploy a model, call the deployment. A deployment is a named copy of a model with a version, a deployment type and capacity. Your app calls the deployment name, never the model name. Pick a large model for hard work and a small language model for cheap, fast, simple work.
- RAG: retrieve first, then answer. Retrieval-augmented generation searches your own content (Azure AI Search, hybrid keyword plus vector), puts the best chunks in the prompt and asks the model to answer from them with citations. Without retrieval the model guesses.
- A multistep flow with checks. A workflow breaks one big request into steps you control: classify, extract to a JSON schema, call a tool, draft, then verify. Retries, fallbacks and a final check live in code, so one bad step can’t slip through unseen.
- Evaluate before you ship. Evaluators score each answer on a test set: groundedness (is it supported by the context?), relevance, coherence and safety checks. A fabrication shows up as a low groundedness score on one row, so you fix it before users see it.
- SDK, project endpoint and connections. The Foundry SDK (
azure-ai-projects) opens one door: AIProjectClient with the project endpoint and DefaultAzureCredential. From it your app gets an OpenAI-compatible client, deployments and connections (Azure AI Search, Application Insights) with no secrets in code. - Design the agent: role, goal, tool schema. An agent is a model plus instructions (role and goal), tools and a conversation (thread). A strict function schema names each parameter and marks the required ones, so the model asks the user instead of inventing a value.
- Retrieval, function calling and memory. One agent can use file search for documents, a function for live data and memory for what it learned about a user. The model asks to call a function; your code runs it and returns the result. Memory survives into a new conversation.
- Multi-agent orchestration. Several specialist agents can share a job. Sequential passes work down a line, concurrent fans out and merges, handoff moves control to the right specialist, group chat lets agents take turns in one shared conversation and Magentic lets a manager agent plan and delegate. Microsoft Agent Framework builds all five.
- Autonomy with approvals. Reads are safe, writes are not. A tool marked approval required pauses the run until a person decides. A hard limit in code blocks what no one should approve, whatever the model says.
- Monitor and debug agent runs. Agent evaluators read the whole run: intent resolution, tool call accuracy and task adherence. Error analysis groups the failing rows, such as a made-up tool argument, and points to the fix.
- Tune prompts and parameters. Instructions shape tone and rules, a few-shot example shows the format, temperature and top_p change how adventurous the wording is, and max output tokens caps length. A self-critique loop drafts, checks against a checklist and revises once.
- Trace every call and count tokens. OpenTelemetry spans record each agent run, model call and tool call, with tokens and latency, and Application Insights stores them. Tracing is opt-in, and recording message content is for development only because it captures prompts and answers.
- Route requests to the right model. A hybrid design puts rules first for answers code can decide, a small model for easy language work and a large or reasoning model only when needed. A model router can pick for you. Fewer big-model calls means a lower bill and faster replies.
A customer was charged twice and hasn't received the order. Run specialist agents in three patterns, then let a refund agent act with a person approving every refund and a hard limit in code.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
A single agent with fifteen tools picks the wrong one and its instructions keep growing.
😊 THE SOLUTION
Split the work between specialist agents and choose an orchestration pattern.
- Draft, then review✓ Sequential
- Independent checks✓ Concurrent
- Route to the right specialist✓ Handoff
Start with a question
Who answers when a customer says, charged twice and still no parcel?
At a good service desk nobody handles everything. A receptionist listens, a billing clerk checks the charge, a delivery clerk checks the parcel, and someone writes one clear reply. Which clerk speaks first, and whether they work together or one after another, is a decision about the process.
Multi-agent orchestration is that process for AI agents. Each agent has a narrow job, and the pattern says who goes next.
Explain it like I’m 10
The technical explanation
Pick the pattern by who decides the next step
| Pattern | Who decides | Good for | Watch out |
|---|---|---|---|
| Sequential | You, in advance | Draft, then review | Time adds up |
| Concurrent | You, in advance | Independent checks, speed | Results must be merged |
| Handoff | The current agent | Triage to a specialist | The route depends on the conversation |
| Group chat | A manager picks the speaker | Debate and refinement | Set a maximum number of rounds |
| Magentic | A manager plans and delegates | Open-ended tasks | Most calls, least predictable |
Build it with Microsoft Agent Framework
# pip install agent-framework-foundry azure-identity
from azure.identity import AzureCliCredential
from agent_framework.foundry import FoundryChatClient
from agent_framework.orchestrations import SequentialBuilder, ConcurrentBuilder
client = FoundryChatClient(project_endpoint=os.environ["FOUNDRY_PROJECT_ENDPOINT"],
model="support-chat", credential=AzureCliCredential())
triage = client.as_agent(name="triage", instructions="Work out what the customer needs. Don't answer it yourself.")
billing = client.as_agent(name="billing", instructions="Answer billing and refund questions from the policy.")
delivery = client.as_agent(name="delivery", instructions="Answer delivery questions. Use get_order_status.")
writer = client.as_agent(name="writer", instructions="Write one friendly reply from the specialists' notes.")
reviewer = client.as_agent(name="reviewer", instructions="Check the reply against policy. Say APPROVED or list fixes.")
line = SequentialBuilder(participants=[triage, writer, reviewer]).build()
parallel = ConcurrentBuilder(participants=[billing, delivery]).build() # fan out, then aggregate
# handoff, group chat and Magentic use HandoffBuilder, GroupChatBuilder and MagenticBuilder
Each agent keeps its own short instructions and only the tools it needs. That’s the main reason to split: the billing agent never sees the delivery tool, so it can’t call it by mistake.
Design rules that save you
- Start with one agent. Split when instructions get long or tools collide.
- Narrow jobs. “Billing” beats “customer helper”.
- Limit rounds in group chat and Magentic, and set timeouts.
- Trace every turn. When the answer is wrong you need to see which agent said what.
- Evaluate the whole flow, not just each agent.
Foundry’s portal also lets you wire agents into a workflow visually (preview as of 25 November 2026). The orchestration patterns above are the same ideas in code.
Architect level Cost and latency add up
Every extra agent turn is another model call. A five-agent sequential pipeline pays five latencies in a row, and a group chat of six rounds may call the model dozens of times. Concurrent runs cut waiting but not tokens. Measure with traces, use small models for narrow agents such as triage, and keep the large model for the agent that needs it.
Real-world business scenario
Fabrikam Retail (fictional)
- The problem
- One support agent had eleven tools and long instructions. It picked the wrong tool for billing questions and its replies were inconsistent.
- What they used
- Five agents built with Microsoft Agent Framework on Foundry models: a triage agent hands off to billing or delivery, both can run concurrently for combined cases, and a writer and reviewer finish sequentially.
- Why that choice
- Each agent has short instructions and two or three tools, and the pattern decides who speaks, so mistakes are easier to find in the trace.
- The result
- Tool-choice errors fell sharply, and the reviewer step caught replies that broke policy before customers saw them.
When to use it and when not to
✓ Use it when…
- Different parts of the job need different tools, rules or models.
- Independent checks can run in parallel to save time.
- You want each specialist to be tested and replaced on its own.
✕ Think twice when…
- One agent with a few tools already works. Keep it simple.
- The task is a fixed script. A workflow of steps is clearer.
- You can't afford extra latency and tokens for several model calls.
↔ Alternatives to consider
- A single agent with a small set of tools.
- A workflow of fixed steps and checks.
- Routing to one model or agent based on the request.
Test yourself with exercises
5 original practice questions in the AI-103 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner Why use several agents instead of one?
Model answer
Each agent gets a narrow job, short instructions and only the tools it needs. That makes each easier to test and less likely to pick the wrong tool than one agent that does everything.
Intermediate When is concurrent better than sequential?
Model answer
When the tasks don't depend on each other. Billing and delivery checks can run at the same time, and the total time is about the slower one. If the second task needs the first one's output, it has to be sequential.
Experienced developer What are the risks of group chat and Magentic?
Model answer
They're the least predictable, use the most model calls and take the longest. I set a maximum number of rounds, log every turn, and use them only when I can't write the steps in advance.
Scenario A customer was charged twice and the order never arrived. Which pattern?
Model answer
Concurrent is a good fit if a billing agent and a delivery agent can investigate independently and a writer merges the notes. If triage must first decide who should handle it, handoff fits.
Quick revision
Key points
- Choose the pattern by who decides the next step.
- Sequential is a fixed pipeline; concurrent fans out and merges.
- Handoff moves control to the best agent for the conversation.
- Group chat and Magentic use a manager and are the least predictable.
- One agent with good tools is often enough.
Important terminology
- Orchestration
- The logic that decides which agent runs next and how their outputs combine.
- Sequential
- Agents run in a fixed order, each receiving the previous output.
- Concurrent
- Agents run at the same time on the same input and the results are aggregated.
- Handoff
- The current agent transfers control of the conversation to a better-suited agent.
- Magentic
- A pattern where a manager agent builds a plan, delegates tasks to specialists and tracks progress.
- Microsoft Agent Framework
- An open-source SDK for Python and .NET to build agents and multi-agent workflows.
Common mistakes
- Using Magentic for a task with known steps.
- Running dependent tasks concurrently.
- No limit on rounds or turns.
Exam tips
- "Fixed order, each builds on the last" = sequential.
- "Same input to several agents, combine results" = concurrent.
- "Manager plans and delegates open-ended work" = Magentic.
Five quick revision questions
-
1.Which pattern is a fixed pipeline?Show
Sequential.
-
2.Which runs agents in parallel?Show
Concurrent.
-
3.Which moves control between agents?Show
Handoff.
-
4.Which uses a planning manager?Show
Magentic.
-
5.Which SDK has these builders?Show
Microsoft Agent Framework.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Autonomous Agents with Safeguards and Approvals
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.