> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tess.im/llms.txt
> Use this file to discover all available pages before exploring further.

# Update an agent

> Change selected settings on an agent you can edit.

Send only the fields you want to change. Omitted fields keep their saved values, including controls inside `advanced_settings`. Set `connectors`, `advanced_settings`, or one advanced control to `null` to restore its platform default. Set `model_configuration_id` to `null` to use the default model configuration when one is available for the type. You can change the agent type before its first execution. Existing steps and user inputs are preserved.

For `connectors`, use `user_decision`, `fixed` with a list of slugs, or `disabled`. For each of `model`, `tools`, and `creativity` in `advanced_settings`, use `user_decision` or `restricted` with `allowed_values`.

Find supported values in [List agent options](https://docs.tess.im/en/list-agent-options.md).

Send a Bearer token with API and agent authoring access, and send the workspace ID in the `x-workspace-id` header.

The response is `200 OK` with the agent's ID, slug, title, type, visibility, and update time.

A `403` response means the token lacks the required workspace access or permission. A `422` response identifies invalid input or unavailable configuration values. A `404` response means the agent was not found in the workspace.

A `409` response means another request changed the agent while your update was in progress. Read the current configuration before trying again.

```bash cURL theme={null}
curl --fail-with-body --request PATCH \
  --url 'https://api.tess.im/agents/4281' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'x-workspace-id: YOUR_WORKSPACE_ID' \
  --header 'Content-Type: application/json' \
  --data '{"connectors":null,"advanced_settings":{"model":null}}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.