.NET: Durable extension: initial src and unit tests (#1900)

This commit is contained in:
Chris Gillum
2025-11-05 10:54:29 -08:00
committed by GitHub
parent 1d5677be11
commit 5686a009fb
40 changed files with 2810 additions and 0 deletions
@@ -0,0 +1,36 @@
// Copyright (c) Microsoft. All rights reserved.
using Microsoft.Extensions.AI;
namespace Microsoft.Agents.AI.DurableTask;
/// <summary>
/// Options for running a durable agent.
/// </summary>
public sealed class DurableAgentRunOptions : AgentRunOptions
{
/// <summary>
/// Gets or sets whether to enable tool calls for this request.
/// </summary>
public bool EnableToolCalls { get; set; } = true;
/// <summary>
/// Gets or sets the collection of tool names to enable. If not specified, all tools are enabled.
/// </summary>
public IList<string>? EnableToolNames { get; set; }
/// <summary>
/// Gets or sets the response format for the agent's response.
/// </summary>
public ChatResponseFormat? ResponseFormat { get; set; }
/// <summary>
/// Gets or sets whether to fire and forget the agent run request.
/// </summary>
/// <remarks>
/// If <see cref="IsFireAndForget"/> is <c>true</c>, 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.
/// </remarks>
public bool IsFireAndForget { get; set; }
}