agentskit.js

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 every runtime.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?

optional dryRunRequiredIn?: 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?

optional perRun?: number

Defined in: quota.ts:23

Hard cap per runtime.run() invocation.


#perWindow?

optional perWindow?: object

Defined in: quota.ts:25

Sliding-window cap (count, window) shared across all runs.

#count

count: number

#windowMs

windowMs: number

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page