agent-energy-budget
Agent cost control, energy budget management, and token tracking
Part of the AumOS open-source agent infrastructure portfolio.
Features
BudgetTrackerperforms pre-call affordability checks and records actual spend to a per-agent JSONL log, supporting daily, weekly, and monthly limits simultaneously- Four degradation strategies when budgets are tight:
TOKEN_REDUCTION(cap output tokens to fit remaining budget),MODEL_DOWNGRADE(switch to the cheapest affordable model),CACHED_FALLBACK(signal to use cached responses), andBLOCK_WITH_ERROR(raiseBudgetExceededError) - Model pricing tables for OpenAI, Anthropic, Google, and custom models with a
CostEstimatorthat projects spend before the call is made - Hierarchical sub-budget allocation — a parent
BudgetTrackercan allocate fractional child budgets for sub-agents in a multi-agent team - Threshold-based alert system fires warning, critical, and exhausted callbacks at configurable utilization percentages
- Middleware wrappers for LangChain, CrewAI, AutoGen, Anthropic SDK, and OpenAI SDK that intercept calls and apply budget checks transparently
- Spend reporting with per-model breakdowns, top-N cost attribution, and ASCII/matplotlib visualizations
Quick Start
Install from PyPI:
pip install agent-energy-budget
Verify the installation:
agent-energy-budget version
Basic usage:
import agent_energy_budget
# See examples/01_quickstart.py for a working example
Documentation
Enterprise Upgrade
For production deployments requiring SLA-backed support and advanced integrations, contact the maintainers or see the commercial extensions documentation.
Contributing
Contributions are welcome. Please read CONTRIBUTING.md before opening a pull request.
License
Apache 2.0 — see LICENSE for full terms.
Part of AumOS — open-source agent infrastructure.
Metadata
Release files for agent-energy-budget 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| agent_energy_budget-0.2.0.tar.gz | 170.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_energy_budget-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 310.9 kB
Release files / agent_energy_budget-0.2.0.tar.gz
| Download URL | agent_energy_budget-0.2.0.tar.gz |
|---|---|
| Size | 170.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c8808e3b0fed84727a019c0037bde0202fd85c08903256dede530a07f8b9588
|
|
BLAKE2b-256 checksum How to use checksums |
694133582ea554f8eb8c7a9004b99ff8b3b3a084068d064a7b3f773b982a87b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / agent_energy_budget-0.2.0-py3-none-any.whl
| Download URL | agent_energy_budget-0.2.0-py3-none-any.whl |
|---|---|
| Size | 140.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d8b7406968fab524f7689d5367c511a69bdc49d3a952b013d9dffc1cf96cf58
|
|
BLAKE2b-256 checksum How to use checksums |
d72bbef0373baec7ad8f17c466e9ad73c1b582201cd62926a8d550248fdcb910
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for agent-energy-budget 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.