budget-guard: open_budget
budget_open_budget[budget-guard] Open a hard budget for one agent run before it starts: max dollars, tokens, calls and/or wall-clock seconds. Returns a handle. Give the handle to every sub-agent; they all draw from the same ledger, so one runaway loop or fork cannot exceed the run cap.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "budget_open_budget"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | shadow = watch only: track spend and flag where the cap WOULD have stopped the run, never block (free). enforce = return allowed=false at the cap (Pro). Default: enforce on Pro, shadow on free. | |
| label | No | What this run is for, e.g. "nightly code cleanup". | |
| max_usd | No | Dollar cap for the whole run (your own estimates per call). | |
| max_calls | No | Cap on model/tool calls for the whole run. | |
| ttl_hours | No | Handle lifetime (free max 24, Pro max 168). Default 24. | |
| max_tokens | No | Token cap (input + output) for the whole run. | |
| max_seconds | No | Wall-clock cap in seconds from now. |