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

# Set model, temperature, token limits and escalation behaviour

> The settings after the upsert (a row is created if none existed).

### Path parameters

<ParamField path="id" type="string (uuid)" required>
  The agent id.
</ParamField>

### Request body

`AgentSettings`

<ParamField body="model_name" type="string">
  e.g. 'gpt-4.1', 'claude-sonnet-5'.
</ParamField>

<ParamField body="model_provider" type="string">
  e.g. 'openai', 'anthropic'.
</ParamField>

<ParamField body="model_type" type="string" />

<ParamField body="temperature" type="number" />

<ParamField body="max_tokens" type="integer" />

<ParamField body="top_p" type="number" />

<ParamField body="escalation_tag_name" type="string" />

<ParamField body="escalation_team_id" type="string" />

<ParamField body="agent_take_over_tag" type="string" />

### Response

`object`

<ResponseField name="object" type="string" required />

<ResponseField name="configured" type="boolean" required>
  False when no settings row exists yet for this agent (every other field is then null).
</ResponseField>

<ResponseField name="model_name" type="string,null" required />

<ResponseField name="model_provider" type="string,null" required />

<ResponseField name="model_type" type="string,null" required />

<ResponseField name="temperature" type="number,null" required />

<ResponseField name="max_tokens" type="integer,null" required />

<ResponseField name="top_p" type="number,null" required />

<ResponseField name="escalation_tag_name" type="string,null" required />

<ResponseField name="escalation_team_id" type="string,null" required />

<ResponseField name="agent_take_over_tag" type="string,null" required />

### Status codes

| Code  | Meaning                                                           |
| ----- | ----------------------------------------------------------------- |
| `200` | The settings after the upsert (a row is created if none existed). |
| `400` | Invalid request. `issues` names the offending field(s).           |
| `401` | Missing, invalid, or expired API key.                             |
| `403` | The key lacks a required scope.                                   |
| `404` | Not found, or not in the organization that owns the key.          |
| `429` | Rate limit exceeded.                                              |

### Access

|                |                        |
| -------------- | ---------------------- |
| Required scope | `agents:write`         |
| Rate limit     | 30 requests per minute |

<RequestExample>
  ```bash cURL theme={null}
  curl --request PUT \
    --url 'https://response.stateset.com/api/v1/agents/{id}/settings' \
    --header "Authorization: Bearer $RESPONSECX_API_KEY" \
    --header 'Content-Type: application/json' \
    --data '{
    "model_name": "string",
    "model_provider": "string",
    "model_type": "string",
    "temperature": 1.5,
    "max_tokens": 1,
    "top_p": 1.5,
    "escalation_tag_name": "string",
    "escalation_team_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "agent_take_over_tag": "string"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "object": "agent.settings",
    "configured": true,
    "model_name": "string",
    "model_provider": "string",
    "model_type": "string",
    "temperature": 1.5,
    "max_tokens": 1,
    "top_p": 1.5,
    "escalation_tag_name": "string",
    "escalation_team_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "agent_take_over_tag": "string"
  }
  ```
</ResponseExample>
