Files
agent-framework/dotnet/samples/03-workflows/Orchestration/Magentic
T
Copilot 9fdd7429a8 .NET: Add Magentic Orchestration Sample (#5823)
* Add Magentic orchestration sample scaffold

Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/8799740a-74d8-4100-b6f6-76dcd0418c87

Co-authored-by: lokitoth <6936551+lokitoth@users.noreply.github.com>

* Validate Magentic orchestration sample

Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/8799740a-74d8-4100-b6f6-76dcd0418c87

Co-authored-by: lokitoth <6936551+lokitoth@users.noreply.github.com>

* Document follow-up changes for the Magentic .NET sample

Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/caa3488f-d6f5-494d-a928-a45d6a98b3c3

Co-authored-by: lokitoth <6936551+lokitoth@users.noreply.github.com>

* Remove CHANGES.md from Magentic sample

Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/ffab38e2-37f9-4643-a782-20680573965a

Co-authored-by: lokitoth <6936551+lokitoth@users.noreply.github.com>

* Fix PauseIfInteractive to also skip when stdout is redirected

Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/07ddf735-29cc-4775-b588-fd71ca76fa58

Co-authored-by: lokitoth <6936551+lokitoth@users.noreply.github.com>

* fix: Update for PR Review Feedback

* fix: Update Sample README for PR Feedback

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lokitoth <6936551+lokitoth@users.noreply.github.com>
Co-authored-by: Jacob Alber <jaalber@microsoft.com>
9fdd7429a8 ยท 2026-05-22 19:09:18 +00:00
History
..

Magentic Orchestration Sample

This sample showcases the Magentic Orchestration Pattern in .NET, setting up a team with three roles:

  • ResearcherAgent gathers factual background information.
  • CoderAgent uses HostedCodeInterpreterTool for quantitative analysis.
  • MagenticManager plans the work, tracks progress, and decides who should act next.

What This Sample Demonstrates

  • Building a Magentic workflow with MagenticWorkflowBuilder
  • Combining standard responses-based agents with a code interpreter-enabled participant
  • Streaming orchestration events such as the initial plan, replans, and progress-ledger updates
  • Printing the final multi-agent conversation transcript

Prerequisites

  • AZURE_AI_PROJECT_ENDPOINT set to your Azure AI Foundry project endpoint
  • AZURE_AI_MODEL_DEPLOYMENT_NAME set to your model deployment name (defaults to gpt-5.4-mini)
  • az login completed before running the sample

Running the Sample

dotnet run

Expected Output

The sample prints:

  1. The original task prompt
  2. Streamed updates from the participating agents
  3. Magentic plan and progress-ledger events as the workflow coordinates the team
  4. The final conversation transcript returned by the workflow