mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
f2f2ee3cb6
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>
f2f2ee3cb6
ยท
2026-05-14 03:28:11 +00:00
History
Magentic Orchestration Sample
This sample ports the Python magentic.py workflow sample to .NET. It builds a MagenticWorkflowBuilder orchestration that coordinates three roles:
- ResearcherAgent gathers factual background information.
- CoderAgent uses
HostedCodeInterpreterToolfor 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_ENDPOINTset to your Azure AI Foundry project endpointAZURE_AI_MODEL_DEPLOYMENT_NAMEset to your model deployment name (defaults togpt-5.4-mini)az logincompleted before running the sample
Running the Sample
dotnet run
Expected Output
The sample prints:
- The original task prompt
- Streamed updates from the participating agents
- Magentic plan and progress-ledger events as the workflow coordinates the team
- The final conversation transcript returned by the workflow
Related Samples
- Handoff Orchestration - another multi-agent orchestration pattern in .NET workflows
- Python Magentic workflow sample - the source scenario that this sample ports