Skip to content
Apkar

Running in production

Budgets and cost guards

Ceilings that count tokens, tool credits, and retries together.

A ceiling can be set per invocation, per agent, or per workspace. It counts model tokens, tool-side credits such as warehouse compute, and every retry.

budget: {
  perRun: { usd: 0.40 },
  alertAt: 0.8,
  onExceed: "stop", // or "escalate"
}