// Copyright (c) Microsoft. All rights reserved.
using A2A;
using Microsoft.Agents.AI;
using Microsoft.Extensions.AI;
namespace AgentWebChat.Web;
///
/// Interface for clients that can interact with agents and provide streaming responses.
///
internal abstract class AgentClientBase
{
///
/// Runs an agent with the specified messages and returns a streaming response.
///
/// The name of the agent to run.
/// The messages to send to the agent.
/// Optional session identifier for conversation continuity.
/// Cancellation token.
/// An asynchronous enumerable of agent response updates.
public abstract IAsyncEnumerable RunStreamingAsync(
string agentName,
IList messages,
string? sessionId = null,
CancellationToken cancellationToken = default);
///
/// Gets the agent card for the specified agent (A2A protocol only).
///
/// The name of the agent.
/// Cancellation token.
/// The agent card if supported, null otherwise.
public virtual Task GetAgentCardAsync(string agentName, CancellationToken cancellationToken = default)
=> Task.FromResult(null);
}