> ## Documentation Index
> Fetch the complete documentation index at: https://hobbyist-e43fa225.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Disable creation of classic agents and assistants

> Learn how to disable and re-enable creating classic agents and assistants on an Azure OpenAI account by setting a resource tag.

You can disable creating or updating classic agents and assistants on an Azure OpenAI account by setting the `MS-AOAI-Feature-Assistants` tag to `Disabled`. This tag opts the account out of the Assistants API surface while leaving other model and inference features unchanged.

## Prerequisites

* The [Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli) installed.
* You're signed in to Azure with `az login`.
* **Owner** or **Contributor** access on the target subscription or resource group.

## Disable assistants and classic agents

To disable creation, set the `MS-AOAI-Feature-Assistants` tag to `Disabled` on the Azure OpenAI account.

<CodeGroup>
  ```bash Azure CLI theme={null}
      # CLI — single account
      az resource tag --tags MS-AOAI-Feature-Assistants=Disabled \
          --ids /subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.CognitiveServices/accounts/<account>
  ```

  ```bicep Bicep theme={null}
      // Bicep — single account
      resource aoai 'Microsoft.CognitiveServices/accounts@2024-10-01' = {
        name: 'my-foundry-account'
        // ...
        tags: {
          'MS-AOAI-Feature-Assistants': 'Disabled'
        }
      }
  ```
</CodeGroup>

## Re-enable assistants and classic agents

To re-enable creation, set the same tag to `Enabled`.

<CodeGroup>
  ```bash Azure CLI theme={null}
      # CLI — single account
      az resource tag --tags MS-AOAI-Feature-Assistants=Enabled \
          --ids /subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.CognitiveServices/accounts/<account>
  ```

  ```bicep Bicep theme={null}
      // Bicep — single account
      resource aoai 'Microsoft.CognitiveServices/accounts@2024-10-01' = {
        name: 'my-foundry-account'
        // ...
        tags: {
          'MS-AOAI-Feature-Assistants': 'Enabled'
        }
      }
  ```
</CodeGroup>

## What gets disabled

When the tag is set to `Disabled`, the following Assistants API operations are blocked on the account:

* Create assistant
* Update assistant
* Create agent
* Update agent
* Create thread
* Create run
* Create thread and run
* Create assistant file

Existing assistants, threads, and files remain in place, but they can't be modified and no new ones can be created until the tag is set back to `Enabled`.

## Related content

* [Migrate to the new Foundry Agent Service](/agents/migrate)
