Skip to main content
All docs
V26.1
  • AgentExtensions.AsIChatResponseProvider(AIAgent, AgentSession, AgentRunOptions) Method

    Converts an AIAgent instance into an IChatResponseProvider.

    Namespace: DevExpress.AIIntegration.Agents

    Assembly: DevExpress.AIIntegration.Agents.v26.1.dll

    NuGet Package: DevExpress.AIIntegration.Agents

    Declaration

    public static IChatResponseProvider AsIChatResponseProvider(
        this AIAgent aiAgent,
        AgentSession agentSession = null,
        AgentRunOptions agentRunOptions = null
    )

    Parameters

    Name Type Description
    aiAgent Microsoft.Agents.AI.AIAgent

    The AI agent that processes chat requests.

    Optional Parameters

    Name Type Default Description
    agentSession Microsoft.Agents.AI.AgentSession null

    The agent session that stores conversation history. If specified, the provider sends only new messages to the agent.

    agentRunOptions Microsoft.Agents.AI.AgentRunOptions null

    Optional settings applied to each agent run. If null, the agent uses its default settings.

    Returns

    Type Description
    IChatResponseProvider

    An IChatResponseProvider service that sends chat requests to the specified AIAgent.

    See Also