> For the complete documentation index, see [llms.txt](https://docs.groundcover.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.groundcover.com/collect-data/byoc/setup-byoc-with-azure/enable-ai-models-for-agent-mode.md).

# Enable AI models for Agent Mode

Deploy your selected models in Microsoft Foundry for an Azure BYOC deployment.

groundcover provisions a Microsoft Foundry resource and workload identity during Azure BYOC setup. Before adding another model to groundcover, deploy it in that same Foundry resource.

## What groundcover provisions

During Azure BYOC setup, groundcover provisions the following resources in your Azure subscription:

| Resource                              | Name or scope                                                                     | Purpose                                                                                                                   |
| ------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Resource group                        | `<deployment-name>-foundry`                                                       | Dedicated group for the Foundry resources, which may be in a different region from your AKS cluster.                      |
| User-Assigned Managed Identity (UAMI) | `agent-service-<install-id>`                                                      | Identity the Agent uses to access Foundry.                                                                                |
| Federated identity credential         | On the Agent's managed identity                                                   | Connects the agent-service Kubernetes workload to the managed identity through AKS workload identity, without an API key. |
| Microsoft Foundry account             | `gc-<install-id>`                                                                 | The `AIServices` resource that hosts the model deployments and exposes the inference endpoint.                            |
| Foundry project                       | Inside the Foundry account                                                        | Organizes the model deployments.                                                                                          |
| Initial model deployments             | Inside the Foundry account                                                        | Models selected during BYOC setup. Additional models can be deployed using the steps below.                               |
| Role assignment                       | **Azure AI User**, granted to the Agent's managed identity on the Foundry account | Allows the Agent to invoke models in that resource.                                                                       |
| Marketplace agreements                | Subscription                                                                      | Acceptance of the publisher terms required for the models provisioned during setup.                                       |
| Resource provider registration        | `Microsoft.SaaS`                                                                  | Enables Marketplace provisioning where required.                                                                          |

## Deploy your selected models

1. Open **Models** in the Foundry project configured for your groundcover backend.
2. Select **Deploy > Deploy a base model**, then choose a model.
3. Select **Deploy > Default settings** and complete any required Marketplace steps. **Keep the original model name as the deployment name.**
4. Wait for the deployment to finish. Repeat for each model you want to enable.

See Microsoft's [Foundry deployment guide](https://learn.microsoft.com/azure/foundry/foundry-models/how-to/deploy-foundry-models) for current portal steps, permissions, and quota requirements.

## Use the models in groundcover

In [model management](/automate/agent-mode/configuring-settings.md#manage-models), select or enter the deployment names under **Enabled models**, choose a **Default model**, and select **Save**. Suggestions are checked against your configured Foundry resource; they are not a list of all deployments in your Azure subscription. You can also enter a supported model ID manually.

If a deployment is not found, check its name and confirm it belongs to the configured resource. For access-denied errors, check the workload identity's role assignment or the configured API key. Refresh the suggestions after fixing access, then save again. A failed save leaves the existing configuration active.

## Resource and region

The Agent uses one configured Foundry resource for all Azure models in a backend. Its region may differ from your AKS cluster's region. Choosing a model does not change the configured resource.

The resource's region does not by itself describe where inference is processed. Review the selected model's Azure deployment type and data-processing terms.

## Cost

Charges depend on the selected model and deployment type. Review [Microsoft Foundry pricing](https://azure.microsoft.com/pricing/details/ai-foundry-models/) before deploying models.

To set spending limits in groundcover, see [Cost Management](/automate/agent-mode/cost-management.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.groundcover.com/collect-data/byoc/setup-byoc-with-azure/enable-ai-models-for-agent-mode.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
