Skip to Content
Clovie Docs

Concepts

Budgets and price books

Budgets set how much your agents and teams may spend. Price books make sure every cost uses the rates you actually pay.

What it is

Clovie prices every request your agents make and attributes the cost to the agent, its team and any budget that covers it. Two tools shape those numbers: budgets decide how much may be spent, and price books decide what each token costs.

When to use it

  • Finance teams set monthly budgets per team or business unit, get alerted before they run out, and produce chargeback statements.
  • Platform teams put hard stops and per-request limits on agents, so a runaway loop can't run up a large bill.
  • Procurement and finance teams record negotiated rates and enterprise discounts, so every report shows what you really pay rather than list prices.

How it works

Every request an agent sends through the Clovie gateway is priced as it happens, with your price book rates or else the provider's list price. The cost is recorded with who made it: the agent, the agent's owner team, the user, the API key, the environment, the model and provider, and any request tags. That record feeds your cost reports and every budget that covers the request.

[ Your agent ] --request--> [ Clovie gateway ] --> [ Model provider ]
                                   |
                                   v
                     [ Priced with your price book ]
                                   |
                                   v
           [ Cost record: agent, team, user, model, tags ]
                    |                          |
                    v                          v
           [ Budgets: alert or stop ]   [ Cost reports ]

Before a request goes to the provider, the gateway checks the budgets and limits that cover it. A budget in monitor mode only alerts. An enforced budget with a hard stop rejects new requests once it is used up.

Budgets

A budget is an amount of money for a period, for example "$5,000 a month for the Payments team's agents".

What a budget can cover

A budget can cover your whole organization or a slice of it: a business unit, a team, a project, an environment, a single agent, a user, an API key, a model or a provider. You can also build a budget from filters, share one budget between several teams, or split it into one budget per user, per agent or per team.

Period and amount

Choose a Budget period: monthly, quarterly, annual or custom dates. The amount can be Fixed (the same every period), Planned (a different amount for each upcoming period) or Auto-adjust (follows your average spend over recent periods).

Thresholds and actions

Thresholds say what happens as spend grows, based on actual spend or on forecast spend. Each threshold has an action:

ActionWhat it does once the budget is enforced
Notify onlySends an alert. Traffic is not affected.
Throttle (approved fallback model, else slow down)Until the period resets, new requests switch only to the fallback model the agent's owner approved in advance. An agent without one keeps its model and is slowed down. Clovie never picks a model on its own.
Hard stop (block requests)New requests are rejected until the period resets or the budget is raised.

Monitor, then enforce

Like policies, every budget starts in Monitor mode: you get alerts, and traffic is never changed. When you are ready, select Switch to enforce. Clovie first shows you what the budget would have throttled or blocked over the last 7 days, so there are no surprises.

When an enforced budget hard-stops a request, the agent receives an HTTP 429 error with the code budget_exceeded. If a team needs more room before the period ends, an administrator can add a temporary increase.

Limits

Next to budgets, Limits cap the cost of a single request, a single agent run, or the spend or tokens in a time window, such as a minute or an hour. They protect you from a runaway loop long before a monthly budget would notice.

Price books

By default, Clovie prices requests at each provider's standard list price. If you have negotiated rates, a committed-use discount or an enterprise agreement, record it as a price book, a set of negotiated prices.

A price book holds rates per provider, model and region: a price per million input tokens, output tokens and cached input tokens, or a discount percentage, each with a start date. Every cost Clovie shows uses these rates: live request costs, budgets, cost reports and chargeback statements. If several price books match, the one with the lower priority number wins.

For capacity you pay for by time, such as Amazon Bedrock provisioned throughput or your own GPUs, a rate can be per second of model time: each call is charged for how long the model worked on it instead of for its tokens.

Prompt cache reads and writes

When a provider serves part of a prompt from its own prompt cache, it reports those tokens separately: OpenAI as cached prompt tokens, Anthropic as cache reads and cache writes, Google Gemini as cached content. Clovie records them on every request through the gateway, streamed or not, and prices cached input at the Cached input rate. Without a cached rate in your price book, Clovie keeps the provider's list ratio between cached and normal input. Cache writes are priced at the provider's cache-write rate where it has one. The cached and cache-write token counts are stored with each request's record and trace.

When you change rates, you can apply them to an earlier period. Clovie adds dated adjustments rather than rewriting the original records, so your history stays auditable.

Set it up

Connect your agents to the gateway, so their requests are priced and counted. See Connect an agent.

Give each agent an owner team when you register it, so its spend rolls up to that team. See Agents.

If you pay negotiated rates, record them in AI Governance → Costs → More → Negotiated prices.

Create budgets in AI Governance → Costs → Budgets with Create budget, and limits on the Limits tab with Create limit.

Watch the budget in monitor mode for a while, then select Switch to enforce when you want its hard stops to apply.

What you'll see

  • AI Governance → Costs → Overview shows this month's spend, the forecast and the budgets that need attention.
  • AI Governance → Costs → Cost explorer breaks spend down by team, agent, model, provider and more.
  • AI Governance → Costs → More → Statements produces monthly chargeback and showback statements per team and cost center.
  • Budget alerts arrive in your inbox, alert integrations and webhooks, and are recorded in your audit trail.
  • An agent stopped by a budget receives HTTP 429 with the code budget_exceeded, and headers naming the budget.

Limits and good to know

  • Only spend that goes through the gateway can be stopped. Spend from cloud bills and other sources counts towards budgets and alerts only.
  • Thresholds on forecast spend only notify.
  • If the gateway can't check a budget, your organization decides whether traffic continues with an alert (the default) or is refused.
  • Clovie's own AI features, such as the assistant, run on your own model keys, so their spend is counted too. A budget can leave it out.

On this page