AzureAISearchToolResource
Classnet10.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 Constructors Creates a new instance of the
AzureAISearchToolResource class. Properties2
Section titled PropertiesIndexName get; 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.
AzureSearchResource? Gets or sets the Azure AI Search resource backing this tool. Set by
PromptAgentBuilderExtensions.WithReference . Methods1
Section titled MethodsTask<ResponseTool> Converts this tool definition into the SDK
Responses.ResponseTool representation.