# Choose the models agents use

URL: /agents/choose-the-models-agents-use · Id: `guide:choose-the-models-agents-use`

> Name a model per task class, such as draft or review, with ranked fallbacks, in one Policy call.

Models are chosen by [Policy](/business/nouns/policy) per task class, never in code, so changing a model changes no [Interface](/business/nouns/interface). One Policy names a model for each class, such as `draft`, `classify` or `review`, with ranked fallbacks.

**Before it runs**

- You leave the chat: Never: it all happens in the chat.

## What you get
- 1 model Policy: one model per task class, with ranked fallbacks (Policy)
- 1 record of every model call, with its model, tokens and cost (Action)

## Your agent does
**For agents**

- Guide: `guide:choose-the-models-agents-use`, status `live`. Page: [/agents/choose-the-models-agents-use.md](/agents/choose-the-models-agents-use.md).
- Approval: none. Run it when the founder asks.
- Leaves the chat: never.
- Run: call the steps in order, each through the API, SDK, CLI or MCP tab below; a later step passes the `$id` an earlier one returns. Each value marked example is the sample business’s: pass the founder’s own.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Policy.update`](/business/nouns/policy/update) (`verb:Policy.update`) | `id` string, required: example `"policy_models"`; `rule` text: example `"draft: fast. review: strong, then fast."` | `policy` Policy |

Returns: the last call answers with `policy` and its `action`, whose `status` is `done`, `pending` (waiting on an Approval or a Worker), `failed`, `canceled` or `refused`:

```json
{
  "api": "https://api.sb/leaseline.app",
  "policy": {
    "$id": "https://api.sb/leaseline.app/policies/policy_models",
    "$type": "Policy",
    "rule": "draft: fast. review: strong, then fast."
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/action_1",
    "operation": "Policy.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/action_1"
  }
}
```

Next: offer “Use the strong model for every refund reply”, or “Show me how often the first choice fails”.

Calls: `Policy.update`

Ask:

```text
Choose the models agents use.
Use a stronger model for reviews.
Switch drafting to a faster model.
```

API:

```bash
# Policy.update
curl -X PATCH https://api.sb/leaseline.app/policies/policy_models \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rule":"draft: fast. review: strong, then fast."}'
```

SDK:

```ts
import { $ } from 'startup-builder'

await $.Policy.update({ id: 'policy_models', rule: 'draft: fast. review: strong, then fast.' })
```

CLI:

```bash
npx startup-builder do Policy.update --json '{"id":"policy_models","rule":"draft: fast. review: strong, then fast."}'
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Policy.update({ id: 'policy_models', rule: 'draft: fast. review: strong, then fast.' })"
  }
}
```

## Change it
- Use the strong model for every refund reply.
- Show me how often the first choice fails.
- Cap model spend at $200 a month.

## Under the hood
- Systems: [Ledger](/systems/ledger)
- Nouns: [Policy](/business/nouns/policy), [Agent](/business/nouns/agent), [Limit](/business/nouns/limit)
- Events: `Policy.updated`

When a model times out or refuses, the gateway tries the next in rank, and the fallback is an [Event](/business/nouns/event). [AI models](/code/platform/ai-models) covers the gateway, cost and [Limits](/business/nouns/limit).