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

# Charge

> What one reservation spends against one grant's budget (SPEC-v0.9 §3.3.1).

`ctrlrun.state.Charge` — class, defined at `src/ctrlrun/state.py:511`

```python theme={null}
from ctrlrun.state import Charge
```

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

What one reservation spends against one grant's budget (SPEC-v0.9 §3.3.1).

**It carries the whole predicate**, not just the amount, and that is the decision §3.3.1
argues: `limit` and `window` travel with the charge rather than being looked up, because a
store that resolved a grant's budgets would be reading the policy, and `ARCHITECTURE.md` §6
has `state.py` not knowing about `policy.py`. The store evaluates one arithmetic predicate it
was handed, over rows it owns.

## Next

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


## Related topics

- [check_charges](/docs/reference/api/state-check_charges.md)
- [Not only agents](/docs/not-only-agents.md)
- [A refund agent with amount tiers](/docs/cookbook/refund-agent.md)
- [CTRLRun and idempotency keys](/docs/compare/idempotency-keys.md)
- [Consumption](/docs/reference/api/state-Consumption.md)
