|
| 1 | +--- |
| 2 | +title: 'Use your own resources in the Azure AI Agent Service' |
| 3 | +titleSuffix: Azure OpenAI |
| 4 | +description: Learn how to use resources that you already have with the Azure AI Agent Service. |
| 5 | +services: cognitive-services |
| 6 | +manager: nitinme |
| 7 | +ms.service: azure |
| 8 | +ms.topic: how-to |
| 9 | +ms.date: 12/11/2024 |
| 10 | +author: aahill |
| 11 | +ms.author: aahi |
| 12 | +ms.custom: azure-ai-agents |
| 13 | +--- |
| 14 | + |
| 15 | +# Use your own resources |
| 16 | + |
| 17 | +Use this article if you want to use the Azure Agent Service with resources you already have. |
| 18 | + |
| 19 | +> [!NOTE] |
| 20 | +> If you use an existing AI Services/AOAI resource, no model will be deployed. You can deploy a model to the resource after the agent setup is complete. |
| 21 | +
|
| 22 | +## Choose basic or standard agent setup |
| 23 | + |
| 24 | +To use your own resources, you can edit the parameters in the provided deployment templates. To start, determine if you want to edit the [basic agent setup template](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.azure-ai-agent-service/basic-agent-keys), or the [standard agent setup template](https://github.com/Azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.azure-ai-agent-service/standard-agent/README.md). |
| 25 | + |
| 26 | +**Basic Setup**: Agents use multitenant search and storage resources fully managed by Microsoft. You don't have visibility or control over these underlying Azure resources. You can only use your own AI services account with this option. |
| 27 | + |
| 28 | +**Standard Setup**: Agents use customer-owned, single-tenant search and storage resources. With this setup, you have full control and visibility over these resources, but you incur costs based on your usage. You can use your own AI services account, storage account, and/or Azure AI Search resource with this option. |
| 29 | + |
| 30 | +## Basic agent setup: use an existing AI Services resource |
| 31 | + |
| 32 | +Replace the parameter value for `aiServiceAccountResourceId` with the full arm resource ID of the AI Services account you want to use. |
| 33 | + |
| 34 | +1. To get the AI Services account resource ID, sign in to the Azure CLI and select the subscription with your AI Services account: |
| 35 | + |
| 36 | + ```az login``` |
| 37 | +2. Replace `<your-resource-group>` with the resource group containing your resource and `your-ai-service-resource-name` with the name of your AI Service resource, and run: |
| 38 | + |
| 39 | + ```az cognitiveservices account show --resource-group <your-resource-group> --name <your-ai-service-resource-name> --query "id" --output tsv``` |
| 40 | + |
| 41 | + The value returned is the `aiServiceAccountResourceId` you need to use in the template. |
| 42 | + |
| 43 | +2. In the basic agent template file, replace the following placeholders: |
| 44 | + |
| 45 | + ``` |
| 46 | + aiServiceAccountResourceId:/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{serviceName} |
| 47 | + ``` |
| 48 | +
|
| 49 | +## Standard agent setup: use an existing AI Services, storage, and/or Azure AI Search resource |
| 50 | +
|
| 51 | +Use an existing AI Search, storage account, and/or Azure AI Search resource by providing the full arm resource ID in the standard agent template file. |
| 52 | +
|
| 53 | +Use an existing AI Services resource: |
| 54 | +1. Follow the steps in basic agent setup to get the AI Services account resource ID. |
| 55 | +2. In the standard agent template file, replace the following placeholders: |
| 56 | + |
| 57 | + ``` |
| 58 | + aiServiceAccountResourceId:/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{serviceName} |
| 59 | + ``` |
| 60 | +
|
| 61 | +### Use an existing storage account |
| 62 | +
|
| 63 | +1. To get your storage account resource ID, sign in to the Azure CLI and select the subscription with your storage account: |
| 64 | + |
| 65 | + ```az login``` |
| 66 | +2. Then run the command: |
| 67 | +
|
| 68 | + ```az search service show --resource-group <your-resource-group> --name <your-storage-account> --query "id" --output tsv``` |
| 69 | + |
| 70 | + The output is the `aiStorageAccountResourceID` you need to use in the template. |
| 71 | +3. In the standard agent template file, In the basic agent template file, replace the following placeholders: |
| 72 | + |
| 73 | + ``` |
| 74 | + aiStorageAccountResourceId:/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName} |
| 75 | + ``` |
| 76 | +
|
| 77 | +### Use an existing Azure AI Search resource |
| 78 | +
|
| 79 | +1. To get your Azure AI Search resource ID, sign into Azure CLI and select the subscription with your search resource: |
| 80 | + |
| 81 | + ```az login``` |
| 82 | +2. Then run the command: |
| 83 | + |
| 84 | + ```az search service show --resource-group <your-resource-group> --name <your-search-service> --query "id" --output tsv``` |
| 85 | +3. In the standard agent template file, replace the following placeholders: |
| 86 | +
|
| 87 | + ``` |
| 88 | + aiSearchServiceResourceId:/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName} |
| 89 | + ``` |
| 90 | +
|
| 91 | +## See also |
| 92 | +
|
| 93 | +* Learn about the different [tools](./tools/overview.md) agents can use. |
0 commit comments