Skip to content

.NET: [BREAKING] Workflows API Review Naming Changes (Part 1?) - #4090

Merged
Dmytro Struk (dmytrostruk) merged 7 commits into
mainfrom
dev/dotnet_workflow/api_review_naming_changes
Feb 20, 2026
Merged

.NET: [BREAKING] Workflows API Review Naming Changes (Part 1?)#4090
Dmytro Struk (dmytrostruk) merged 7 commits into
mainfrom
dev/dotnet_workflow/api_review_naming_changes

Conversation

@lokitoth

Copy link
Copy Markdown
Contributor

Description

Update names to take into account feedback from API Review, with the underlying goal of normalizing names between single agent and workflows, make the semantics of session vs. run clearer at the workflow level, and prevent a future breaking change in the FanIn APIs.

Contains many breaking changes.

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.

@lokitothJacob Alber (lokitoth) added .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows breaking change Usage: [PRs], Target: all PRs that introduce changes that are not backward compatible labels Feb 19, 2026
@lokitoth
Jacob Alber (lokitoth)force-pushed the dev/dotnet_workflow/api_review_naming_changes branch from fc41dd3 to c0cef4aCompareFebruary 19, 2026 16:06
@lokitoth
Jacob Alber (lokitoth)force-pushed the dev/dotnet_workflow/api_review_naming_changes branch from c0cef4a to f6a842bCompareFebruary 19, 2026 16:43
Comment threaddotnet/src/Microsoft.Agents.AI.Workflows/InProcessExecution.cs Outdated
Comment threaddotnet/src/Microsoft.Agents.AI.Workflows/Observability/Tags.cs Outdated
@lokitoth
Jacob Alber (lokitoth) marked this pull request as ready for review February 19, 2026 17:35
CopilotAI review requested due to automatic review settings February 19, 2026 17:35

CopilotAI 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

This PR applies API-review-driven naming changes across the .NET Workflows surface to better distinguish sessions vs runs, normalize naming with single-agent APIs, and clarify Fan-In semantics.

Changes:

  • Renames workflow execution identifiers from RunId to SessionId across runtime, checkpointing, tests, and samples.
  • Renames streaming entry points to OpenStreamingAsync / RunStreamingAsync / ResumeStreamingAsync and updates call sites.
  • Renames fan-in workflow edges to AddFanInBarrierEdge and updates usages in tests/samples/builders.

Reviewed changes

Copilot reviewed 63 out of 63 changed files in this pull request and generated 8 comments.

