# How to set spending limits for AI agents

Why limits belong in the API and not in the agent's prompt, which limits to set, and what should happen when an agent hits one.

Set spending limits where the agent can't change them: in the API that charges it, not in its prompt or code. You need three: a monthly budget per agent, an approval threshold per purchase, and a key you can revoke at once.

## Why not in the prompt

A prompt is advice. A loop, a bad tool result or a prompt injection can make an agent ignore it. A limit the API enforces holds even when the agent misbehaves.

## The limits to set

Spending limits for an AI agent

| Limit | Why | Arettic default |
|---|---|---|
| Monthly budget per agent | Caps the worst month | $50 |
| Approval threshold | Catches one big mistake | $20 a request |
| Revocable key | Stops a runaway agent now | Revoke in the dashboard or API |
| IP allowlist | Stops a leaked key working elsewhere | Off |

## What should happen at the limit

Failing the purchase loses the work. Asking a person keeps it. On Arettic, a purchase over a limit returns `approval_required`, every owner gets a one-click email, and the agent sends the same request again once it's approved.

## One budget per agent

Give each agent its own key, so one runaway agent can't spend another's budget. Agents are unlimited on every Arettic plan. Every limit is on [spending limits](/limits).

## Questions

### What's a sensible budget for a new agent?

Start low and raise it once you've seen a month of spend. Arettic's default is $50 a month and $20 a request, and you can change both at any time.

### Do failed calls use up the budget?

No. A failed call is refunded, so it doesn't count as spend.

Updated 2026-10-23. This page as HTML: https://arettic.com/guides/ai-agent-spending-limits · Markdown: https://arettic.com/guides/ai-agent-spending-limits.md · JSON: https://arettic.com/guides/ai-agent-spending-limits.json
