Deactivate an agent in an org.
Description for agent deactivate
Deactivating an agent makes it unavailable to your users. To make changes to an agent, such as adding or removing topics or actions, you must deactivate it. You can't preview an agent with the "agent preview" CLI command or VS Code if it's deactivated.
If you run the command without the --api-name flag, the command provides a list of agent API names for you to choose from. Use the flag to specify the exact agent without being prompted.
Flags
| Flag Name (Long) | Flag Name (Short) | Description |
|---|---|---|
| <code>‑‑api‑name</code> | <code>‑n</code> | Type: Value<br><br>API name of the agent to deactivate; if not specified, the command provides a list that you choose from. |
| <code>‑‑api‑version</code> | N/A | Type: Value<br><br>Override the api version used for api requests made by this command |
| <code>‑‑flags‑dir</code> | N/A | Type: Value<br><br>Import flag values from a directory. |
| <code>‑‑json</code> | N/A | Type: Boolean<br><br>Format output as json. |
| <code>‑‑target‑org</code> | <code>‑o</code> | Type: Value<br>Required<br><br>Username or alias of the target org. Not required if the target-org configuration variable is already set. |
Examples for agent deactivate
Deactivate an agent in your default target org by being prompted:
sf agent deactivate
Deactivate the agent Resort_Manager in the org with alias "my_org":
sf agent deactivate --api-name Resort_Manager --target-org my-org
<!-- prettier-ignore-end -->