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

# Set limits

> Email alerts and 429 hard caps on token or cost spending, set per agent and per period.

## What are limits?

Two types of rules you can set per agent:

* **Email Alert** — Sends you an email when a threshold is hit.
* **Hard Limit** — Returns HTTP 429 and stops requests once the threshold is hit.

You can also combine both on a single rule.

## Creating a rule

<Steps>
  <Step title="Open the Limits page">
    Navigate to your agent's **Limits** page in the dashboard.
  </Step>

  <Step title="Create a rule">
    Click **+ Create rule**.
  </Step>

  <Step title="Configure the rule">
    Pick a rule type (Email Alert, Hard Limit, or both), a metric (tokens or cost), a threshold, and a period (hour / day / week / month).
  </Step>

  <Step title="Save">
    Click **Create rule**. The rule takes effect immediately.
  </Step>
</Steps>

## How blocking works

When a Hard Limit triggers, the next proxy request returns `429 Too Many Requests` with a message:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Limit exceeded: cost usage ($X) exceeds $Y per day
```

The block resets at the start of the next period.

## Email notifications

<Tabs>
  <Tab title="Cloud">
    Alerts are sent to your account email. Make sure it is correct in your profile settings.
  </Tab>

  <Tab title="Self-hosted">
    Choose an email provider in the dashboard's **Limits** page. Supported providers:

    * **Resend**
    * **Mailgun**
    * **SendGrid**

    Click a provider card, enter your API key, domain, and notification email, then save. If no provider is configured, email alerts are skipped (Hard Limit rules still work).
  </Tab>
</Tabs>

## Checking rules

* Rules are evaluated hourly (cron) for notifications, and on every request for blocks.
* A notification is sent once per rule per period to avoid spam.
