# Aspire.Hosting.Foundry

- Module: `Aspire.Hosting.Foundry`
- Version: `13.4.0-preview.1.26281.18`
- Source: [GitHub](https://github.com/microsoft/aspire)
- Functions: `35`
- Types: `23`

## Types

- [AzureAISearchToolResource](/reference/api/typescript/aspire.hosting.foundry/azureaisearchtoolresource.md) -- `handle` - 1 members -- A Foundry tool resource that grounds an agent's responses using data from an Azure AI Search index.
- [AzureCognitiveServicesProjectConnectionResource](/reference/api/typescript/aspire.hosting.foundry/azurecognitiveservicesprojectconnectionresource.md) -- `handle` - 0 members
- [AzureCognitiveServicesProjectResource](/reference/api/typescript/aspire.hosting.foundry/azurecognitiveservicesprojectresource.md) -- `handle` - 25 members
- [AzureFunctionToolResource](/reference/api/typescript/aspire.hosting.foundry/azurefunctiontoolresource.md) -- `handle` - 0 members -- A Foundry tool resource that enables an agent to invoke an Azure Function.
- [AzurePromptAgentResource](/reference/api/typescript/aspire.hosting.foundry/azurepromptagentresource.md) -- `handle` - 9 members -- Represents a Microsoft Foundry prompt agent resource that is provisioned on Azure.
- [BingGroundingConnectionResource](/reference/api/typescript/aspire.hosting.foundry/binggroundingconnectionresource.md) -- `handle` - 0 members -- A Foundry project connection resource specifically for Grounding with Bing Search connections.
- [BingGroundingToolResource](/reference/api/typescript/aspire.hosting.foundry/binggroundingtoolresource.md) -- `handle` - 1 members -- A Foundry tool resource that grounds an agent's responses using Bing Search.
- [CodeInterpreterToolResource](/reference/api/typescript/aspire.hosting.foundry/codeinterpretertoolresource.md) -- `handle` - 0 members -- A Foundry tool resource that enables an agent to write and run Python code in a sandboxed environment for data analysis, math, and chart generation.
- [ComputerToolResource](/reference/api/typescript/aspire.hosting.foundry/computertoolresource.md) -- `handle` - 0 members -- A Foundry tool resource that enables an agent to interact with a computer desktop by taking screenshots, moving the mouse, clicking, and typing.
- [FabricToolResource](/reference/api/typescript/aspire.hosting.foundry/fabrictoolresource.md) -- `handle` - 0 members -- A Foundry tool resource that enables an agent to query data using a Microsoft Fabric data agent.
- [FileSearchToolResource](/reference/api/typescript/aspire.hosting.foundry/filesearchtoolresource.md) -- `handle` - 0 members -- A Foundry tool resource that enables an agent to search uploaded files and proprietary documents using vector search.
- [FoundryDeploymentResource](/reference/api/typescript/aspire.hosting.foundry/foundrydeploymentresource.md) -- `handle` - 16 members -- Represents a Microsoft Foundry Deployment.
- [FoundryModel](/reference/api/typescript/aspire.hosting.foundry/foundrymodel.md) -- `type` - 3 fields -- Describes a model that can be deployed to Microsoft Foundry.
- [FoundryResource](/reference/api/typescript/aspire.hosting.foundry/foundryresource.md) -- `handle` - 3 members -- Represents a Microsoft Foundry resource. This corresponds to the Azure Cognitive Services account with Microsoft Foundry capabilities enabled.
- [FoundryToolResource](/reference/api/typescript/aspire.hosting.foundry/foundrytoolresource.md) -- `handle` - 0 members -- Base class for Foundry tool resources that participate in the Aspire application model.
- [FunctionToolResource](/reference/api/typescript/aspire.hosting.foundry/functiontoolresource.md) -- `handle` - 0 members -- A Foundry tool resource that enables an agent to call a user-defined function.
- [HostedAgentConfiguration](/reference/api/typescript/aspire.hosting.foundry/hostedagentconfiguration.md) -- `handle` - 8 members -- A configuration helper for hosted agents.
- [HostedAgentOptions](/reference/api/typescript/aspire.hosting.foundry/hostedagentoptions.md) -- `type` - 6 fields -- Options that control how a compute resource is deployed as a Microsoft Foundry hosted agent. All properties are optional; unset properties fall back to the Foundry hosted agent defaults.
- [HostedAgentProtocolVersion](/reference/api/typescript/aspire.hosting.foundry/hostedagentprotocolversion.md) -- `type` - 2 fields -- A protocol and version supported by a Microsoft Foundry hosted agent container.
- [ImageGenerationToolResource](/reference/api/typescript/aspire.hosting.foundry/imagegenerationtoolresource.md) -- `handle` - 0 members -- A Foundry tool resource that enables an agent to generate and edit images.
- [SharePointToolResource](/reference/api/typescript/aspire.hosting.foundry/sharepointtoolresource.md) -- `handle` - 0 members -- A Foundry tool resource that grounds an agent's responses using SharePoint data.
- [WebSearchToolResource](/reference/api/typescript/aspire.hosting.foundry/websearchtoolresource.md) -- `handle` - 0 members -- A Foundry tool resource that retrieves real-time information from the public web and returns answers with inline citations.

## Functions

- [addAISearchTool](/reference/api/typescript/aspire.hosting.foundry/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.
- [addAzureFunctionTool](/reference/api/typescript/aspire.hosting.foundry/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.
- [addBingGroundingConnection](/reference/api/typescript/aspire.hosting.foundry/addbinggroundingconnection.md) -- `method` -- Adds a Grounding with Bing Search connection to a Microsoft Foundry project.
- [addBingGroundingConnectionFromParameter](/reference/api/typescript/aspire.hosting.foundry/addbinggroundingconnectionfromparameter.md) -- `method` -- Adds a Grounding with Bing Search connection to a Microsoft Foundry project using a parameter resource for the Bing resource ID.
- [addBingGroundingTool](/reference/api/typescript/aspire.hosting.foundry/addbinggroundingtool.md) -- `method` -- Adds a Bing Grounding tool to a Microsoft Foundry project, enabling agents to ground their responses using Bing Search results.
- [addCapabilityHost](/reference/api/typescript/aspire.hosting.foundry/addcapabilityhost.md) -- `method` -- Adds a capability host to the Microsoft Foundry project.
- [addCodeInterpreterTool](/reference/api/typescript/aspire.hosting.foundry/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.
- [addComputerUseTool](/reference/api/typescript/aspire.hosting.foundry/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.
- [addConnection](/reference/api/typescript/aspire.hosting.foundry/addconnection.md) -- `method` -- Adds a connection to a Microsoft Foundry project.
- [addContainerRegistryConnection](/reference/api/typescript/aspire.hosting.foundry/addcontainerregistryconnection.md) -- `method` -- Adds a container registry connection to the Microsoft Foundry project.
- [addCosmosConnection](/reference/api/typescript/aspire.hosting.foundry/addcosmosconnection.md) -- `method` -- Adds CosmosDB to a project as a connection
- [addDeployment](/reference/api/typescript/aspire.hosting.foundry/adddeployment.md) -- `method` -- Adds a Microsoft Foundry deployment resource to a Microsoft Foundry resource.
- [addFabricTool](/reference/api/typescript/aspire.hosting.foundry/addfabrictool.md) -- `method` -- Adds a Microsoft Fabric data agent tool to a Microsoft Foundry project, enabling agents to query data through Fabric data agents.
- [addFileSearchTool](/reference/api/typescript/aspire.hosting.foundry/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.
- [addFoundry](/reference/api/typescript/aspire.hosting.foundry/addfoundry.md) -- `method` -- Adds a Microsoft Foundry resource to the application model.
- [addFunctionTool](/reference/api/typescript/aspire.hosting.foundry/addfunctiontool.md) -- `method` -- Adds a function calling tool to a Microsoft Foundry project, enabling agents to call application-defined functions with structured parameters.
- [addImageGenerationTool](/reference/api/typescript/aspire.hosting.foundry/addimagegenerationtool.md) -- `method` -- Adds an Image Generation tool to a Microsoft Foundry project, enabling agents to generate and edit images.
- [addKeyVaultConnection](/reference/api/typescript/aspire.hosting.foundry/addkeyvaultconnection.md) -- `method` -- Adds a Key Vault connection to the Microsoft Foundry project.
- [addModelDeployment](/reference/api/typescript/aspire.hosting.foundry/addmodeldeployment.md) -- `method` -- Adds a model deployment to the parent Microsoft Foundry resource.
- [addProject](/reference/api/typescript/aspire.hosting.foundry/addproject.md) -- `method` -- Adds a Microsoft Foundry project resource to the application model. This will also attach the project as a deployment target for agents.
- [addPromptAgent](/reference/api/typescript/aspire.hosting.foundry/addpromptagent.md) -- `method` -- Adds a prompt agent to a Microsoft Foundry project with the specified tools.
- [addSearchConnection](/reference/api/typescript/aspire.hosting.foundry/addsearchconnection.md) -- `method` -- Adds an Azure AI Search connection to a Microsoft Foundry project.
- [addSharePointTool](/reference/api/typescript/aspire.hosting.foundry/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.
- [addStorageConnection](/reference/api/typescript/aspire.hosting.foundry/addstorageconnection.md) -- `method` -- Adds an Azure Storage account to a project as a connection.
- [addWebSearchTool](/reference/api/typescript/aspire.hosting.foundry/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.
- [asHostedAgent](/reference/api/typescript/aspire.hosting.foundry/ashostedagent.md) -- `method` -- Configures the resource to run and publish as a hosted agent in Microsoft Foundry, targeting the specified Foundry project.
- [runAsFoundryLocal](/reference/api/typescript/aspire.hosting.foundry/runasfoundrylocal.md) -- `method` -- Adds a Foundry Local resource to the distributed application builder.
- [withAppInsights](/reference/api/typescript/aspire.hosting.foundry/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).
- [withCapabilityHost](/reference/api/typescript/aspire.hosting.foundry/withcapabilityhost.md) -- `method` -- Associates a supported resource with a capability host on a Microsoft Foundry project.
- [withFoundryRoleAssignments](/reference/api/typescript/aspire.hosting.foundry/withfoundryroleassignments.md) -- `method` -- Assigns the specified roles to the given resource, granting it the necessary permissions on the target Microsoft Foundry resource. This replaces the default role assignments for the resource.
- [withKeyVault](/reference/api/typescript/aspire.hosting.foundry/withkeyvault.md) -- `method` -- Adds a Key Vault connection to the Microsoft Foundry project.
- [withProperties](/reference/api/typescript/aspire.hosting.foundry/withproperties.md) -- `method` -- Allows setting the properties of a Microsoft Foundry Deployment resource.
- [withReference](/reference/api/typescript/aspire.hosting.foundry/withreference.md) -- `method` -- Links an Azure AI Search tool to a backing search resource.
- [withReference](/reference/api/typescript/aspire.hosting.foundry/withreference.md) -- `method` -- Links a Bing Grounding tool to a Bing Search resource or connection.
- [withTool](/reference/api/typescript/aspire.hosting.foundry/withtool.md) -- `method` -- Adds a tool to a prompt agent.

## Enums

- [FoundryRole](/reference/api/typescript/aspire.hosting.foundry/foundryrole.md) -- `enum` - 3 values -- Represents ATS-compatible Microsoft Foundry roles.
