ToolQuota
Auto-generated API reference for ToolQuota.
Interface: ToolQuota
Defined in: quota.ts:21
Per-tool quota / blast-radius limits. Beyond rate-limiting (#163), agents need hard ceilings β "no matter what, this run cannot send more than 50 emails" β so a runaway loop cannot dump 10k messages or run a destructive query a thousand times.
Two limits per tool:
perRunβ counter resets on everyruntime.run().perWindowβ sliding window (default 60s) shared across runs.
Exceeding either raises a typed ToolError with code
AK_TOOL_QUOTA_EXCEEDED and emits a tool:quota:exceeded callback
so observers / cost-guards can react.
Closes issue #801.
#Properties
#dryRunRequiredIn?
optionaldryRunRequiredIn?:string[]
Defined in: quota.ts:30
Mark the tool as "dry-run only" in production. When the env tag is matched, the runtime throws before execute() is invoked.
#perRun?
optionalperRun?:number
Defined in: quota.ts:23
Hard cap per runtime.run() invocation.
#perWindow?
optionalperWindow?:object
Defined in: quota.ts:25
Sliding-window cap (count, window) shared across all runs.
#count
count:
number
#windowMs
windowMs:
number