Skip to main content

Module tokenbudget

Module tokenbudget 

Source
Expand description

Token-budget aspect for agentic LLM systems.

Tracks cumulative LLM token spend per session and rejects calls once a declared budget is exhausted. The aspect is novel relative to classical rate limiters because it caps a cost dimension (tokens) rather than a request count, and because budgets are attributed per session rather than per process.

Structs§

TokenBudgetAspect
Token-budget aspect.
TokenCharge
Per-call context the host populates before the guarded join point.

Type Aliases§

SessionId
Identifier for the session whose token spend is being capped.