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

# Budget

> How much, over what, in how long (SPEC-v0.9 §2.2).

`ctrlrun.authority.Budget` — class, defined at `src/ctrlrun/authority.py:366`

```python theme={null}
from ctrlrun.authority import Budget
```

```python theme={null}
class Budget
    def __init__(metric: str, limit: int, window: timedelta)
```

How much, over what, in how long (SPEC-v0.9 §2.2).

A metric names where the number comes from, a limit is what the sum may reach, and a window
is what the sum is taken over. The kernel **does not know what any metric means**: there is no
branch on a metric name anywhere, no ranking of two metrics, and no default limit for one the
kernel thinks it recognises (§2.3, and §12 carries it as a do-not-build line).

Validated here as well as in the loader, on `Grant.__post_init__`'s rule: `Control.delegate`
takes a `Grant` built in Python, and §2.6's containment relation is undefined on a budget
whose window is negative or whose limit is a string.

## Next

* [Python API index](/docs/reference/api/index).
* [Get started](/docs/get-started/quickstart) · [Why](/docs/why).


## Related topics

- [Authority YAML reference](/docs/reference/authority-yaml.md)
- [Threat model](/docs/THREAT_MODEL.md)
- [Authority and delegation](/docs/authority.md)
- [Roadmap](/docs/ROADMAP.md)
- [Charge](/docs/reference/api/state-Charge.md)
