# Set Budgets & Alerts

Visibility into your AI spend is only half the picture. The other half is knowing the moment something changes — before a runaway agent, an unexpected usage spike, or a newly onboarded customer turns into a bill you didn't see coming.

Revenium's alert system lets you define exactly what to watch, set the conditions that matter to your business, and get notified through the channels your team already uses. Head to **Notifications > Alerts** in your sidebar to get started.

<figure><img src="/files/0X2jUEyJ0QKIu5NdWjx6" alt="" width="563"><figcaption></figcaption></figure>

***

### Cost Controls

Budget rules can be used as active Cost Controls, not just passive notifications. When runtime enforcement is enabled in a supported Revenium SDK, the SDK checks the rule before the model call is sent. Calls blocked by a Cost Control rule do not reach the provider and do not create a metered transaction.

Cost Control rules support **dimensional filters** — scope a rule to a specific organization, product, agent, model, or task type rather than applying it globally. For example, a rule that caps spend per customer applies independently per `organizationName` and triggers only when that customer's usage exceeds the budget. Combining dimensional filters with runtime enforcement gives per-customer, per-product, or per-agent guardrails that fire at the call site.

Use this mode for production guardrails where the right answer is to stop spend at the call site. Use notification-only alerts when the workload should continue but the team needs visibility through Slack, email, webhook, or alert history.

***

### <i class="fa-bell">:bell:</i> Creating an Alert

Alerts are built in four steps: define what you're watching, set the trigger condition, choose how you want to be notified, and review before saving.

Click **Create Alert** to begin.

#### Step 1: Metric & Scope

Choose the metric you want to monitor and narrow the scope to the data that matters.

**The available metrics cover the full range of AI economics:**

* **Total Cost** and **Cost per Transaction** — for spend-level guardrails across your entire operation or per individual request.
* **Tokens per Minute** and **Requests per Minute** — for rate-based monitoring, useful for catching agents that are looping or hammering external APIs.
* **Error Rate** and **Error Count** — for quality and reliability guardrails, so degrading model performance doesn't go unnoticed.
* **Token Count**, **Input Tokens**, **Output Tokens** — for granular usage tracking at the token level.
* **Image, Video, and Audio Count** — for multimodal workloads where generation volume drives cost.
* **Cost per Image**, **Cost per Second**, **Duration**, **Credits Consumed** — for workload-specific efficiency monitoring.

**Scope it down with filters and grouping.** Filters let you focus the alert on a specific dimension — a particular Organization, Credential, Product, Model, Provider, Agent, Subscriber, or Task Type. Grouping goes further: when selected, the alert evaluates the condition separately for each member of that group, so a single alert on Total Cost grouped by Agent will fire individually for any agent that crosses the threshold — not just when the aggregate does.

#### Step 2: Define the Trigger Condition

Specify exactly when the alert should fire.

Set an **operator** (greater than, less than, greater than or equal to, less than or equal to) and a **threshold value** — the point at which the condition becomes worth acting on. You can also set a **Trigger After Persist For** window, so the alert only fires if the condition holds for a sustained period rather than a momentary blip. This keeps notifications meaningful and reduces noise.

#### Step 3: Configure Notifications

Choose where the alert is sent. At least one channel is required, and you can add multiple.

* **Email** — direct to any address, no setup required.
* **Slack** — connect your workspace and route alerts to the channel where your team already works. Connect Slack from the **Alerts** configuration screen before building your first alert.
* **Webhook** — send alert payloads to any endpoint. Useful for routing into incident management tools, triggering automated circuit-breaking in your systems, or feeding into your own internal dashboards. Add a webhook URL directly from the notification step, with optional authentication credentials.

> 💡 **Tip:** Webhooks are particularly powerful for agentic workflows — the moment an agent's cost behavior breaks its expected pattern, a webhook can trigger an automated response before the problem compounds.

#### Step 4: Review & Save

A summary of your full alert configuration is shown before saving — metric, scope, filters applied, condition, and notification channels. Review and confirm, and the alert goes live immediately.

***

### <i class="fa-eye">:eye:</i> Viewing Alert History

The **Alert History** view shows every alert that has fired, when it fired, and against what condition. This gives you an audit trail for cost events and makes it straightforward to understand patterns — whether a particular agent consistently triggers spend alerts at the same time each day, or a specific customer's usage reliably spikes at month end.

***

### <i class="fa-bell">:bell:</i> Alerts Worth Setting Up

**Total Cost > threshold, grouped by Agent** — catches any individual agent whose spend breaks out of expected ranges, without needing a separate alert for each one.

**Error Rate > 5%, filtered by Model** — surfaces model-level degradation in production before it affects end users or compounds into failed workflows worth investigating.

**Requests per Minute > threshold, filtered by Product** — rate-based monitoring for a specific product tier, useful for catching unexpected bursts of usage that might indicate a misconfigured client or an agent looping.

**Cost per Transaction > threshold, grouped by Task Type** — flags when a specific type of task is suddenly becoming significantly more expensive per request than its historical average.

> **Through MCP, conversationally.** Setting budget alerts is one of the capabilities the MCP Server explicitly supports. Once an AI assistant is connected to Revenium, alert creation becomes a sentence rather than a four-step form. Tell the agent "alert me on Slack if any single transaction goes over $5", "send me a daily email if total spend exceeds $1,000", or "warn me if AI spend rises more than 20% week over week" and the agent configures it. Useful when the alert idea comes up in conversation — the moment you spot something worth watching, you can wire up the alert without breaking flow.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.revenium.io/track-and-control-costs/set-budgets-and-alerts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
