diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index 7a5bd32aab..afa5bc77f0 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -17,7 +17,7 @@ - + diff --git a/dotnet/samples/GettingStarted/Workflows/Declarative/ExecuteWorkflow/Program.cs b/dotnet/samples/GettingStarted/Workflows/Declarative/ExecuteWorkflow/Program.cs index 4b26aa14f1..ce6a19b0d3 100644 --- a/dotnet/samples/GettingStarted/Workflows/Declarative/ExecuteWorkflow/Program.cs +++ b/dotnet/samples/GettingStarted/Workflows/Declarative/ExecuteWorkflow/Program.cs @@ -184,6 +184,7 @@ private Program(string workflowFile, string? workflowInput) private async Task MonitorAndDisposeWorkflowRunAsync(Checkpointed run, object? response = null) { + // Always dispose the run when done. await using IAsyncDisposable disposeRun = run; bool hasStreamed = false; @@ -231,7 +232,7 @@ private Program(string workflowFile, string? workflowInput) } else { - await run.Run.DisposeAsync(); + // Yield to handle the external request return requestInfo.Request; } break; @@ -326,7 +327,7 @@ private Program(string workflowFile, string? workflowInput) } } - return default; + return null; // No request to handle } /// diff --git a/workflow-samples/DeepResearch.yaml b/workflow-samples/DeepResearch.yaml index e1db3cc5c5..be84e92bfb 100644 --- a/workflow-samples/DeepResearch.yaml +++ b/workflow-samples/DeepResearch.yaml @@ -1,5 +1,6 @@ # -# This workflow demonstrates a multi-agent orchestrator that attempts to address complex user requests. +# This workflow coordinates multiple agents in order to address complex user requests +# according to the "Magentic" orchestration pattern introduced by AutoGen. # # For this workflow, several agents used, each with a prompt specific to their role: #