Skip to content

.NET: fix: Concurrent Workflow Sample#5090

Merged
lokitoth merged 4 commits intomainfrom
dev/dotnet_workflow/fix_concurrent_sample
Apr 7, 2026
Merged

.NET: fix: Concurrent Workflow Sample#5090
lokitoth merged 4 commits intomainfrom
dev/dotnet_workflow/fix_concurrent_sample

Conversation

@lokitoth
Copy link
Copy Markdown
Member

@lokitoth lokitoth commented Apr 3, 2026

Description

  • Switch to using Azure AI Projects APIs
  • Remove agent streaming outputs by changing emitEvents to false on TurnToken, since these were treated as the workflow output
  • Disable forwarding input from agent host executors to avoid including the input message (duplicated twice) as the output
  • Make output format more legible

Closes #3994

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 review requested due to automatic review settings April 3, 2026 21:29
@lokitoth lokitoth added .NET workflows Related to Workflows in agent-framework labels Apr 3, 2026
@lokitoth lokitoth moved this to In Review in Agent Framework Apr 3, 2026
@lokitoth lokitoth self-assigned this Apr 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the Concurrent Workflow .NET sample to use Azure AI Projects, and adjusts streaming/executor behavior so the workflow output is cleaner and no longer polluted by agent streaming or duplicated input.

Changes:

  • Migrate from Azure.AI.OpenAI client usage to Azure.AI.Projects via AIProjectClient.
  • Prevent agent streaming events and duplicated input from appearing as workflow output (emitEvents: false, ForwardIncomingMessages = false).
  • Improve console output readability and add explicit error handling for workflow/executor failures.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
dotnet/samples/03-workflows/Concurrent/Concurrent/Program.cs Switch client API, adjust executor/streaming behavior, and improve output/error formatting.
dotnet/samples/03-workflows/Concurrent/Concurrent/Concurrent.csproj Replace Azure.AI.OpenAI package reference with Azure.AI.Projects.

@lokitoth lokitoth force-pushed the dev/dotnet_workflow/fix_concurrent_sample branch 2 times, most recently from 1a9e60a to 94b8827 Compare April 3, 2026 21:45
@lokitoth lokitoth force-pushed the dev/dotnet_workflow/fix_concurrent_sample branch from 94b8827 to ddf3049 Compare April 3, 2026 21:48
* Switch to using Azure AI Projects APIs
* Remove agent streaming outputs by changing emitEvents to false on TurnToken
* Disable forwarding input from agent host executors
* Make output format more legible
@lokitoth lokitoth force-pushed the dev/dotnet_workflow/fix_concurrent_sample branch from ddf3049 to 2838918 Compare April 3, 2026 21:52
@lokitoth lokitoth force-pushed the dev/dotnet_workflow/fix_concurrent_sample branch from 2838918 to 073114d Compare April 3, 2026 21:52
@lokitoth lokitoth added this pull request to the merge queue Apr 7, 2026
Merged via the queue into main with commit 826d8db Apr 7, 2026
21 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Agent Framework Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET workflows Related to Workflows in agent-framework

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

.NET: [Bug]: Workflow Concurrent Concurrent.csproj sample does not produce expected output

4 participants