Files
agent-framework/dotnet/src/Microsoft.Agents.Workflows/ExecutorOptions.cs
T
Jacob AlberandGitHub 39e071c430 .NET: Update Workflow Input/Output Redesign (#881)
* feat: Make Executor id field mandatory

When checkpointing is involved, it is critical to keep executor ids consistent between runs, even when recreating a new object tree for the workflow.

The default id-setting mechanism generated a guid for part of the id, making it not work when restoring from a checkpoint.

This change prevents this situation from arising.

* feat: Enable running untyped Workflows

With the change to enable delay-instantiation of executors and support for async Executor factory methods, we must instantiate the starting executor to know what are the valid input types for the workflow.

To avoid forcing instantiation every time, and to better support workflows with multiple input types, we enable support for build and interacting with the base Workflow type without type annotations, and remove the requirement to know a valid input type when initiating a run.

* feat: Support Output from any executor and multiple outputs.
2025-09-25 02:03:22 +00:00

27 lines
867 B
C#

// Copyright (c) Microsoft. All rights reserved.
namespace Microsoft.Agents.Workflows;
/// <summary>
/// Configuration options for Executor behavior.
/// </summary>
public class ExecutorOptions
{
/// <summary>
/// The default runner configuration.
/// </summary>
public static ExecutorOptions Default { get; } = new();
internal ExecutorOptions() { }
/// <summary>
/// If <see langword="true"/>, the result of a message handler that returns a value will be sent as a message from the executor.
/// </summary>
public bool AutoSendMessageHandlerResultObject { get; set; } = true;
/// <summary>
/// If <see langword="true"/>, the result of a message handler that returns a value will be yielded as an output of the executor.
/// </summary>
public bool AutoYieldOutputHandlerResultObject { get; set; } = true;
}