AzureAISearchToolResource
Class net8.0
A Foundry tool resource that grounds an agent's responses using data from an Azure AI Search index.
namespace Aspire.Hosting.Foundry;
public class AzureAISearchToolResource : Aspire.Hosting.Foundry.FoundryToolResource{ // ...}Remarks
Section titled Remarks After creating this tool with
PromptAgentBuilderExtensions.AddAISearchTool, link it to an Azure.AzureSearchResource using PromptAgentBuilderExtensions.WithReference. The connection identifier is resolved at deploy time when the agent definition is created. Constructors1
Section titled ConstructorsAzureAISearchToolResource(string, AzureCognitiveServicesProjectResource) Creates a new instance of the
AzureAISearchToolResource class. Properties2
Section titled PropertiesIndexNameget; setstring? Gets or sets the optional search index name to query. If not set, the tool will use a default or prompt-specified index at runtime.
SearchResourcegetAzureSearchResource? Gets or sets the Azure AI Search resource backing this tool. Set by
PromptAgentBuilderExtensions.WithReference.