// Copyright (c) Microsoft. All rights reserved.
namespace Microsoft.Agents.AI.DurableTask;
///
/// Options for running a durable agent.
///
public sealed class DurableAgentRunOptions : AgentRunOptions
{
///
/// Initializes a new instance of the class.
///
public DurableAgentRunOptions()
{
}
///
/// Initializes a new instance of the class by copying values from the specified options.
///
/// The options instance from which to copy values.
private DurableAgentRunOptions(DurableAgentRunOptions options)
: base(options)
{
this.EnableToolCalls = options.EnableToolCalls;
this.EnableToolNames = options.EnableToolNames is not null ? new List(options.EnableToolNames) : null;
this.IsFireAndForget = options.IsFireAndForget;
}
///
/// Gets or sets whether to enable tool calls for this request.
///
public bool EnableToolCalls { get; set; } = true;
///
/// Gets or sets the collection of tool names to enable. If not specified, all tools are enabled.
///
public IList? EnableToolNames { get; set; }
///
/// Gets or sets whether to fire and forget the agent run request.
///
///
/// If is true, the agent run request will be sent and the method will return immediately.
/// The caller will not wait for the agent to complete the run and will not receive a response. This setting is useful for
/// long-running tasks where the caller does not need to wait for the agent to complete the run.
///
public bool IsFireAndForget { get; set; }
///
public override AgentRunOptions Clone() => new DurableAgentRunOptions(this);
}