Use your own resources
Use this article if you want to use the Azure Agent Service with resources you already have.
Note
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.
Choose basic or standard agent setup
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, or the standard agent setup template.
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.
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.
Basic agent setup: use an existing AI Services/Azure OpenAI resource
Replace the parameter value for aiServiceAccountResourceId
with the full arm resource ID of the AI Services or Azure OpenAI resource you want to use.
To get the AI Services account resource ID, sign in to the Azure CLI and select the subscription with your AI Services account:
az login
Replace
<your-resource-group>
with the resource group containing your resource andyour-ai-service-resource-name
with the name of your AI Service resource, and run:az cognitiveservices account show --resource-group <your-resource-group> --name <your-ai-service-resource-name> --query "id" --output tsv
The value returned is the
aiServiceAccountResourceId
you need to use in the template.In the basic agent template file, replace the following placeholders:
aiServiceAccountResourceId:/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{serviceName} [Azure OpenAI Only] aiServiceKind: AzureOpenAI
If you want to use an existing Azure OpenAI resource, you will need to update the
aiServiceAccountResourceId
and theaiServiceKind
parameters in the parameter file. The aiServiceKind parameter should be set to AzureOpenAI.
Standard agent setup: use an existing AI Services/Azure OpenAI, storage, and/or Azure AI Search resource
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.
Use an existing AI Services or Azure OpenAI resource:
Follow the steps in basic agent setup to get the AI Services account resource ID.
In the standard agent template file, replace the following placeholders:
aiServiceAccountResourceId:/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{serviceName} [Azure OpenAI Only] aiServiceKind: AzureOpenAI
Use an existing storage account
To get your storage account resource ID, sign in to the Azure CLI and select the subscription with your storage account:
az login
Then run the command:
az search service show --resource-group <your-resource-group> --name <your-storage-account> --query "id" --output tsv
The output is the
aiStorageAccountResourceID
you need to use in the template.In the standard agent template file, replace the following placeholders:
aiStorageAccountResourceId:/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}
Use an existing Azure AI Search resource
To get your Azure AI Search resource ID, sign into Azure CLI and select the subscription with your search resource:
az login
Then run the command:
az search service show --resource-group <your-resource-group> --name <your-search-service> --query "id" --output tsv
In the standard agent template file, replace the following placeholders:
aiSearchServiceResourceId:/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}
See also
- Learn about the different tools agents can use.