Skip to content

.NET: Add Magentic Orchestration Sample#5823

Merged
lokitoth merged 12 commits into
mainfrom
copilot/port-magentic-orchestration-sample
May 22, 2026
Merged

.NET: Add Magentic Orchestration Sample#5823
lokitoth merged 12 commits into
mainfrom
copilot/port-magentic-orchestration-sample

Conversation

Copilot AI commented May 13, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

Ports the Python Magentic multi-agent orchestration sample to .NET, giving .NET developers a ready-to-run example of the MagenticWorkflowBuilder pattern 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 Python magentic.py workflow sample. The sample builds a MagenticWorkflowBuilder orchestration with three roles:

  • ResearcherAgent – gathers factual background information
  • CoderAgent – uses HostedCodeInterpreterTool for quantitative analysis
  • MagenticManager – plans the work, tracks progress via a ledger, and decides who acts next

Key aspects demonstrated:

  • Building a Magentic workflow with MagenticWorkflowBuilder (max rounds, stalls, resets)
  • Combining standard responses-based agents with a code-interpreter-enabled participant
  • Streaming orchestration events: initial plan, replans, and progress-ledger updates
  • Printing the final multi-agent conversation transcript
  • Graceful PauseIfInteractive that skips when stdin or stdout is redirected (CI-friendly)

Closes #5771

Other Changes

  • Registered the new Magentic.csproj in the solution file
  • Added the sample entry to the 03-workflows/README.md index

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • [ ] Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI and others added 2 commits May 13, 2026 19:03
Copilot AI self-assigned this May 13, 2026
Copilot AI review requested due to automatic review settings May 13, 2026 19:18
Copilot AI removed the request for review from Copilot May 13, 2026 19:18
@moonbox3 moonbox3 added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows labels May 13, 2026
@github-actions github-actions Bot changed the title Port Magentic orchestration workflow sample to .NET .NET: Port Magentic orchestration workflow sample to .NET May 13, 2026
Copilot AI requested a review from lokitoth May 13, 2026 19:51
Copilot AI requested review from Copilot and removed request for Copilot May 13, 2026 19:56
Copilot AI requested review from Copilot and removed request for Copilot May 13, 2026 19:59
This was referenced Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

.NET: [Feature]: Add a Magentic Orchestration sample

6 participants