set_agent_key_budget
Set or update a rolling spend cap for an agent API key. Once the key's spending exceeds the cap, payments are refused until the reset window elapses.
Instructions
Set or update the rolling spend budget on one agent API key (FLO-585). Fail-closed: spend attributed to the key past the budget is refused until the window rolls. A 0 budget is invalid — revoke the key to block it entirely. Requires a developer key (floe_live_...).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key_id | Yes | Key id to budget. | |
| agent_id | Yes | Numeric agent id. | |
| budget_raw | Yes | Budget in raw USDC units (6 decimals), positive. e.g. "5000000" = $5. | |
| window_seconds | No | Rolling window in seconds. Omit for the server default. |