Skip to content

.NET: feat: adds the executorId as an additional property when running the workflow as agent in dotnet - #7934

Open
Vincent Biret (baywet) wants to merge 15 commits into
mainfrom
feat/workflow-as-agent-executor-id-dotnet
Open

Vincent Biret (baywet) wants to merge 15 commits into
mainfrom
feat/workflow-as-agent-executor-id-dotnet

Conversation

@baywet

Copy link
Copy Markdown
Member

fixes #4445

Copilot AI balanced review requested due to automatic review settings August 28, 2026 12:53
@agent-framework-automation agent-framework-automation Bot added .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows labels Aug 28, 2026
@github-actions github-actions Bot changed the title feat: adds the executorId as an additional property when running the workflow as agent in dotnet .NET: feat: adds the executorId as an additional property when running the workflow as agent in dotnet Aug 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds workflow executor attribution to streamed .NET agent response updates.

Changes:

  • Adds a public executorId metadata key.
  • Attaches executor IDs to response updates.
  • Adds multi-executor streaming coverage.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
WorkflowAgentAdditionalProperties.cs Defines the executor ID key.
AgentResponseUpdateEvent.cs Adds attribution metadata to updates.
WorkflowHostSmokeTests.cs Tests attribution and metadata preservation.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread dotnet/src/Microsoft.Agents.AI.Workflows/AgentResponseUpdateEvent.cs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
github-actions[bot]

This comment was marked as outdated.

This comment was marked as outdated.

…cross execution methods

Signed-off-by: Vincent Biret <vibiret@microsoft.com>
…revious inputs for the executorId

Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Comment thread dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowSession.cs
Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
/// <summary>
/// Defines additional property keys used by workflow-hosted agents.
/// </summary>
public static class WorkflowAgentAdditionalProperties

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

FYI: If we are unsure about something new that is public we often mark it as experimental, to make sure we can still make changes to it before graduating the feature. We then remove experimental once we are happy with the overall change.
Not sure if that is applicable here, but just an FYI.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks I think Tao Chen (@TaoChenOSU) and Peter Ibekwe (@peibekwe) will be able to inform the design here and whether or not we need to add those experimental aspects.

@baywet

Copy link
Copy Markdown
Member Author

worth exploring this instead of magic keys in a dictionary

update.RawRepresentation is ExecutorEvent exevt
exevt.ExecutorId

@github-code-quality

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: C#

C# / code-coverage/dotnet

main f7a5fcb feat/workflow-as-age... 6df5254 +/-
86% 86% 0%
View coverage of the 4 most impacted files.
File main f7a5fcb feat/workflow-as-age... 6df5254 +/-
/home/runner/wo...SessionStore.cs 100% 53% -47%
/home/runner/wo...kflowSession.cs 87% 88% +1%
/home/runner/wo...eUpdateEvent.cs 73% 83% +10%
/home/runner/wo...esponseEvent.cs 67% 80% +13%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

This branch was successfully deployed

2 active deployments
integration — 6df52544 Deployed Oct 19, 2026 by baywet via dotnet-foundry-hosted-it #30695
github-app-auth — 6df52544 Deployed Oct 19, 2026 by baywet via add_label #25746
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET: [Feature]: Expose ExecutorId for AgentResponseUpdate when using workflow\.AsAgent().RunStreamingAsync()

4 participants