# Tune an agent’s model settings

Cap the model calls an agent makes for one reply, turn its thinking off and set how creative it is.

## Before you start

You need an agent. See [Create an agent](/docs/agents/create-agent.md).

## Change the settings

**Studio**

1. In your project, open **Agents**.
2. Click your agent.
3. Click **Edit**.
4. Open **Model**.
5. Pick **Claude Haiku 4.5**.
6. Click **Model settings**, beside **Model**. **Max steps**, **Thinking** and **Temperature** open.
7. Enter `5` as the **Max steps**.
8. Turn off **Thinking**.
9. Move **Temperature**, between **Precise** and **Creative**, until the box beside it reads `0.5` (`0,5` in a browser that writes decimals with a comma).
10. Click **Save**. You should now see **Agent updated**.

Which settings show depends on the model: **Temperature** is missing for GPT-5.5, and **Thinking** for Gemini 3.5 Flash.

**Code**

1. Set them on the agent. `maxSteps` caps the model calls per reply, `thinking` turns reasoning on or off and `temperature` runs from 0, precise, up to the model's maximum, creative:

```ts title="agents/support.ts" {7-9}
import { agent } from "veryfront/agent";

export default agent({
  id: "support",
  name: "Support assistant",
  model: "anthropic/claude-haiku-4-5-20251001",
  thinking: { enabled: false },
  temperature: 0.5,
  maxSteps: 5,
  system: "Answer customer questions about orders and refunds. Keep replies to two sentences.",
});
```

2. Start the project with `npm run dev`.
3. Open **Chat** in Studio.
4. Pick Support assistant.
5. Ask "Can I get a refund on an order I placed yesterday?". You should now see the agent reply.

### Try it in a sandbox

```playground
step: Create a project | npm create -y veryfront@latest support-desk -- --template ai-agent --yes
step: Set them on the agent | cd support-desk && mkdir -p agents && printf '%s\n' 'import { agent } from "veryfront/agent";' '' 'export default agent({' '  id: "support",' '  name: "Support assistant",' '  model: "anthropic/claude-haiku-4-5-20251001",' '  thinking: { enabled: false },' '  temperature: 0.5,' '  maxSteps: 5,' '  system: "Answer customer questions about orders and refunds. Keep replies to two sentences.",' '});' > agents/support.ts
step: Start the project | npm run dev
agent: support
ask: Can I get a refund on an order I placed yesterday?
expect: refund
```

**API**

1. Set `PROJECT` to your project's ID ([Find your IDs](/docs/authentication/api-keys.md#find-your-ids)): `export PROJECT=<id>`.
2. Set the settings of your agent, here `support`, with your [API key](/docs/authentication/api-keys.md). Only the fields you send change:

```bash
curl -X PUT https://api.veryfront.com/projects/$PROJECT/agents/support \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "anthropic/claude-haiku-4-5-20251001", "thinking": {"enabled": false}, "temperature": 0.5, "max_steps": 5}'
```

3. Get the agent. You should now see `"max_steps": 5`, `"temperature": 0.5` and `"thinking": {"enabled": false}`:

```bash
curl https://api.veryfront.com/projects/$PROJECT/agents/support \
  -H "Authorization: Bearer $VERYFRONT_API_KEY"
```

### Try it in a sandbox

```playground
step: Set PROJECT | export PROJECT=$VERYFRONT_PROJECT_ID
step: Before you start: an agent | curl -X POST https://api.veryfront.com/projects/$PROJECT/agents -H "Authorization: Bearer $VERYFRONT_API_KEY" -H "Content-Type: application/json" -d '{"id": "support", "name": "Support assistant", "system_prompt": "Answer customer questions about orders and refunds. Keep replies to two sentences."}'
step: Set the settings | curl -X PUT https://api.veryfront.com/projects/$PROJECT/agents/support -H "Authorization: Bearer $VERYFRONT_API_KEY" -H "Content-Type: application/json" -d '{"model": "anthropic/claude-haiku-4-5-20251001", "thinking": {"enabled": false}, "temperature": 0.5, "max_steps": 5}'
check: curl -s https://api.veryfront.com/projects/$PROJECT/agents/support -H "Authorization: Bearer $VERYFRONT_API_KEY" | jq -c '{max_steps, temperature, thinking}'
expect: {"max_steps":5,"temperature":0.5,"thinking":{"enabled":false}}
```

## With MCP

1. Call `veryfront__update_agent` with the ID of the agent you made with MCP in [Create an agent](/docs/agents/create-agent.md), here `support`: `{ "project_reference": "my-project", "agent_id": "support", "model": "anthropic/claude-haiku-4-5-20251001", "thinking": { "enabled": false }, "temperature": 0.5, "max_steps": 5 }`. The project reference is its slug or its ID.
2. Call `veryfront__get_agent_source` with the same `project_reference` and `agent_id`. It worked when the source has `thinking: { enabled: false }`, `temperature: 0.5` and `maxSteps: 5`.

## Next steps

* [Choose models](/docs/agents/models.md)
* [Write instructions](/docs/agents/prompts.md)