Show a summary per file
FileDescription
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/WorkflowVisualizerTests.csUpdates visualization tests to use AddFanInBarrierEdge.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/TestRequestAgent.csUpdates request payload extraction to TryGetDataAs.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/13_Subworkflow_Checkpointing.csUpdates streaming run/resume method names.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/09_Subworkflow_ExternalRequest.csUpdates PortableValue/TryGetDataAs usage for external request handling.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/06_GroupChat_Workflow.csUpdates streaming execution call to RunStreamingAsync.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/05_Simple_Workflow_Checkpointing.csUpdates checkpointing sample to new streaming/resume APIs and SessionId.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/04_Simple_Workflow_ExternalRequest.csUpdates streaming execution call to RunStreamingAsync.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/03_Simple_Workflow_Loop.csUpdates streaming execution call to RunStreamingAsync.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/02_Simple_Workflow_Condition.csUpdates streaming execution call to RunStreamingAsync.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/01_Simple_Workflow_Sequential.csUpdates streaming execution call to RunStreamingAsync and removes outdated TODO.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/RepresentationTests.csUpdates executor binding factory argument to sessionId.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/InMemoryJsonStore.csUpdates checkpoint store test helper types/parameters to Session*.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.csUpdates checkpoint-parent tests to RunStreamingAsync/ResumeStreamingAsync and SessionId.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/AgentWorkflowBuilderTests.csUpdates workflow execution to RunStreamingAsync.
dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/CosmosCheckpointStoreTests.csUpdates Cosmos checkpoint tests to sessionId and /sessionId partition key.
dotnet/src/Shared/Workflows/Execution/WorkflowRunner.csSwitches external request extraction to TryGetDataAs.
dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowSession.csRenames session identifier to SessionId and updates streaming/resume calls.
dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowHostAgent.csRenames assigned ID tracking to session terminology.
dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowBuilder.csIntroduces AddFanInBarrierEdge and updates fan-in API naming.
dotnet/src/Microsoft.Agents.AI.Workflows/SwitchBuilder.csRenames fan-out selector local function for clarity.
dotnet/src/Microsoft.Agents.AI.Workflows/SubworkflowBinding.csUpdates executor factory parameter name to sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/StreamingRun.csExposes SessionId on StreamingRun.
dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/WorkflowHostExecutor.csUpdates internal state and checkpoint interactions to use sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/Run.csExposes SessionId on Run.
dotnet/src/Microsoft.Agents.AI.Workflows/RouteBuilder.csUpdates typed-response extraction to TryGetDataAs.
dotnet/src/Microsoft.Agents.AI.Workflows/PortableValue.csClarifies docs around default values vs nullable value types.
dotnet/src/Microsoft.Agents.AI.Workflows/Observability/Tags.csRenames telemetry tag constant to SessionId (key currently unchanged).
dotnet/src/Microsoft.Agents.AI.Workflows/InProcessExecution.csUpdates helper APIs to call new streaming methods and accept sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessRunnerContext.csUpdates runner context to pass and report sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessRunner.csRenames runner identifier to SessionId and updates checkpointing calls.
dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessExecutionEnvironment.csRenames/implements streaming APIs and propagates sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/IWorkflowExecutionEnvironment.csRenames streaming API surface and runId parameter to sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/GroupChatWorkflowBuilder.csUpdates group chat host factory parameter name to sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/ExternalResponse.csReplaces DataIs/DataAs patterns with TryGetDataAs and keeps DataIs<T>().
dotnet/src/Microsoft.Agents.AI.Workflows/ExternalRequest.csReplaces DataIs(out ...) with TryGetDataAs and adds TryGetDataAs(Type, ...).
dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorBindingExtensions.csUpdates executor factory delegate parameter naming to sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorBinding.csUpdates factory invocation parameter naming to sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/Execution/StreamingRunEventStream.csUpdates telemetry tagging to use SessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/Execution/LockstepRunEventStream.csUpdates telemetry tagging to use SessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/Execution/ISuperStepRunner.csRenames runner identifier contract to SessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/Execution/AsyncRunHandle.csRenames exposed identifier to SessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/Configured.csUpdates configured factory delegate parameter naming to sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/ConfigurationExtensions.csUpdates configuration adapter delegate parameter naming to sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/SessionCheckpointCache.csRenames checkpoint cache type to SessionCheckpointCache.
dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/JsonCheckpointStore.csUpdates abstract store methods to accept sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/InMemoryCheckpointManager.csUpdates in-memory checkpoint manager to Session* naming.
dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/ICheckpointStore.csUpdates checkpoint store interface parameter/docs to sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/ICheckpointManager.csUpdates checkpoint manager interface parameter/docs to sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/FileSystemJsonCheckpointStore.csUpdates filesystem store APIs and filenames to use sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/CheckpointManagerImpl.csUpdates checkpoint manager impl to pass sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/CheckpointInfoConverter.csUpdates converter regex/grouping and stringification to SessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/CheckpointManager.csUpdates adapter to forward sessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/CheckpointInfo.csRenames checkpoint identifier from RunId to SessionId.
dotnet/src/Microsoft.Agents.AI.Workflows/AgentWorkflowBuilder.csUpdates workflow construction to use AddFanInBarrierEdge.
dotnet/src/Microsoft.Agents.AI.CosmosNoSql/CosmosCheckpointStore.csUpdates Cosmos checkpoint storage schema/API to sessionId.
dotnet/samples/GettingStarted/Workflows/SharedStates/Program.csUpdates sample workflow fan-in to AddFanInBarrierEdge.
dotnet/samples/GettingStarted/Workflows/Observability/WorkflowAsAnAgent/WorkflowHelper.csUpdates sample workflow fan-in to AddFanInBarrierEdge.
dotnet/samples/GettingStarted/Workflows/HumanInTheLoop/HumanInTheLoopBasic/Program.csUpdates sample to use PortableValue.As<T>() directly where needed.
dotnet/samples/GettingStarted/Workflows/Concurrent/MapReduce/Program.csUpdates sample fan-in to AddFanInBarrierEdge.
dotnet/samples/GettingStarted/Workflows/Concurrent/Concurrent/Program.csUpdates sample fan-in to AddFanInBarrierEdge.
dotnet/samples/GettingStarted/Workflows/Checkpoint/CheckpointWithHumanInTheLoop/Program.csUpdates sample request handling to TryGetDataAs.
dotnet/samples/GettingStarted/Workflows/Agents/WorkflowAsAnAgent/WorkflowFactory.csUpdates sample fan-in to AddFanInBarrierEdge.
dotnet/samples/GettingStarted/Workflows/Agents/GroupChatToolApproval/Program.csUpdates streaming execution to RunStreamingAsync and request extraction to TryGetDataAs.

Comment threaddotnet/src/Microsoft.Agents.AI.Workflows/WorkflowBuilder.cs Outdated
Comment threaddotnet/src/Microsoft.Agents.AI.Workflows/Observability/Tags.cs Outdated
Comment threaddotnet/src/Shared/Workflows/Execution/WorkflowRunner.cs
@crickman
Chris (crickman) deleted the dev/dotnet_workflow/api_review_naming_changes branch March 16, 2026 17:01
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking changeUsage: [PRs], Target: all PRs that introduce changes that are not backward compatible.NETUsage: [Issues, PRs], Target: .NetworkflowsUsage: [Issues, PRs], Target: Workflows

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants

@lokitoth@alliscode@SergeyMenshykh@dmytrostruk