Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AzureCognitiveServicesProjectResource

Handle
📦 Aspire.Hosting.Foundry v17.0.0-preview.1.26565.2
type AzureCognitiveServicesProjectResource interface {
ComputeEnvironmentResource
ExpressionValue
Resource
ResourceWithConnectionString
ResourceWithParent
}

Methods

methodAddAISearchToolbuilder
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.
AddAISearchTool(
name string,
options ...*AddAISearchToolOptions,
) AzureAISearchToolResource
namestringThe name of the tool resource.
options...*AddAISearchToolOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddAISearchToolOptions argument.

IndexName*stringOptional name of the search index to query. If not specified, the agent must be told which index to use.
AzureAISearchToolResource

The resource builder.

Returns a handle; failures surface later via Err().

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(
name string,
functionName string,
description string,
parametersJson string,
inputQueueEndpoint string,
inputQueueName string,
outputQueueEndpoint string,
outputQueueName string,
) AzureFunctionToolResource
namestringThe name of the tool resource.
functionNamestringThe name of the Azure Function.
descriptionstringA description of what the function does.
parametersJsonstringThe JSON schema defining the function parameters as a JSON string.
inputQueueEndpointstringThe Azure Storage Queue endpoint for input binding.
inputQueueNamestringThe queue name for input binding.
outputQueueEndpointstringThe Azure Storage Queue endpoint for output binding.
outputQueueNamestringThe queue name for output binding.
AzureFunctionToolResource

The resource builder.

Returns a handle; failures surface later via Err().

Adds a Grounding with Bing Search connection to a Microsoft Foundry project.
AddBingGroundingConnection(
name string,
bingResourceId string,
) BingGroundingConnectionResource
namestringThe name of the connection resource.
bingResourceIdstringThe full Azure resource ID of the Bing Search resource (e.g., /subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.Bing/accounts/{name}).
BingGroundingConnectionResource

The resource builder.

Returns a handle; failures surface later via Err().

Adds a Grounding with Bing Search connection to a Microsoft Foundry project using a parameter resource for the Bing resource ID.
AddBingGroundingConnectionFromParameter(
name string,
bingResourceId ParameterResource,
) BingGroundingConnectionResource
namestringThe name of the connection resource.
bingResourceIdParameterResourceA parameter resource containing the full Azure resource ID of the Bing Search resource.
BingGroundingConnectionResource

The resource builder.

Returns a handle; failures surface later via Err().

Adds a Bing Grounding tool to a Microsoft Foundry project, enabling agents to ground their responses using Bing Search results.
AddBingGroundingTool(name string) BingGroundingToolResource
namestringThe name of the tool resource.
BingGroundingToolResource

The resource builder.

Returns a handle; failures surface later via Err().

methodAddCapabilityHostbuilder
Adds a capability host to the Microsoft Foundry project.
AddCapabilityHost(name string) AzureCognitiveServicesProjectResource
namestringThe name of the capability host.
AzureCognitiveServicesProjectResource

A reference to the project builder for chaining capability host configuration.

Returns a handle; failures surface later via Err().

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.
AddCodeInterpreterTool(name string) CodeInterpreterToolResource
namestringThe name of the tool resource.
CodeInterpreterToolResource

The resource builder.

Returns a handle; failures surface later via Err().

methodAddComputerUseToolbuilder
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.
AddComputerUseTool(
name string,
options ...*AddComputerUseToolOptions,
) ComputerToolResource
namestringThe name of the tool resource.
options...*AddComputerUseToolOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddComputerUseToolOptions argument.

DisplayWidth*float64The width of the display in pixels.
DisplayHeight*float64The height of the display in pixels.
Environment*stringThe environment identifier. Defaults to "browser".
ComputerToolResource

The resource builder.

Returns a handle; failures surface later via Err().

methodAddConnectionbuilder
Adds a connection to a Microsoft Foundry project.
AddConnection(resource any) AzureCognitiveServicesProjectConnectionResource
resourceany
AzureCognitiveServicesProjectConnectionResource

Returns a handle; failures surface later via Err().

Adds a container registry connection to the Microsoft Foundry project.
AddContainerRegistryConnection(registry AzureContainerRegistryResource) AzureCognitiveServicesProjectConnectionResource
registryAzureContainerRegistryResource
AzureCognitiveServicesProjectConnectionResource

Returns a handle; failures surface later via Err().

methodAddCosmosConnectionbuilder
Adds CosmosDB to a project as a connection
AddCosmosConnection(db AzureCosmosDBResource) AzureCognitiveServicesProjectConnectionResource
dbAzureCosmosDBResource
AzureCognitiveServicesProjectConnectionResource

Returns a handle; failures surface later via Err().

methodAddFabricToolbuilder
Adds a Microsoft Fabric data agent tool to a Microsoft Foundry project, enabling agents to query data through Fabric data agents.
AddFabricTool(
name string,
projectConnectionIds []string,
) FabricToolResource
namestringThe name of the tool resource.
projectConnectionIds[]stringThe Foundry project connection IDs for the Fabric data agents.
FabricToolResource

The resource builder.

Returns a handle; failures surface later via Err().

methodAddFileSearchToolbuilder
Adds a File Search tool to a Microsoft Foundry project, enabling agents to search uploaded files and proprietary documents using vector search.
AddFileSearchTool(
name string,
vectorStoreIds []string,
) FileSearchToolResource
namestringThe name of the tool resource.
vectorStoreIds[]stringOptional vector store IDs to search. If empty, the agent's default stores are used.
FileSearchToolResource

