Conversation
* Add basic durable workflow support. * PR feedback fixes * Add conditional edge sample. * PR feedback fixes. * Minor cleanup. * Minor cleanup * Minor formatting improvements. * Improve comments/documentation on the execution flow.
…e workflows (#3935) * Adding azure functions workflow support. * - PR feedback fixes. - Add example to demonstrate complex Object as payload. * rename instanceId to runId. * Use custom ITaskOrchestrator to run orchestrator function.
…rable workflows (#4020) * Adding support for events & shared state in durable workflows. * PR feedback fixes * PR feedback fixes. * Add YieldOutputAsync calls to 05_WorkflowEvents sample executors The integration test asserts that WorkflowOutputEvent is found in the stream, but the sample executors only used AddEventAsync for custom events and never called YieldOutputAsync. Since WorkflowOutputEvent is only emitted via explicit YieldOutputAsync calls, the assertion would fail. Added YieldOutputAsync to each executor to match the test expectation and demonstrate the API in the sample. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix deserialization to use shared serializer options. * PR feedback updates. * Sample cleanup * PR feedback fixes * Addressing PR review feedback for DurableStreamingWorkflowRun - Use -1 instead of 0 for taskId in TaskFailedException when task ID is not relevant. - Add [NotNullWhen(true)] to TryParseWorkflowResult out parameter following .NET TryXXX conventions. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rkflows (#4190) * .NET: [Feature Branch] Add nested sub-workflow support for durable workflows * fix readme path * Switch Orchestration output from string to DurableWorkflowResult. * PR feedback fixes * Minor cleanup based on PR feedback.
…flows (#4358) * Add Azure Functions HITL workflow sample Add 06_WorkflowHITL Azure Functions sample demonstrating Human-in-the-Loop workflow support with HTTP endpoints for status checking and approval responses. The sample includes: - ExpenseReimbursement workflow with RequestPort for manager approval - Custom HTTP endpoint to check workflow status and pending approvals - Custom HTTP endpoint to send approval responses via RaiseEventAsync - demo.http file with step-by-step interaction examples * PR feedback fixes * Minor comment cleanup * Minor comment clReverted the `!context.IsReplaying` guards on `PendingEvents.Add`/`RemoveAll` and `SetCustomStatus` in `ExecuteRequestPortAsync`. The guards broke fan-out scenarios where parallel RequestPorts need to be discoverable after replay. `SetCustomStatus` is idempotent metadata that doesn't affect replay determinism.eanup * fix for PR feedback * PR feedback updates * Improvements to samples * Improvements to README * Update samples to use parallel request ports. * Unit tests * Introduce local variables to improve readability of Workflows.Workflows access patter * Use GitHub-style callouts and add PowerShell command variants in HITL sample README
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
kshyju
added a commit
that referenced
this pull request
Mar 3, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0a79239 to
154c44a
Compare
Microsoft.Azure.Functions.Worker.Extensions.DurableTask 1.13.1 requires Microsoft.DurableTask.Worker >= 1.19.1 via its transitive dependency on Microsoft.DurableTask.Worker.Grpc 1.19.1. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Create Workflow/README.md with environment setup docs - Fix ../README.md -> ../../README.md in ConsoleApps 01, 02, 03, 08 - Fix SubWorkflows relative path (3 levels -> 4 levels up) - Fix dead Durable Task Scheduler URL Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…, GetNewSessionAsync rename - Remove InjectSharedThrow from DurableTask csproj (uses Workflows' internal Throw via InternalsVisibleTo) - Update ExecuteAsync -> ExecuteCoreAsync with WorkflowTelemetryContext.Disabled - Update GetNewSessionAsync -> CreateSessionAsync Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Aligns with main branch sample reorganization where durable samples live under 04-hosting/ (alongside DurableAgents/). - Move samples/Durable/Workflow/ -> samples/04-hosting/DurableWorkflows/ - Add Directory.Build.props matching DurableAgents pattern - Update slnx project paths - Update integration test sample paths - Update README cd paths and cross-references Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1776b06 to
b310037
Compare
… APIs - Remove duplicate OutputLog, WriteInputAsync, CreateTestTimeoutCts, etc. from ConsoleAppSamplesValidation (already in SamplesValidationBase) - Update AddFanInEdge -> AddFanInBarrierEdge in workflow samples - Update GetNewSessionAsync -> CreateSessionAsync in workflow samples - Update SourceId -> ExecutorId (obsolete) in workflow samples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0dd82b4 to
3c586b2
Compare
dotnet/src/Microsoft.Agents.AI.DurableTask/Workflows/ExecutorRegistry.cs
Show resolved
Hide resolved
cgillum
approved these changes
Mar 11, 2026
larohra
approved these changes
Mar 12, 2026
cgillum
approved these changes
Mar 12, 2026
larohra
approved these changes
Mar 12, 2026
ValidateOrder and EnrichOrder call YieldOutputAsync with string messages, but only their TOutput (OrderDetails) was in the allowed yield types. This caused TargetInvocationException in the WorkflowSharedState sample validation integration test.
cgillum
approved these changes
Mar 13, 2026
cgillum
approved these changes
Mar 14, 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.
Motivation and Context
The Agent Framework needs support for long-running, reliable agent orchestrations that can survive process restarts, scale across machines, and handle complex multi-step workflows. This PR brings durable workflow support backed by the Durable Task framework, enabling scenarios like multi-agent pipelines, fan-out/fan-in patterns, and human-in-the-loop approvals.
Description
This PR merges the
feat/durable_taskfeature branch, adding comprehensive durable workflow support across two packages. The feature was developed across 5 PRs into the feature branch:Basic durable workflow support (#3648) — Core workflow engine including
IWorkflowClient,IWorkflowRun,DurableWorkflowRunner,DurableWorkflowContext, edge routers (direct and fan-out), activity executors, workflow analyzer, and streamingsupport via
IStreamingWorkflowRun.Azure Functions hosting (#3935) — Hosting layer for running durable workflows in Azure Functions, including
WorkflowOrchestrator,DurableWorkflowsFunctionMetadataTransformer, and DI extensions.Events & shared state (#4020) — Support for publishing and subscribing to workflow events, and sharing state across workflow executors.
Nested sub-workflows (#4190) — Ability to compose workflows by nesting sub-workflows within a parent workflow.
Human-in-the-loop (HITL) (#4358) — Support for pausing workflow execution to wait for human input, including
DurableWorkflowWaitingForInputEvent,PendingRequestPortStatus, andDurableHaltRequestedEvent.Packages changed:
Microsoft.Agents.AI.DurableTaskMicrosoft.Agents.AI.Hosting.AzureFunctionsKey new types:
IWorkflowClient/DurableWorkflowClient— Client for starting and managing workflow runsIWorkflowRun/IStreamingWorkflowRun— Handles for monitoring workflow executionDurableWorkflowRunner— Core orchestration runnerDurableWorkflowContext— Execution context available to workflow stepsDurableExecutorDispatcher— Routes execution to registered executorsIDurableEdgeRouter— Abstraction for routing between workflow nodes (direct, fan-out)WorkflowAnalyzer/WorkflowGraphInfo— Static analysis of workflow graphsWorkflowOrchestrator— Azure Functions orchestrator for durable workflowsContribution Checklist