# AzureCognitiveServicesProjectResource

- Module: [Aspire.Hosting.Foundry](/reference/api/go/aspire.hosting.foundry.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

## Definition

```go
type AzureCognitiveServicesProjectResource interface {
    ComputeEnvironmentResource
    ExpressionValue
    Resource
    ResourceWithConnectionString
    ResourceWithParent
}
```

## Embeds

- `ComputeEnvironmentResource`
- `ExpressionValue`
- `Resource`
- `ResourceWithConnectionString`
- `ResourceWithParent`

## Methods

- [AddAISearchTool](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addaisearchtool.md) -- `method` -- 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.
  ```go
  AddAISearchTool(name string, options ...*AddAISearchToolOptions) AzureAISearchToolResource
  ```
- [AddAzureFunctionTool](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addazurefunctiontool.md) -- `method` -- Adds an Azure Function tool to a Microsoft Foundry project, enabling agents to invoke a serverless Azure Function with queue-based input/output bindings.
  ```go
  AddAzureFunctionTool(name string, functionName string, description string, parametersJson string, inputQueueEndpoint string, inputQueueName string, outputQueueEndpoint string, outputQueueName string) AzureFunctionToolResource
  ```
- [AddBingGroundingConnection](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addbinggroundingconnection.md) -- `method` -- Adds a Grounding with Bing Search connection to a Microsoft Foundry project.
  ```go
  AddBingGroundingConnection(name string, bingResourceId string) BingGroundingConnectionResource
  ```
- [AddBingGroundingConnectionFromParameter](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addbinggroundingconnectionfromparameter.md) -- `method` -- Adds a Grounding with Bing Search connection to a Microsoft Foundry project using a parameter resource for the Bing resource ID.
  ```go
  AddBingGroundingConnectionFromParameter(name string, bingResourceId ParameterResource) BingGroundingConnectionResource
  ```
- [AddBingGroundingTool](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addbinggroundingtool.md) -- `method` -- Adds a Bing Grounding tool to a Microsoft Foundry project, enabling agents to ground their responses using Bing Search results.
  ```go
  AddBingGroundingTool(name string) BingGroundingToolResource
  ```
- [AddCapabilityHost](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addcapabilityhost.md) -- `method` -- Adds a capability host to the Microsoft Foundry project.
  ```go
  AddCapabilityHost(name string) AzureCognitiveServicesProjectResource
  ```
- [AddCodeInterpreterTool](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addcodeinterpretertool.md) -- `method` -- 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.
  ```go
  AddCodeInterpreterTool(name string) CodeInterpreterToolResource
  ```
- [AddComputerUseTool](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addcomputerusetool.md) -- `method` -- 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.
  ```go
  AddComputerUseTool(name string, options ...*AddComputerUseToolOptions) ComputerToolResource
  ```
- [AddConnection](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addconnection.md) -- `method` -- Adds a connection to a Microsoft Foundry project.
  ```go
  AddConnection(resource any) AzureCognitiveServicesProjectConnectionResource
  ```
- [AddContainerRegistryConnection](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addcontainerregistryconnection.md) -- `method` -- Adds a container registry connection to the Microsoft Foundry project.
  ```go
  AddContainerRegistryConnection(registry AzureContainerRegistryResource) AzureCognitiveServicesProjectConnectionResource
  ```
- [AddCosmosConnection](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addcosmosconnection.md) -- `method` -- Adds CosmosDB to a project as a connection
  ```go
  AddCosmosConnection(db AzureCosmosDBResource) AzureCognitiveServicesProjectConnectionResource
  ```
- [AddFabricTool](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addfabrictool.md) -- `method` -- Adds a Microsoft Fabric data agent tool to a Microsoft Foundry project, enabling agents to query data through Fabric data agents.
  ```go
  AddFabricTool(name string, projectConnectionIds []string) FabricToolResource
  ```
- [AddFileSearchTool](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addfilesearchtool.md) -- `method` -- Adds a File Search tool to a Microsoft Foundry project, enabling agents to search uploaded files and proprietary documents using vector search.
  ```go
  AddFileSearchTool(name string, vectorStoreIds []string) FileSearchToolResource
  ```
- [AddFunctionTool](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addfunctiontool.md) -- `method` -- Adds a function calling tool to a Microsoft Foundry project, enabling agents to call application-defined functions with structured parameters.
  ```go
  AddFunctionTool(name string, functionName string, parametersJson string, options ...*AddFunctionToolOptions) FunctionToolResource
  ```
- [AddImageGenerationTool](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addimagegenerationtool.md) -- `method` -- Adds an Image Generation tool to a Microsoft Foundry project, enabling agents to generate and edit images.
  ```go
  AddImageGenerationTool(name string) ImageGenerationToolResource
  ```
- [AddKeyVaultConnection](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addkeyvaultconnection.md) -- `method` -- Adds a Key Vault connection to the Microsoft Foundry project.
  ```go
  AddKeyVaultConnection(keyVault AzureKeyVaultResource) AzureCognitiveServicesProjectConnectionResource
  ```
- [AddModelDeployment](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addmodeldeployment.md) -- `method` -- Adds a model deployment to the parent Microsoft Foundry resource.
  ```go
  AddModelDeployment(name string, model any, options ...*AddModelDeploymentOptions) FoundryDeploymentResource
  ```
- [AddPromptAgent](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addpromptagent.md) -- `method` -- Adds a prompt agent to a Microsoft Foundry project with the specified tools.
  ```go
  AddPromptAgent(name string, model FoundryDeploymentResource, options ...*AddPromptAgentOptions) AzurePromptAgentResource
  ```
- [AddSearchConnection](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addsearchconnection.md) -- `method` -- Adds an Azure AI Search connection to a Microsoft Foundry project.
  ```go
  AddSearchConnection(search AzureSearchResource) AzureCognitiveServicesProjectConnectionResource
  ```
- [AddSharePointTool](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addsharepointtool.md) -- `method` -- Adds a SharePoint grounding tool to a Microsoft Foundry project, enabling agents to search data from SharePoint sites configured as Foundry project connections.
  ```go
  AddSharePointTool(name string, projectConnectionIds []string) SharePointToolResource
  ```
- [AddStorageConnection](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addstorageconnection.md) -- `method` -- Adds an Azure Storage account to a project as a connection.
  ```go
  AddStorageConnection(storage AzureStorageResource) AzureCognitiveServicesProjectConnectionResource
  ```
- [AddToolbox](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addtoolbox.md) -- `method` -- Adds a Microsoft Foundry Toolbox endpoint to a Microsoft Foundry project.
  ```go
  AddToolbox(name string, options ...*FoundryToolboxOptions) FoundryToolboxResource
  ```
- [AddWebSearchTool](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/addwebsearchtool.md) -- `method` -- 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.
  ```go
  AddWebSearchTool(name string) WebSearchToolResource
  ```
- [WithAppInsights](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/withappinsights.md) -- `method` -- Adds an Application Insights resource to the Microsoft Foundry project, overriding the default (which is to create a new Application Insights resource).
  ```go
  WithAppInsights(appInsights AzureApplicationInsightsResource) AzureCognitiveServicesProjectResource
  ```
- [WithCapabilityHost](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/withcapabilityhost.md) -- `method` -- Associates a supported resource with a capability host on a Microsoft Foundry project.
  ```go
  WithCapabilityHost(resource any) AzureCognitiveServicesProjectResource
  ```
- [WithKeyVault](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource/withkeyvault.md) -- `method` -- Adds a Key Vault connection to the Microsoft Foundry project.
  ```go
  WithKeyVault(keyVault AzureKeyVaultResource) AzureCognitiveServicesProjectResource
  ```
