Releases: MukundaKatta/AgentBudgetPy
Releases · MukundaKatta/AgentBudgetPy
v0.1.0 — initial release
Python port of @mukundakatta/agentbudget. Same API surface, snake_case names. Token + dollar budget caps for AI agents — raises BudgetExceededError when an LLM call would push past the ceiling.
Install
pip install agentbudget-pyWhat's in v0.1.0
Budget(max_input_tokens=, max_output_tokens=, max_total_tokens=, max_cost_usd=, pricing=, allow_unknown_pricing=)record_usage({model, input_tokens, output_tokens})— tally + raise on overwrap(fn, extract_usage=)— auto-record from Anthropic / OpenAI shapeswould_exceed/assert_can_spend— pre-flight checks (no mutation)remaining()/reset()— introspectionDEFAULT_PRICINGstarter table (Claude + GPT, early-2026 rates)allow_unknown_pricingflag for preview models with no rate sheet yetBudgetExceededErrorcarriescap,limit,attempted,overshoot,model- 23/23 tests on Python 3.10+, zero runtime deps
Sibling libraries
Part of the @MukundaKatta agent reliability stack:
- agentsnap-py, agentguard-firewall, agentcast-py, agentfit-py, agentvet-py — and agentbudget-py (this lib)
JS sibling: @mukundakatta/agentbudget.