Share via


AgentChannel<TAgent> Class

Definition

Defines the communication protocol for a particular Agent type.

public abstract class AgentChannel<TAgent> : Microsoft.SemanticKernel.Agents.AgentChannel where TAgent : Agent
type AgentChannel<'Agent (requires 'Agent :> Agent)> = class
    inherit AgentChannel
Public MustInherit Class AgentChannel(Of TAgent)
Inherits AgentChannel

Type Parameters

TAgent

The agent type for this channel.

Inheritance
AgentChannel<TAgent>

Remarks

An agent provides it own AgentChannel via CreateChannelAsync(CancellationToken). This class is a convenience upcast to an agent for InvokeAsync(TAgent, CancellationToken).

Constructors

AgentChannel<TAgent>()

Properties

Logger

Gets or sets the ILogger associated with the AgentChannel.

(Inherited from AgentChannel)

Methods

GetHistoryAsync(CancellationToken)

Retrieve the message history specific to this channel.

(Inherited from AgentChannel)
InvokeAsync(Agent, CancellationToken)

Perform a discrete incremental interaction between a single Agent and AgentChat.

InvokeAsync(TAgent, CancellationToken)

Process a discrete incremental interaction between a single Agent and a AgentChat.

InvokeStreamingAsync(Agent, IList<ChatMessageContent>, CancellationToken)

Perform a discrete incremental interaction between a single Agent and AgentChat with streaming results.

InvokeStreamingAsync(TAgent, IList<ChatMessageContent>, CancellationToken)

Process a discrete incremental interaction between a single Agent and a AgentChat.

ReceiveAsync(IEnumerable<ChatMessageContent>, CancellationToken)

Receive the conversation messages. Used when joining a conversation and also during each agent interaction.

(Inherited from AgentChannel)
ResetAsync(CancellationToken)

Reset any persistent state associated with the channel.

(Inherited from AgentChannel)
Serialize()

Responsible for providing the serialized representation of the channel.

(Inherited from AgentChannel)

Applies to