# About cost and quota management

> Agent Router's approach to AI spend in three stages: understand what is being spent with analytics, monitor a budget against a limit, then enforce a hard cap.

Enterprise Tier

AI spend is brought under control in three stages, in order: understand what is being spent, monitor that spend against a limit agreed with finance, then enforce that limit by choosing a budget action that stops or reroutes calls once it is reached. A budget's default action only measures, so a cap set without a baseline is a guess, a baseline nobody watches is a report, and a limit left on Watch spend stops nothing.

**Persona:** Platform operator working in the Admin Console, usually with the finance owner who sets the number and the engineering manager who owns the workload behind it.

**Estimated time:** 5 minutes to read. Each stage links to guides that carry their own estimates.

## The three stages

  
    Stage 1 · Available now
    Understand
    Read what is being spent, by team, by model, by key, and over time. Nothing is limited at this stage. The output is a baseline and a set of owners.
  
  
    Stage 2 · Available now
    Monitor
    Set a budget: a daily, weekly, or monthly limit on a whole team, each teammate, or one API key, with a live meter and an alert as the limit is approached. In its default action a budget measures and reports without stopping anything.
  
  
    Stage 3 · Available now
    Enforce
    Choose an action that acts at the limit rather than reporting on it. A rate limit rejects traffic over a throughput ceiling. Since 0.3.0 a budget can hard-stop its subject once the limit is spent, or degrade one API key's traffic to a cheaper model.
  

:::info A budget measures; its action enforces
**Measuring is every budget's job; stopping is opt-in.** What happens at the limit is the budget's action: **Watch spend** (the default) raises an alert and changes nothing about what the caller can do next, **Hard stop** refuses further requests until the period resets or the limit is raised, and **Degrade gracefully**, available on a single API key, reroutes them to a cheaper model instead. The arrangements are worked through in [Enforce budget caps with policies](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/enforce-budget-caps-with-policies/).

**Budget enforcement lags the spend by minutes**, because spend is totaled from usage rollups before it reaches the gateway. Where an inline, immediate hard stop is needed, that job belongs to a [rate limit](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/stop-runaway-workloads/), which is enforced at the gateway on the request itself.
:::

## Stage 1: understand what is being spent

Spend cannot be governed before it is attributable. The unit of attribution is the API key, so the per-purpose key convention in [Onboard developers and issue keys](/agent-router-enterprise/guides/operate-and-govern/onboard-developers-and-issue-keys/) is what keeps every later stage precise.

| Question | Where it is answered |
| :---- | :---- |
| What is the organization spending, and is it trending up | [See where AI spend is going](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/see-where-ai-spend-is-going/) |
| Which team, person, or key is driving it | [See where AI spend is going](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/see-where-ai-spend-is-going/) |
| How do two teams or two people compare side by side | [Compare user and team spend in Analytics](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/compare-user-and-team-spend-in-analytics/) |
| What does each app or project cost, when neither maps to a team | [Know what every app and project costs](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/attribute-cost-with-tags/) |
| What does each cost center owe for a closed period | [Split the AI bill across teams](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/split-the-ai-bill-across-teams/) |

## Stage 2: monitor spend against a limit

A budget turns a number agreed with finance into a live meter. It has a scope (a whole team, each teammate, or one API key), a spend limit in US dollars, a period that resets daily at midnight UTC, weekly on Monday, or monthly at the start of the calendar month, and an action that decides what happens at the limit.

What a budget does:

- Tracks cumulative spend against the limit and shows burn, headroom, and days remaining.
- Raises an alert as the limit is approached and as it is crossed.
- Records who created it and when, so the number has an owner.

What a budget in its default action never does:

- Reject a request. **Watch spend** measures and alerts, and an exhausted budget leaves the caller free to keep calling. Stopping calls is [Stage 3](#stage-3-enforce-a-cap), chosen per budget as its action.
- Cover tokens or request counts. A budget is money. Throughput is a [rate limit](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/stop-runaway-workloads/).

| Question | Where it is answered |
| :---- | :---- |
| How is a limit created, and what scopes can it take | [Set a budget and track spend against it](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/set-a-budget-and-track-spend/) |
| How much headroom is left this period, and which members are consuming it | [See budget exhaustion coming in time to act](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/see-budget-exhaustion-coming/) |
| How is a limit raised, paused, or retired once it no longer fits | [Raise a spend ceiling without interrupting delivery](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/raise-a-spend-ceiling/) |
| What catches drift that stays under every limit | [Catch spend drift before the invoice does](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/catch-spend-drift-early/) |
| How is spend alerted on without anyone watching a dashboard | [Get alerted to cost spikes as they happen](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/get-alerted-to-cost-spikes/) |

## Stage 3: enforce a cap

Enforcement divides by what is capped. Throughput is capped by a rate limit, which rejects requests over its ceiling inline at the gateway, and is covered in [Stop runaway workloads before they burn the budget](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/stop-runaway-workloads/).

**Spend is capped by the budget's action.** A **Hard stop** budget refuses its subject once the limit is spent, until the period resets or the limit is raised; nothing needs to be manually re-enabled. A budget on a single API key can instead **Degrade gracefully**, in which case calls continue on a cheaper fallback model rather than stopping. Enforcement acts in the gateway on live traffic and fails open: a request is served rather than refused while the totals catch up.

The scenarios, the interactions between overlapping budgets, and what a blocked caller sees are worked through in [Enforce budget caps with policies](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/enforce-budget-caps-with-policies/).

## Budgets and rate limits are not the same control

A budget measures money over its period and reports on it, minutes after the spend lands. A rate limit measures throughput over a short window and rejects what exceeds it, inline. Setting one where the other belongs is the usual reason a cost control never fires.

Most workloads warrant both: the rate limit walls off the fast runaway, and the budget flags the slow accumulation. The full comparison, and a per-workload decision between them, is in [Choose the right cost control for each workload](/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/choose-the-right-cost-control/).

## Start here

  <Link to="/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/see-where-ai-spend-is-going/" className="tare-nav-card">
    See where AI spend is going
    Stage 1. The organization trend, the cut by team, and the cut by model.
  </Link>
  <Link to="/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/set-a-budget-and-track-spend/" className="tare-nav-card">
    Set a budget and track spend against it
    Stage 2. Create a budget, read the meter, change the number later.
  </Link>
  <Link to="/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/enforce-budget-caps-with-policies/" className="tare-nav-card">
    Enforce a budget cap
    Stage 3. Block or degrade when the limit is reached.
  </Link>

## Outside the three stages

  <Link to="/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/choose-the-right-cost-control/" className="tare-nav-card">
    Choose the right cost control for each workload
    Which control fits which workload, before committing to any one of them.
  </Link>
  <Link to="/agent-router-enterprise/guides/operate-and-govern/cost-and-quota-management/contain-a-leaked-key/" className="tare-nav-card">
    Contain a leaked key before it drains the budget
    The incident runbook for a credential that is spending money right now.
  </Link>
