.NET: [BREAKING] Workflows API Review Naming Changes (Part 1?)#4090
Merged
dmytrostruk merged 7 commits intomainfrom Feb 20, 2026
Merged
.NET: [BREAKING] Workflows API Review Naming Changes (Part 1?)#4090dmytrostruk merged 7 commits intomainfrom
dmytrostruk merged 7 commits intomainfrom
Conversation
fc41dd3 to
c0cef4a
Compare
c0cef4a to
f6a842b
Compare
SergeyMenshykh
approved these changes
Feb 19, 2026
f6a842b to
7b451aa
Compare
alliscode
reviewed
Feb 19, 2026
dotnet/samples/GettingStarted/Workflows/HumanInTheLoop/HumanInTheLoopBasic/Program.cs
Outdated
Show resolved
Hide resolved
alliscode
reviewed
Feb 19, 2026
alliscode
reviewed
Feb 19, 2026
dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/InMemoryCheckpointManager.cs
Outdated
Show resolved
Hide resolved
alliscode
approved these changes
Feb 19, 2026
Contributor
There was a problem hiding this comment.
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
RunIdtoSessionIdacross runtime, checkpointing, tests, and samples. - Renames streaming entry points to
OpenStreamingAsync/RunStreamingAsync/ResumeStreamingAsyncand updates call sites. - Renames fan-in workflow edges to
AddFanInBarrierEdgeand 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
| File | Description |
|---|---|
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/WorkflowVisualizerTests.cs | Updates visualization tests to use AddFanInBarrierEdge. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/TestRequestAgent.cs | Updates request payload extraction to TryGetDataAs. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/13_Subworkflow_Checkpointing.cs | Updates streaming run/resume method names. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/09_Subworkflow_ExternalRequest.cs | Updates PortableValue/TryGetDataAs usage for external request handling. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/06_GroupChat_Workflow.cs | Updates streaming execution call to RunStreamingAsync. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/05_Simple_Workflow_Checkpointing.cs | Updates checkpointing sample to new streaming/resume APIs and SessionId. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/04_Simple_Workflow_ExternalRequest.cs | Updates streaming execution call to RunStreamingAsync. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/03_Simple_Workflow_Loop.cs | Updates streaming execution call to RunStreamingAsync. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/02_Simple_Workflow_Condition.cs | Updates streaming execution call to RunStreamingAsync. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/01_Simple_Workflow_Sequential.cs | Updates streaming execution call to RunStreamingAsync and removes outdated TODO. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/RepresentationTests.cs | Updates executor binding factory argument to sessionId. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/InMemoryJsonStore.cs | Updates checkpoint store test helper types/parameters to Session*. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/CheckpointParentTests.cs | Updates checkpoint-parent tests to RunStreamingAsync/ResumeStreamingAsync and SessionId. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/AgentWorkflowBuilderTests.cs | Updates workflow execution to RunStreamingAsync. |
| dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/CosmosCheckpointStoreTests.cs | Updates Cosmos checkpoint tests to sessionId and /sessionId partition key. |
| dotnet/src/Shared/Workflows/Execution/WorkflowRunner.cs | Switches external request extraction to TryGetDataAs. |
| dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowSession.cs | Renames session identifier to SessionId and updates streaming/resume calls. |
| dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowHostAgent.cs | Renames assigned ID tracking to session terminology. |
| dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowBuilder.cs | Introduces AddFanInBarrierEdge and updates fan-in API naming. |
| dotnet/src/Microsoft.Agents.AI.Workflows/SwitchBuilder.cs | Renames fan-out selector local function for clarity. |
| dotnet/src/Microsoft.Agents.AI.Workflows/SubworkflowBinding.cs | Updates executor factory parameter name to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/StreamingRun.cs | Exposes SessionId on StreamingRun. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/WorkflowHostExecutor.cs | Updates internal state and checkpoint interactions to use sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Run.cs | Exposes SessionId on Run. |
| dotnet/src/Microsoft.Agents.AI.Workflows/RouteBuilder.cs | Updates typed-response extraction to TryGetDataAs. |
| dotnet/src/Microsoft.Agents.AI.Workflows/PortableValue.cs | Clarifies docs around default values vs nullable value types. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Observability/Tags.cs | Renames telemetry tag constant to SessionId (key currently unchanged). |
| dotnet/src/Microsoft.Agents.AI.Workflows/InProcessExecution.cs | Updates helper APIs to call new streaming methods and accept sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessRunnerContext.cs | Updates runner context to pass and report sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessRunner.cs | Renames runner identifier to SessionId and updates checkpointing calls. |
| dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessExecutionEnvironment.cs | Renames/implements streaming APIs and propagates sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/IWorkflowExecutionEnvironment.cs | Renames streaming API surface and runId parameter to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/GroupChatWorkflowBuilder.cs | Updates group chat host factory parameter name to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/ExternalResponse.cs | Replaces DataIs/DataAs patterns with TryGetDataAs and keeps DataIs<T>(). |
| dotnet/src/Microsoft.Agents.AI.Workflows/ExternalRequest.cs | Replaces DataIs(out ...) with TryGetDataAs and adds TryGetDataAs(Type, ...). |
| dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorBindingExtensions.cs | Updates executor factory delegate parameter naming to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorBinding.cs | Updates factory invocation parameter naming to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Execution/StreamingRunEventStream.cs | Updates telemetry tagging to use SessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Execution/LockstepRunEventStream.cs | Updates telemetry tagging to use SessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Execution/ISuperStepRunner.cs | Renames runner identifier contract to SessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Execution/AsyncRunHandle.cs | Renames exposed identifier to SessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Configured.cs | Updates configured factory delegate parameter naming to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/ConfigurationExtensions.cs | Updates configuration adapter delegate parameter naming to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/SessionCheckpointCache.cs | Renames checkpoint cache type to SessionCheckpointCache. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/JsonCheckpointStore.cs | Updates abstract store methods to accept sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/InMemoryCheckpointManager.cs | Updates in-memory checkpoint manager to Session* naming. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/ICheckpointStore.cs | Updates checkpoint store interface parameter/docs to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/ICheckpointManager.cs | Updates checkpoint manager interface parameter/docs to sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/FileSystemJsonCheckpointStore.cs | Updates filesystem store APIs and filenames to use sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/CheckpointManagerImpl.cs | Updates checkpoint manager impl to pass sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/CheckpointInfoConverter.cs | Updates converter regex/grouping and stringification to SessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/CheckpointManager.cs | Updates adapter to forward sessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/CheckpointInfo.cs | Renames checkpoint identifier from RunId to SessionId. |
| dotnet/src/Microsoft.Agents.AI.Workflows/AgentWorkflowBuilder.cs | Updates workflow construction to use AddFanInBarrierEdge. |
| dotnet/src/Microsoft.Agents.AI.CosmosNoSql/CosmosCheckpointStore.cs | Updates Cosmos checkpoint storage schema/API to sessionId. |
| dotnet/samples/GettingStarted/Workflows/SharedStates/Program.cs | Updates sample workflow fan-in to AddFanInBarrierEdge. |
| dotnet/samples/GettingStarted/Workflows/Observability/WorkflowAsAnAgent/WorkflowHelper.cs | Updates sample workflow fan-in to AddFanInBarrierEdge. |
| dotnet/samples/GettingStarted/Workflows/HumanInTheLoop/HumanInTheLoopBasic/Program.cs | Updates sample to use PortableValue.As<T>() directly where needed. |
| dotnet/samples/GettingStarted/Workflows/Concurrent/MapReduce/Program.cs | Updates sample fan-in to AddFanInBarrierEdge. |
| dotnet/samples/GettingStarted/Workflows/Concurrent/Concurrent/Program.cs | Updates sample fan-in to AddFanInBarrierEdge. |
| dotnet/samples/GettingStarted/Workflows/Checkpoint/CheckpointWithHumanInTheLoop/Program.cs | Updates sample request handling to TryGetDataAs. |
| dotnet/samples/GettingStarted/Workflows/Agents/WorkflowAsAnAgent/WorkflowFactory.cs | Updates sample fan-in to AddFanInBarrierEdge. |
| dotnet/samples/GettingStarted/Workflows/Agents/GroupChatToolApproval/Program.cs | Updates streaming execution to RunStreamingAsync and request extraction to TryGetDataAs. |
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/InMemoryJsonStore.cs
Show resolved
Hide resolved
dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/InMemoryCheckpointManager.cs
Outdated
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/05_Simple_Workflow_Checkpointing.cs
Outdated
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/WorkflowVisualizerTests.cs
Outdated
Show resolved
Hide resolved
3c0f570 to
c40cd5a
Compare
SergeyMenshykh
approved these changes
Feb 19, 2026
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 19, 2026
* refactor: Normalize Run/RunStreaming with AIAgent * refactor: Clarify Session vs. Run -level concepts * Rename RunId to SessionId to better match Run/Session terminology in AIAgent * [BREAKING]: Will break existing checkpointed sessions in CosmosDb due to field rename * refactor: Rename and simplify interface around getting typed data out of ExternalRequest/Response * Also adds hints around using value types in PortableValue * refactor: Rename AddFanInEdge to AddFanInBarrierEdge This will prevent a breaking change later when we introduce a programmable FanIn edge, analogous to the FanOut edge's EdgeSelector. The goal, in the long run is to support a number of different FanIn scenarios, with naive FanIn (no barrier) by default, similar to FanOut. * refactor: AsAgent(this Workflow, ...) => AsAIAgent(...) * misc - part1: SwitchBuilder internal
This was referenced Feb 23, 2026
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.
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