Microsoft Agent Framework: multi-agent workflow tutorial
Learn Python workflow orchestration with fan-out/fan-in, structured aggregation, Magentic planning and handoffs, including token and latency tradeoffs.
Player not loading? Watch on YouTube
This Python tutorial demonstrates Microsoft Agent Framework workflows with concurrent branches and fan-out/fan-in edges. Examples combine agent results through concatenation, LLM summaries, structured extraction, ranking and voting. Structured outputs also drive conditional routing and let an aggregator count votes without another model call.
Concurrent Builder supplies a dispatcher and default aggregator. Magentic Builder adds explicit planning, a progress ledger and checks for loops or stalled work. Its travel-planning demo finishes after the presenter moves on, but its agents lack live website access. The presenter notes the extra calls and tokens and recommends evaluating whether the results justify that overhead.
Handoff examples transfer control between agents. A customer-support run passes control back and forth, illustrating added latency and token cost. The presenter flags the writing example's string-based termination rule and absence of loop detection or a round limit.
The follow-along setup uses hosted GitHub Codespaces and rate-limited GitHub Models; the presenter uses a Foundry model for the concurrent demo. A deployed investment-analysis app illustrates parallel analysis using an older framework version. Its chat workflow's final summary is still missing when the presenter moves on.