Files
agent-framework/dotnet/src/Microsoft.Agents.AI.DurableTask/IAgentResponseHandler.cs
SergeyMenshykh c70e594e6c .NET: [Breaking] RenameAgentRunResponse and AgentRunResponseUpdate classes (#3197)
* rename AgentRunResponse and AgentRunResponseUpdate classes - part1

* rename varialbles, parameters, methods and tests

* rollback unnecessary changes
2026-01-14 10:27:41 +00:00

36 lines
1.2 KiB
C#

// Copyright (c) Microsoft. All rights reserved.
namespace Microsoft.Agents.AI.DurableTask;
/// <summary>
/// Handler for processing responses from the agent. This is typically used to send messages to the user.
/// </summary>
public interface IAgentResponseHandler
{
/// <summary>
/// Handles a streaming response update from the agent. This is typically used to send messages to the user.
/// </summary>
/// <param name="messageStream">
/// The stream of messages from the agent.
/// </param>
/// <param name="cancellationToken">
/// Signals that the operation should be cancelled.
/// </param>
ValueTask OnStreamingResponseUpdateAsync(
IAsyncEnumerable<AgentResponseUpdate> messageStream,
CancellationToken cancellationToken);
/// <summary>
/// Handles a discrete response from the agent. This is typically used to send messages to the user.
/// </summary>
/// <param name="message">
/// The message from the agent.
/// </param>
/// <param name="cancellationToken">
/// Signals that the operation should be cancelled.
/// </param>
ValueTask OnAgentResponseAsync(
AgentResponse message,
CancellationToken cancellationToken);
}