The resource builder.

Returns a handle; failures surface later via Err().

methodAddFunctionToolbuilder
Adds a function calling tool to a Microsoft Foundry project, enabling agents to call application-defined functions with structured parameters.
AddFunctionTool(
name string,
functionName string,
parametersJson string,
options ...*AddFunctionToolOptions,
) FunctionToolResource
namestringThe name of the tool resource.
functionNamestringThe name of the function.
parametersJsonstringThe JSON schema defining the function parameters as a JSON string.
options...*AddFunctionToolOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddFunctionToolOptions argument.

Description*stringA description of what the function does.
StrictModeEnabled*boolWhether to enable strict mode for parameter validation.
FunctionToolResource

The resource builder.

Returns a handle; failures surface later via Err().

Adds an Image Generation tool to a Microsoft Foundry project, enabling agents to generate and edit images.
AddImageGenerationTool(name string) ImageGenerationToolResource
namestringThe name of the tool resource.
ImageGenerationToolResource

The resource builder.

Returns a handle; failures surface later via Err().

Adds a Key Vault connection to the Microsoft Foundry project.
AddKeyVaultConnection(keyVault AzureKeyVaultResource) AzureCognitiveServicesProjectConnectionResource
keyVaultAzureKeyVaultResource
AzureCognitiveServicesProjectConnectionResource

Returns a handle; failures surface later via Err().

methodAddModelDeploymentbuilder
Adds a model deployment to the parent Microsoft Foundry resource.
AddModelDeployment(
name string,
model any,
options ...*AddModelDeploymentOptions,
) FoundryDeploymentResource
namestring
modelany
options...*AddModelDeploymentOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddModelDeploymentOptions argument.

ModelVersion*string
Format*string
FoundryDeploymentResource

Returns a handle; failures surface later via Err().

methodAddPromptAgentbuilder
Adds a prompt agent to a Microsoft Foundry project with the specified tools.
AddPromptAgent(
name string,
model FoundryDeploymentResource,
options ...*AddPromptAgentOptions,
) AzurePromptAgentResource
namestringThe name of the prompt agent. This will be the agent name in Foundry.
modelFoundryDeploymentResourceThe model deployment to use for this agent.
options...*AddPromptAgentOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddPromptAgentOptions argument.

Instructions*stringOptional system instructions for the agent.
AzurePromptAgentResource

The resource builder.

Returns a handle; failures surface later via Err().

methodAddSearchConnectionbuilder
Adds an Azure AI Search connection to a Microsoft Foundry project.
AddSearchConnection(search AzureSearchResource) AzureCognitiveServicesProjectConnectionResource
searchAzureSearchResource
AzureCognitiveServicesProjectConnectionResource

Returns a handle; failures surface later via Err().

methodAddSharePointToolbuilder
Adds a SharePoint grounding tool to a Microsoft Foundry project, enabling agents to search data from SharePoint sites configured as Foundry project connections.
AddSharePointTool(
name string,
projectConnectionIds []string,
) SharePointToolResource
namestringThe name of the tool resource.
projectConnectionIds[]stringThe Foundry project connection IDs for the SharePoint sites.
SharePointToolResource

The resource builder.

Returns a handle; failures surface later via Err().

Adds an Azure Storage account to a project as a connection.
AddStorageConnection(storage AzureStorageResource) AzureCognitiveServicesProjectConnectionResource
storageAzureStorageResource
AzureCognitiveServicesProjectConnectionResource

Returns a handle; failures surface later via Err().

methodAddToolboxbuilder
Adds a Microsoft Foundry Toolbox endpoint to a Microsoft Foundry project.
AddToolbox(
name string,
options ...*FoundryToolboxOptions,
) FoundryToolboxResource
namestringThe Toolbox name.
options...*FoundryToolboxOptionsOptional settings, described under Options.

Optional parameters are passed as the existing *FoundryToolboxOptions struct.

FoundryToolboxResource

The resource builder.

Returns a handle; failures surface later via Err().

methodAddWebSearchToolbuilder
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.
AddWebSearchTool(name string) WebSearchToolResource
namestringThe name of the tool resource.
WebSearchToolResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithAppInsightsbuilder
Adds an Application Insights resource to the Microsoft Foundry project, overriding the default (which is to create a new Application Insights resource).
WithAppInsights(appInsights AzureApplicationInsightsResource) AzureCognitiveServicesProjectResource
appInsightsAzureApplicationInsightsResourceThe Application Insights resource to associate with the project.
AzureCognitiveServicesProjectResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithCapabilityHostbuilder
Associates a supported resource with a capability host on a Microsoft Foundry project.
WithCapabilityHost(resource any) AzureCognitiveServicesProjectResource
resourceanyThe supported capability host resource.
AzureCognitiveServicesProjectResource

A reference to the project builder for chaining capability host configuration.

Returns a handle; failures surface later via Err().

methodWithKeyVaultbuilder
Adds a Key Vault connection to the Microsoft Foundry project.
WithKeyVault(keyVault AzureKeyVaultResource) AzureCognitiveServicesProjectResource
keyVaultAzureKeyVaultResourceThe Key Vault resource to associate with the project.
AzureCognitiveServicesProjectResource

The resource builder.

Returns a handle; failures surface later via Err().