.NET: Add Magentic Orchestration Sample#5823
Draft
Copilot wants to merge 7 commits into
Draft
Conversation
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>
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>
Copilot created this pull request from a session on behalf of
lokitoth
May 13, 2026 19:18
View session
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>
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>
Contributor
There was a problem hiding this comment.
Pull request overview
Ports the Python Magentic multi-agent orchestration sample to .NET, adding a new console sample under samples/03-workflows/Orchestration/Magentic/ that uses MagenticWorkflowBuilder with a researcher agent, a coder agent (with HostedCodeInterpreterTool), and an LLM-backed manager. It streams orchestration events (initial plan, replans, progress-ledger updates) and prints the final transcript. The PR description also mentions an Evaluation API cleanup (removing EvalItem.ExpectedOutput / Evaluation_WorkflowExpectedOutputs), but those changes are not present in the diffs supplied for review.
Changes:
- New Magentic orchestration sample (Program.cs, csproj, README) wiring up three agents and streaming Magentic events.
- Solution and parent README updated to register/list the new sample.
- (Per PR description, but not in the supplied diffs) Removal of
ExpectedOutput/ground-truth evaluation surface.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/samples/03-workflows/README.md | Adds row for the new Magentic sample. |
| dotnet/samples/03-workflows/Orchestration/Magentic/README.md | Documents prerequisites, run instructions, and expected output for the sample. |
| dotnet/samples/03-workflows/Orchestration/Magentic/Program.cs | Implements the Magentic orchestration sample, event streaming, and transcript printing. |
| dotnet/samples/03-workflows/Orchestration/Magentic/Magentic.csproj | New project file referencing Workflows, Foundry, and core agent assemblies. |
| dotnet/agent-framework-dotnet.slnx | Registers the new Magentic sample project in the solution. |
Comment on lines
+184
to
+194
| private static void PauseIfInteractive() | ||
| { | ||
| if (Console.IsInputRedirected) | ||
| { | ||
| return; | ||
| } | ||
|
|
||
| Console.Write("Press Enter to continue..."); | ||
| Console.ReadLine(); | ||
| Console.WriteLine(); | ||
| } |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Ports the Python Magentic multi-agent orchestration sample to .NET, giving .NET developers a ready-to-run example of the
MagenticWorkflowBuilderpattern for coordinating specialized agents on complex analytical tasks.Description
New Magentic Orchestration Sample
Adds
dotnet/samples/03-workflows/Orchestration/Magentic/— a .NET port of the Pythonmagentic.pyworkflow sample. The sample builds aMagenticWorkflowBuilderorchestration with three roles:HostedCodeInterpreterToolfor quantitative analysisKey aspects demonstrated:
MagenticWorkflowBuilder(max rounds, stalls, resets)PauseIfInteractivethat skips when stdin or stdout is redirected (CI-friendly)Other Changes
Magentic.csprojin the solution file03-workflows/README.mdindexContribution Checklist