Skip to main content

Module budget

Module budget 

Source
Expand description

Budget manager for agent-level token and call budget tracking.

Implements sliding window budgets that reset after a configurable time period. Budgets track tokens and calls per agent, preventing resource exhaustion attacks and enforcing fair usage policies.

Structs§

BudgetExceeded
Error when a budget limit is exceeded.
BudgetInfo
Budget information returned to callers.
BudgetLimit
Budget limit configuration for an agent.
BudgetManager
Manages budgets for all agents with sliding window reset semantics.
Usage
Current usage state for an agent.

Enums§

BudgetKind
Kind of budget that was exceeded.