# Cap what your AI agent can spend

> Researched. Small business · Intermediate · Operations. Updated 2026-11-02.

Canonical page: https://www.aisetupsthatwork.com/setups/cap-what-your-ai-agent-can-spend/

## What it does
Set a monthly spend limit and an alert on every API account your agents use, with one key per agent, so a runaway task stops before it burns your budget.

## Who it's for
Owners and builders running agents on pay-as-you-go API keys, especially for clients.

## Tools
- Claude Console and or OpenAI API platform
- One project or workspace per agent
- A note of what you can afford per month

## Steps
1. List every agent and which API key it uses. Shared keys make one runaway task hit everything.
2. Create one project or workspace per agent and give each its own key.
3. Set a monthly spend limit. Anthropic says you can set your own limit below your tier cap on the Billing page in the Claude Console; OpenAI documents per-project spend limits and notification thresholds.
4. Set an alert at about half the limit so you hear before it stops.
5. Use the prompt below to write a short clause for client work on usage limits and who pays for overruns.
6. Check spend weekly for the first month and adjust.

## Copy-paste prompt
Adapt bracketed fields to your situation.
```text
Write a short clause for my client agreement about AI usage costs. Plain English, under 120 words.

What I run for the client: [DESCRIPTION]
Monthly usage cap I set: [AMOUNT]
What happens at the cap: [e.g. the agent pauses and I notify the client]
Who pays above the cap, and only with written approval: [CLIENT OR ME]

Also list the 3 settings I should confirm before starting: spend limit, alert threshold, separate key. This is a draft for my lawyer to review, not legal advice.
```

## Guardrails
- What it touches: Chat input you provide (Claude Console and or OpenAI API platform; One project or workspace per agent).
- Needs your OK: Send, pay, publish, and account changes stay with you. Treat agent output as drafts first.
- Safety level: Read-only
- Leaving keys in a default workspace that cannot have its own limit.
- Setting a limit higher than you can afford.
- Forgetting subscriptions and plan overages are billed separately from the API.

## Tips
- One key per agent makes it obvious which one ran away.
- An alert without a hard limit only tells you after the money is gone.
- Retry loops are the usual culprit; limit retries in the agent too.

## Estimates (labeled, not measured)
- Time saved: About 30 minutes to set up.
- Money saved: Not stated in sources.
- Tool cost: Spend limits are free to set. Prices: Not stated in sources.

## Sources
Summaries use the public sources below, not independent verification.
- Anthropic: https://platform.claude.com/docs/en/api/rate-limits (Rate limits: set your own monthly spend limit below your tier cap on the Billing page in the Claude Console; requests stop when it is reached (read 2026-11-02 from a search result excerpt of the page))
- OpenAI: https://help.openai.com/en/articles/9186755-managing-projects-in-the-api-platform (Managing projects in the API platform: per-project limits, including a monthly spend limit and notification threshold (read 2026-11-02 from a search result excerpt that cites the page))

## Get the free starter pack
Five beginner copy-paste AI setups, free by email: https://www.aisetupsthatwork.com/starter-pack/?utm_source=ai-agent&utm_medium=markdown&utm_campaign=setup-cap-what-your-ai-agent-can-spend

Related:
- [Rate your bot fleet and forecast usage](https://www.aisetupsthatwork.com/setups/rate-bot-fleet-and-forecast-usage-with-mission-control/index.md)
- [Set guardrails before an AI agent gets access](https://www.aisetupsthatwork.com/setups/set-guardrails-before-giving-an-ai-agent-access/index.md)
- [Track recurring software spend and idle charges](https://www.aisetupsthatwork.com/setups/track-recurring-software-spend/index.md)
