AzureAgentProvider Class
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.
Provides functionality to interact with Foundry agents within a specified project context.
public sealed class AzureAgentProvider : Microsoft.Agents.AI.Workflows.Declarative.ResponseAgentProvider
type AzureAgentProvider = class
inherit ResponseAgentProvider
Public NotInheritable Class AzureAgentProvider
Inherits ResponseAgentProvider
- Inheritance
Remarks
This class is used to retrieve and manage AI agents associated with a Foundry project. It requires a project endpoint and credentials to authenticate requests.
Constructors
| Name | Description |
|---|---|
| AzureAgentProvider(Uri, TokenCredential) |
Provides functionality to interact with Foundry agents within a specified project context. |
Properties
| Name | Description |
|---|---|
| AIProjectClientOptions |
Optional options used when creating the AIProjectClient. |
| AllowConcurrentInvocation |
Gets or sets a value indicating whether to allow concurrent invocation of functions. (Inherited from ResponseAgentProvider) |
| AllowMultipleToolCalls |
Gets or sets a flag to indicate whether a single response is allowed to include multiple tool calls.
If |
| 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. (Inherited from ResponseAgentProvider) |
| HttpClient |
An optional HttpClient instance to be used for making HTTP requests. If not provided, a default client will be used. |
| OpenAIClientOptions |
Optional options used when invoking the AIAgent. |
Methods
| Name | Description |
|---|---|
| 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. |