> ## Documentation Index
> Fetch the complete documentation index at: https://docs.switchagents.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs moved from docs.flintai.dev to docs.switchagents.ai. Use docs.switchagents.ai for every link and request.
> To search these docs from an AI tool, connect the MCP server at https://docs.switchagents.ai/mcp. The page index is at https://docs.switchagents.ai/llms.txt.
> The source code for these products is public on GitHub. Switch Rooms: https://github.com/sandbox-quantum/switch. Switch Trust CLI: https://github.com/sandbox-quantum/switch-trust-cli. Switch Trust CodeScan action: https://github.com/sandbox-quantum/switch-trust-codescan-action. Switch Trust MCP server: https://github.com/sandbox-quantum/switch-trust-mcp. Switch Trust Python SDK: https://github.com/sandbox-quantum/switch-trust-sdk-py. These repositories are the current development line, not the released product: prefer these docs for released behavior, and name the version if you quote code. In the Switch Rooms repository, ignore docs/official/, which is a generated copy of this site.

# Spending and caps

> See what your agents spend in Switch Trust, set a monthly spending cap per agent, and forecast when each agent will reach it

Switch Trust shows what each of your agents spends on model calls, how fast it's spending, and
how that compares with a monthly cap you set. Use it to find the agents that cost the most and
to see which ones are on track to go over budget before the month ends.

Spend comes from the model calls your agents report through the
[SDK](/switch-trust/getting-started/runtime) or
[OpenTelemetry](/switch-trust/admin/data-sources/opentelemetry). Switch Trust prices each call
from [Model pricing](/switch-trust/cost/model-pricing), where you can set your own negotiated
rates. All amounts are in US dollars.

Two things about pricing affect how you read the figures on this page:

* **A model with no price counts as \$0.** If an agent calls a model marked **Unpriced** on
  **Model pricing**, those calls add nothing to its spend. The agent reads lower than it really
  spends, and can show as **Below cap** against its cap when it isn't. Set a price for every
  **Unpriced** model your agents use.
* **A price change recalculates everything.** Switch Trust works out spend from the current
  prices each time it shows a figure, including spend from past months. Setting or resetting a
  negotiated rate can move an agent between **Below cap**, **Near cap**, and **Over cap**.

## See spending across your agents

Select **Agents** in the left navigation. Two cards sit above the agents table:

* **Total AI spend:** What all your agents together have spent this month. If any agents have a
  cap, the card compares the total with the sum of those caps and shows how much is left. With
  no caps set, it shows **No cap set**.
* **Spending cap summary:** How many agents with a cap are **Below cap**, **Near cap**, or
  **Over cap**. If any agents have no cap, a line underneath says how many.

The agents table also has a column for each agent's spending this month:

* **Cost (MTD):** What the agent has spent month to date
* **\$/session (MTD):** Its average cost per session, month to date
* **Cap usage (MTD):** How much of its monthly cap it has used, or **No cap**

Month to date means since the start of the current calendar month.

## See spending for one agent

Select an agent to open it. Its **Overview** tab has a card for each view of its spending:

* **Cost by month:** What the agent has spent. Choose **Month**, **Quarter**, or **YTD** to see
  this month, this quarter, or the year to date.
* **\$ per session:** Its average cost per session this month
* **Burn rate:** How fast it's spending, and how long until it reaches its cap. See
  [Read the burn rate](#read-the-burn-rate).
* **Monthly cap:** Its cap and how much of it is used, or **Set a cap** if it doesn't have one

If an agent doesn't report its model calls yet, the cards prompt you to install the SDK.

## Set a monthly cap

A monthly cap is a spending budget for one agent. Switch Trust tracks the agent against it and
forecasts when it will reach it.

> [!NOTE]
>
> A cap doesn't stop an agent from spending. When an agent reaches its cap, its model calls carry
> on as normal and it's marked **Over cap**. To reduce what an agent spends, use the optimizations on
> its [**Improvements**](/switch-trust/inventory/agents#improvements) tab.

**1. Open the agent**

Select **Agents**, then select the agent.

**2. Open the cap dialog**

On the **Monthly cap** card, select **Set a cap**. If the agent already has a cap, select
**Edit cap**.

**3. Enter the cap and save it**

Enter the monthly amount in US dollars. It must be greater than zero. Select **Set cap**,
or **Update** if you're changing an existing cap.

The **Monthly cap** card now shows the cap and how much of it the agent has used this month.
The agent also counts toward **Spending cap summary**, and its cap is added to the total on
**Total AI spend**.

To remove a cap, open the dialog with **Edit cap** and select **Remove cap**.

Only an [Admin or Org Admin](/switch-trust/admin/users#roles-and-permissions) can set, change,
or remove a cap.

## Read the burn rate

The **Burn rate** card shows the agent's current run rate, in dollars per day. It's what the
agent has spent so far this month divided by the number of days the month has run, including
today.

If the agent has a cap, the card also shows **Days to cap**: how many days of spending at the
current rate it would take to reach the cap. It also shows one of these statuses:

* **Below cap:** The agent has spent less than 80% of its cap this month.
* **Near cap:** The agent has spent 80% or more of its cap, but hasn't reached it.
* **Over cap:** The agent has spent its whole cap or more.

With no cap set, the card says so in place of a status, and shows the run rate only.

Because the run rate averages every day of the month so far, one day of heavy spending moves it
a lot early in the month and only a little near the end.
