agentskit.js

costGuard

Auto-generated API reference for costGuard.

Function: costGuard()

costGuard(options): Observer & object

Defined in: observability/src/cost-guard.ts:213

A cost-guarded observer. Tracks token usage from llm:end events, computes running cost incrementally per active model, aborts the run when the budget is exceeded.

#Parameters

#options

CostGuardOptions

#Returns

Explore nearby

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

On this page

Ask the docs
Ask anything about AgentsKit. Answers come from the docs corpus and cite their sources.