Watch Aspire live streamsDocsTry Aspire

AzureCognitiveServicesProjectResource

Handle
📦 Aspire.Hosting.Foundry v13.6.4-preview.1.26523.11
interface AzureCognitiveServicesProjectResource
extends IAzureResource,
IComputeEnvironmentResource,
IExpressionValue,
IManifestExpressionProvider,
IResource,
IResourceWithConnectionString,
IResourceWithParameters,
IResourceWithParent,
FoundryResource]],
IValueProvider,
IValueWithReferences,
IAzureComputeEnvironmentResource {
addAISearchTool(
name: string,
indexName?: string): AzureAISearchToolResource;
addAzureFunctionTool(
name: string,
functionName: string,
description: string,
parametersJson: string,
inputQueueEndpoint: string,
inputQueueName: string,
outputQueueEndpoint: string,
outputQueueName: string): AzureFunctionToolResource;
addBingGroundingConnection(
name: string,
bingResourceId: string): BingGroundingConnectionResource;
addBingGroundingConnectionFromParameter(
name: string,
bingResourceId: ParameterResource): BingGroundingConnectionResource;
addBingGroundingTool(name: string): BingGroundingToolResource;
addCapabilityHost(name: string): AzureCognitiveServicesProjectResource;
addCodeInterpreterTool(name: string): CodeInterpreterToolResource;
addComputerUseTool(
name: string,
displayWidth?: number,
displayHeight?: number,
environment?: string): ComputerToolResource;
addConnection(resource: AzureCosmosDBResource | AzureStorageResource | AzureContainerRegistryResource | AzureKeyVaultResource): AzureCognitiveServicesProjectConnectionResource;
addContainerRegistryConnection(registry: AzureContainerRegistryResource): AzureCognitiveServicesProjectConnectionResource;
addCosmosConnection(db: AzureCosmosDBResource): AzureCognitiveServicesProjectConnectionResource;
addFabricTool(
name: string,
projectConnectionIds: string[]): FabricToolResource;
addFileSearchTool(
name: string,
vectorStoreIds: string[]): FileSearchToolResource;
addFunctionTool(
name: string,
functionName: string,
parametersJson: string,
description?: string,
strictModeEnabled?: boolean): FunctionToolResource;
addImageGenerationTool(name: string): ImageGenerationToolResource;
addKeyVaultConnection(keyVault: AzureKeyVaultResource): AzureCognitiveServicesProjectConnectionResource;
addModelDeployment(
name: string,
model: FoundryModel | string,
modelVersion?: string,
format?: string): FoundryDeploymentResource;
addPromptAgent(
name: string,
model: FoundryDeploymentResource,
instructions?: string): AzurePromptAgentResource;
addSearchConnection(search: AzureSearchResource): AzureCognitiveServicesProjectConnectionResource;
addSharePointTool(
name: string,
projectConnectionIds: string[]): SharePointToolResource;
addStorageConnection(storage: AzureStorageResource): AzureCognitiveServicesProjectConnectionResource;
addToolbox(
name: string,
options?: FoundryToolboxOptions): FoundryToolboxResource;
addWebSearchTool(name: string): WebSearchToolResource;
withAppInsights(appInsights: AzureApplicationInsightsResource): AzureCognitiveServicesProjectResource;
withCapabilityHost(resource: AzureCosmosDBResource | AzureStorageResource | AzureSearchResource | FoundryResource): AzureCognitiveServicesProjectResource;
withKeyVault(keyVault: AzureKeyVaultResource): AzureCognitiveServicesProjectResource;
}

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,
indexName?: string): AzureAISearchToolResource
namestringThe name of the tool resource.
indexNamestringoptionalOptional name of the search index to query. If not specified, the agent must be told which index to use.
AzureAISearchToolResource
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
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
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
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
methodaddCapabilityHostbuilder
Adds a capability host to the Microsoft Foundry project.
addCapabilityHost(name: string): AzureCognitiveServicesProjectResource
namestringThe name of the capability host.
AzureCognitiveServicesProjectResource
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
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,
displayWidth?: number,
displayHeight?: number,
environment?: string): ComputerToolResource
namestringThe name of the tool resource.
displayWidthnumberoptional= 1024The width of the display in pixels.
displayHeightnumberoptional= 768The height of the display in pixels.
environmentstringoptional= browserThe environment identifier. Defaults to "browser".
ComputerToolResource
methodaddConnectionbuilder
Adds a connection to a Microsoft Foundry project.
addConnection(resource: AzureCosmosDBResource | AzureStorageResource | AzureContainerRegistryResource | AzureKeyVaultResource): AzureCognitiveServicesProjectConnectionResource
resourceAzureCosmosDBResource | AzureStorageResource | AzureContainerRegistryResource | AzureKeyVaultResource
AzureCognitiveServicesProjectConnectionResource
Adds a container registry connection to the Microsoft Foundry project.
addContainerRegistryConnection(registry: AzureContainerRegistryResource): AzureCognitiveServicesProjectConnectionResource
registryAzureContainerRegistryResource
AzureCognitiveServicesProjectConnectionResource
methodaddCosmosConnectionbuilder
Adds CosmosDB to a project as a connection
addCosmosConnection(db: AzureCosmosDBResource): AzureCognitiveServicesProjectConnectionResource
dbAzureCosmosDBResource
AzureCognitiveServicesProjectConnectionResource
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.
projectConnectionIdsstring[]The Foundry project connection IDs for the Fabric data agents.
FabricToolResource
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.
vectorStoreIdsstring[]Optional vector store IDs to search. If empty, the agent's default stores are used.
FileSearchToolResource
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,
description?: string,
strictModeEnabled?: boolean): FunctionToolResource
namestringThe name of the tool resource.
functionNamestringThe name of the function.
parametersJsonstringThe JSON schema defining the function parameters as a JSON string.
descriptionstringoptionalA description of what the function does.
strictModeEnabledbooleanoptionalWhether to enable strict mode for parameter validation.
FunctionToolResource
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
Adds a Key Vault connection to the Microsoft Foundry project.
addKeyVaultConnection(keyVault: AzureKeyVaultResource): AzureCognitiveServicesProjectConnectionResource
keyVaultAzureKeyVaultResource
AzureCognitiveServicesProjectConnectionResource
methodaddModelDeploymentbuilder
Adds a model deployment to the parent Microsoft Foundry resource.
addModelDeployment(
name: string,
model: FoundryModel | string,
modelVersion?: string,
format?: string): FoundryDeploymentResource
namestring
modelFoundryModel | string
modelVersionstringoptional
formatstringoptional
FoundryDeploymentResource
methodaddPromptAgentbuilder
Adds a prompt agent to a Microsoft Foundry project with the specified tools.
addPromptAgent(
name: string,
model: FoundryDeploymentResource,
instructions?: string): AzurePromptAgentResource
namestringThe name of the prompt agent. This will be the agent name in Foundry.
modelFoundryDeploymentResourceThe model deployment to use for this agent.
instructionsstringoptionalOptional system instructions for the agent.
AzurePromptAgentResource
methodaddSearchConnectionbuilder
Adds an Azure AI Search connection to a Microsoft Foundry project.
addSearchConnection(search: AzureSearchResource): AzureCognitiveServicesProjectConnectionResource
searchAzureSearchResource
AzureCognitiveServicesProjectConnectionResource
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.
projectConnectionIdsstring[]The Foundry project connection IDs for the SharePoint sites.
SharePointToolResource
Adds an Azure Storage account to a project as a connection.
addStorageConnection(storage: AzureStorageResource): AzureCognitiveServicesProjectConnectionResource
storageAzureStorageResource
AzureCognitiveServicesProjectConnectionResource
methodaddToolboxbuilder
Adds a Microsoft Foundry Toolbox endpoint to a Microsoft Foundry project.
addToolbox(
name: string,
options?: FoundryToolboxOptions): FoundryToolboxResource
namestringThe Toolbox name.
optionsFoundryToolboxOptionsoptionalOptional Toolbox settings.
FoundryToolboxResource
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
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
methodwithCapabilityHostbuilder
Associates a supported resource with a capability host on a Microsoft Foundry project.
withCapabilityHost(resource: AzureCosmosDBResource | AzureStorageResource | AzureSearchResource | FoundryResource): AzureCognitiveServicesProjectResource
resourceAzureCosmosDBResource | AzureStorageResource | AzureSearchResource | FoundryResourceThe supported capability host resource.
AzureCognitiveServicesProjectResource
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