Check AI budget
check_ai_budgetCheck remaining AI budget headroom and get an ok, warn, or over verdict before starting an expensive agent run. Pass an estimated token count to test if the next task would exceed the cap.
Instructions
Advisory gate: before a big task, is the agent about to blow its AI budget?
Call this before an expensive run. Returns a verdict (ok / warn / over), the
reason, a recommendation, and headroom: dollars left under this session's cap,
and dollars or tokens left under the monthly budget. Advice only, it never blocks;
relay the verdict and let the human decide. Pass estimated_next_tokens to test
whether the next task would tip a token budget over. session_id defaults to the
calling session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No | ||
| estimated_next_tokens | No |