AgentRunContext Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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.