# See and control cost

> Shows what agents spend by agent, function, model, provider and user, and brings it down without making them worse.

Builders work from a coding agent and operators from an AI client, both through the MCP server, or in the Studio. In Mindset, an agent is a prompt and a model, held to an order by a script when needed. It uses connections to outside systems, operations on them, functions and widgets. Every change is a version, and every execution is a run. Every piece sits on one security and compliance layer: the org sets its posture once, and every agent works under it, with the audit trail and, once an admin turns it on, personal data redaction. The platform runs in your own cloud (AWS, GCP or Azure) or is hosted by Mindset. Your app reaches agents through the SDK, your server through the API, and people through the Hub and schedules. Highlighted: Agent, Function, Run.

## Ask your AI client

```
What did our agents cost over the last 30 days? Break it down by agent and by model, and tell me what our acceptance tests cost.
```

## What you get back

Spend from the same ledger the Studio reads, so the two never disagree. Every model call is recorded with the tokens the provider reported, priced at that model's list rates. Every breakdown (by agent, function, model, provider, user or interaction) adds up to the same total, and the interaction breakdown separates real use from test runs. Each [environment](https://docs.mindset.ai/docs/environments) is counted on its own, so a busy test environment is real spend.

## What to watch

Weekly, name the top three agents and note each one's **Avg $/call** and **Avg input tok/call**. Read them again a few days after any activation or model change.

| What moves                            | What it usually means                                         | What to change                                         |
| ------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------ |
| **Avg $/call** up after an activation | The new version sends more, or runs on a larger model         | Read **Avg input tok/call**, then compare the versions |
| **Avg input tok/call** up             | An operation returns more than it used to, or the prompt grew | Return less                                            |
| **Cached** share falls                | Something changes at the start of every request               | Ask whoever built the agent whether it can move        |
| Test runs are a large share           | Acceptance tests run often, many times each                   | Check **Optimize → Runs**                              |

## Bring it down

In rough order of savings:

- **Prove a cheaper model still passes.** Run an [experiment](https://docs.mindset.ai/docs/test-an-agents-behavior#compare-a-change-before-you-make-it) on a smaller model. No regression means switch, and you have the run to show anyone who asks.
- **Turn fixed work into a function.** Comparing invoice lines to PO lines is arithmetic. As [function](https://docs.mindset.ai/docs/functions) steps it costs less and stops varying.
- **Use machine checks instead of judged gates** where the condition isn't about quality. A judged gate is a model call every time the phase is checked.
- **Return less.** An operation that returns a whole record when four fields are needed sends the rest to the model.
- **Schedule for the rate the data changes.** Hourly against data that updates daily costs 24 times what it needs to.

## What you decide

What each agent is worth, and the model it runs on. Better answers at twice the cost can be the right trade, if you make it on purpose.

> **Info:** There's no spend cap to set. Spend is bounded by run [limits](https://docs.mindset.ai/docs/limits) set per deployment, and by a ceiling of $25 per signed-in identity per rolling hour on conversations driven from a browser. Schedules, webhooks, server API runs and tests sit outside that ceiling.

To alert on spend, turn on **Send costs** in the [OpenTelemetry export](https://docs.mindset.ai/docs/check-what-happened#alert-from-your-own-tooling) and set the threshold in your own tooling. The figure is priced from list rates, and your provider's invoice is the final word.

## Done when

- You can name your three most expensive agents and say why.
- You ran one model comparison and either switched or can say why not.
- You know what each scheduled agent costs per week.

## In the Studio

**Monitor → Cost**, the default tab, shows **Total spend**, **Metered calls**, **Avg cost / call**, **Avg input tokens / call**, **Tokens in** and **Tokens out**, with **Spend over time** and a breakdown table for each axis. The built-in agents count against your org only if **Run the built-in agents on our own key** is on in **Settings → Governance**.

![Monitor → Cost, with the spend tiles and Spend over time.](https://docs.mindset.ai/images/docs/studio/monitor-cost.png)
