Share via


AgentChannel<TAgent> Class

Definition

Defines the communication protocol for a particular Agent type. An agent provides it own AgentChannel via CreateChannelAsync(CancellationToken).

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

Convenience upcast to agent for InvokeAsync(TAgent, CancellationToken).

Constructors

AgentChannel<TAgent>()

Properties

Logger

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 an 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 an 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)

Applies to