Budgets
Set Budget
Set, adjust, or clear the agent’s spend budget
PUT
Upserts the agent’s budget. Takes effect on the next paid call.
Every field is tri-state: an absent key leaves the stored value alone, an explicit
Strings that are only numeric by prefix (
null clears it, a value sets it. A partial update — “just raise my daily” — never wipes the caps it didn’t mention. For alert_at and pause_at, which always have a value, null resets to the default (0.8 / 1.0).
Authentication
X-Agent-ID plus a signed x-agent-proof with scope: "write" — required. See Spend Budgets.
You rarely call this directly. Pass
budgets when constructing the SDK client and it syncs once, before the first paid call — including for a brand-new wallet that has never made a call (the endpoint registers it). If that sync fails, the SDK refuses the paid call (BudgetSyncError) rather than run without the guardrail.Body
number | null
Max USDC per UTC day. Must be
> 0, or null to clear.number | null
Max USDC for any single call. Must be
> 0, or null to clear.number | null
default:"0.8"
Fraction of
daily in (0, 1] that fires a budget_warning notification. null resets to 0.8.number | null
default:"1.0"
Fraction of
daily in (0, 1] at which paid calls are rejected with 403 budget_exceeded. null resets to 1.0.string | null
Email for budget alerts, in addition to in-app notifications.
null to clear."5oops") are rejected with 400 invalid_budget.