Share via


AgentRunContext Constructor

Definition

Initializes a new instance of the AgentRunContext class.

public AgentRunContext(Microsoft.Agents.AI.AIAgent agent, Microsoft.Agents.AI.AgentSession? session, System.Collections.Generic.IReadOnlyCollection<Microsoft.Extensions.AI.ChatMessage> requestMessages, Microsoft.Agents.AI.AgentRunOptions? agentRunOptions);
new Microsoft.Agents.AI.AgentRunContext : Microsoft.Agents.AI.AIAgent * Microsoft.Agents.AI.AgentSession * System.Collections.Generic.IReadOnlyCollection<Microsoft.Extensions.AI.ChatMessage> * Microsoft.Agents.AI.AgentRunOptions -> Microsoft.Agents.AI.AgentRunContext
Public Sub New (agent As AIAgent, session As AgentSession, requestMessages As IReadOnlyCollection(Of ChatMessage), agentRunOptions As AgentRunOptions)

Parameters

agent
AIAgent

The AIAgent that is executing the current run.

session
AgentSession

The AgentSession that is associated with the current run if any.

requestMessages
IReadOnlyCollection<ChatMessage>

The request messages passed into the current run.

agentRunOptions
AgentRunOptions

The AgentRunOptions that was passed to the current run.

Applies to