Share via


ResponseAgentProvider Class

Definition

Defines contract used by declarative workflow actions to invoke and manipulate agents and conversations.

public abstract class ResponseAgentProvider
type ResponseAgentProvider = class
Public MustInherit Class ResponseAgentProvider
Inheritance
ResponseAgentProvider
Derived

Remarks

The shape of this provider contract is very much opinionated around patterns that exist in the Open AI Responses API. In addition to direct usage of the Responses API, Foundry V2 agents are supported as they are fundamentally based on the Open AI Responses API. Using other AIAgent or ChatClientAgent patterns that are not based on the Response API is currently not supported.

Constructors

Name Description
ResponseAgentProvider()

Properties

Name Description
AllowConcurrentInvocation

Gets or sets a value indicating whether to allow concurrent invocation of functions.

AllowMultipleToolCalls

Gets or sets a flag to indicate whether a single response is allowed to include multiple tool calls. If false, the IChatClient is asked to return a maximum of one tool call per request. If true, there is no limit. If null, the provider may select its own default.

Functions

Gets or sets a collection of additional tools an agent is able to automatically invoke. If an agent is configured with a function tool that is not available, a RequestPort is executed that provides an ExternalInputRequest that describes the function calls requested. The caller may then respond with a corrsponding ExternalInputResponse that includes the results of the function calls.

Methods

Name Description
ConvertDictionaryToJson(IDictionary<String,Object>)

Utility method to convert a dictionary of input arguments to a JsonNode.

CreateConversationAsync(CancellationToken)

Asynchronously creates a new conversation and returns its unique identifier.

CreateMessageAsync(String, ChatMessage, CancellationToken)

Creates a new message in the specified conversation.

GetMessageAsync(String, String, CancellationToken)

Retrieves a specific message from a conversation.

GetMessagesAsync(String, Nullable<Int32>, String, String, Boolean, CancellationToken)

Retrieves a set of messages from a conversation.

InvokeAgentAsync(String, String, String, IEnumerable<ChatMessage>, IDictionary<String,Object>, CancellationToken)

Asynchronously retrieves an AI agent by its unique identifier.

Applies to