Skip to content
Docs Try Aspire
Docs Try

PromptAgentBuilderExtensions

Class static net8.0
📦 Aspire.Hosting.Foundry v13.4.0-preview.1.26281.18
Extension methods for adding Microsoft Foundry prompt agents and tools to the distributed application model.
namespace Aspire.Hosting;
public static class PromptAgentBuilderExtensions
{
// ...
}
AddAISearchTool(IResourceBuilder<AzureCognitiveServicesProjectResource>, string, string?)extensionats export
IResourceBuilder<AzureAISearchToolResource>
Adds an Azure AI Search tool to a Microsoft Foundry project, enabling agents to ground their responses using data from an Azure AI Search index.
AddAzureFunctionTool(IResourceBuilder<AzureCognitiveServicesProjectResource>, string, string, string, BinaryData, string, string, string, string)extensionats ignored
IResourceBuilder<AzureFunctionToolResource>
Adds an Azure Function tool to a Microsoft Foundry project, enabling agents to invoke a serverless Azure Function with queue-based input/output bindings.
AddAzureFunctionTool(IResourceBuilder<AzureCognitiveServicesProjectResource>, string, string, string, string, string, string, string, string)extensionats export
IResourceBuilder<AzureFunctionToolResource>
Adds an Azure Function tool to a Microsoft Foundry project, enabling agents to invoke a serverless Azure Function with queue-based input/output bindings.
AddBingGroundingTool(IResourceBuilder<AzureCognitiveServicesProjectResource>, string)extensionats export
IResourceBuilder<BingGroundingToolResource>
Adds a Bing Grounding tool to a Microsoft Foundry project, enabling agents to ground their responses using Bing Search results.
AddCodeInterpreterTool(IResourceBuilder<AzureCognitiveServicesProjectResource>, string)extensionats export
IResourceBuilder<CodeInterpreterToolResource>
Adds a Code Interpreter tool to a Microsoft Foundry project, enabling agents to write and run Python code in a sandboxed environment for data analysis, math, and chart generation.
AddComputerUseTool(IResourceBuilder<AzureCognitiveServicesProjectResource>, string, int, int, string)extensionats export
IResourceBuilder<ComputerToolResource>
Adds a Computer Use tool to a Microsoft Foundry project, enabling agents to interact with a computer desktop by taking screenshots, moving the mouse, clicking, and typing.
AddFabricTool(IResourceBuilder<AzureCognitiveServicesProjectResource>, string, string[])extensionats export
IResourceBuilder<FabricToolResource>
Adds a Microsoft Fabric data agent tool to a Microsoft Foundry project, enabling agents to query data through Fabric data agents.
AddFileSearchTool(IResourceBuilder<AzureCognitiveServicesProjectResource>, string, string[])extensionats export
IResourceBuilder<FileSearchToolResource>
Adds a File Search tool to a Microsoft Foundry project, enabling agents to search uploaded files and proprietary documents using vector search.
AddFunctionTool(IResourceBuilder<AzureCognitiveServicesProjectResource>, string, string, BinaryData, string?, bool?)extensionats ignored
IResourceBuilder<FunctionToolResource>
Adds a function calling tool to a Microsoft Foundry project, enabling agents to call application-defined functions with structured parameters.
AddImageGenerationTool(IResourceBuilder<AzureCognitiveServicesProjectResource>, string)extensionats export
IResourceBuilder<ImageGenerationToolResource>
Adds an Image Generation tool to a Microsoft Foundry project, enabling agents to generate and edit images.
AddPromptAgent(IResourceBuilder<AzureCognitiveServicesProjectResource>, string, IResourceBuilder<FoundryDeploymentResource>, string?)extensionats export
IResourceBuilder<AzurePromptAgentResource>
Adds a prompt agent to a Microsoft Foundry project with the specified tools.
AddSharePointTool(IResourceBuilder<AzureCognitiveServicesProjectResource>, string, string[])extensionats export
IResourceBuilder<SharePointToolResource>
Adds a SharePoint grounding tool to a Microsoft Foundry project, enabling agents to search data from SharePoint sites configured as Foundry project connections.
AddWebSearchTool(IResourceBuilder<AzureCognitiveServicesProjectResource>, string)extensionats export
IResourceBuilder<WebSearchToolResource>
Adds a Web Search tool to a Microsoft Foundry project, enabling agents to retrieve real-time information from the public web and return answers with inline citations.
WithCustomTool(IResourceBuilder<AzurePromptAgentResource>, IFoundryTool)extensionats ignored
IResourceBuilder<AzurePromptAgentResource>
WithReference(IResourceBuilder<AzureAISearchToolResource>, IResourceBuilder<AzureSearchResource>)extensionats export
IResourceBuilder<AzureAISearchToolResource>
Links an Azure AI Search tool to a backing Azure.AzureSearchResource, creating the necessary Foundry project connection and role assignments.
WithReference(IResourceBuilder<BingGroundingToolResource>, IResourceBuilder<BingGroundingConnectionResource>)extensionats ignored
IResourceBuilder<BingGroundingToolResource>
Links a Bing Grounding tool to a Foundry project connection for the Bing Search service.
WithReference(IResourceBuilder<BingGroundingToolResource>, string)extensionats ignored
IResourceBuilder<BingGroundingToolResource>
Links a Bing Grounding tool to a Bing Search resource by using its Azure resource ID.
WithReference(IResourceBuilder<BingGroundingToolResource>, IResourceBuilder<ParameterResource>)extensionats ignored
IResourceBuilder<BingGroundingToolResource>
Links a Bing Grounding tool to a Bing Search resource by using a parameter that contains its Azure resource ID.
WithTool(IResourceBuilder<AzurePromptAgentResource>, IResourceBuilder<FoundryToolResource>)extensionats export
IResourceBuilder<AzurePromptAgentResource>
Adds a tool to a prompt agent.
View all methods