Catalog PyPI
Back to packageRELEASE DETAILS

0.2.0

PyPI

agent-energy-budget

Agent cost control, energy budget management, and token tracking

Published27 Feb 2026
Direct dependencies17
Transitive dependenciesNot calculated

README

Version 0.2.0 documentation

agent-energy-budget

Agent cost control, energy budget management, and token tracking

CI PyPI version Python versions License

Part of the AumOS open-source agent infrastructure portfolio.


Features

  • BudgetTracker performs 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), and BLOCK_WITH_ERROR (raise BudgetExceededError)
  • Model pricing tables for OpenAI, Anthropic, Google, and custom models with a CostEstimator that projects spend before the call is made
  • Hierarchical sub-budget allocation — a parent BudgetTracker can 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.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 21

Native requirements
17 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
click
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
click>=8.0runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pydantic>=2.0runtime
pyyaml
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pyyaml>=6.0runtime
rich
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
rich>=13.0runtime
aumos-agentcore-sdk
Environment
{
  "extras": "",
  "marker": "extra == \"agentcore\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
aumos-agentcore-sdk>=0.1.0; extra == "agentcore"runtime
anthropic
Environment
{
  "extras": "",
  "marker": "extra == \"all-frameworks\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
anthropic>=0.30.0; extra == "all-frameworks"runtime
crewai
Environment
{
  "extras": "",
  "marker": "extra == \"all-frameworks\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
crewai>=0.50.0; extra == "all-frameworks"runtime
langchain-core
Environment
{
  "extras": "",
  "marker": "extra == \"all-frameworks\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
langchain-core>=0.2.0; extra == "all-frameworks"runtime
openai
Environment
{
  "extras": "",
  "marker": "extra == \"all-frameworks\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
openai>=1.0.0; extra == "all-frameworks"runtime
anthropic
Environment
{
  "extras": "",
  "marker": "extra == \"anthropic\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
anthropic>=0.30.0; extra == "anthropic"runtime
crewai
Environment
{
  "extras": "",
  "marker": "extra == \"crewai\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
crewai>=0.50.0; extra == "crewai"runtime
mypy
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
mypy>=1.8; extra == "dev"runtime
pip-audit
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pip-audit; extra == "dev"runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=0.23; extra == "dev"runtime
pytest-cov
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest-cov>=4.0; extra == "dev"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest>=8.0; extra == "dev"runtime
ruff
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
ruff>=0.3; extra == "dev"runtime
langchain-core
Environment
{
  "extras": "",
  "marker": "extra == \"langchain\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
langchain-core>=0.2.0; extra == "langchain"runtime
litellm
Environment
{
  "extras": "",
  "marker": "extra == \"litellm\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
litellm>=1.0; extra == "litellm"runtime
microsoft-agents
Environment
{
  "extras": "",
  "marker": "extra == \"microsoft\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
microsoft-agents>=0.1.0; extra == "microsoft"runtime
openai
Environment
{
  "extras": "",
  "marker": "extra == \"openai-agents\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
openai>=1.0.0; extra == "openai-agents"runtime

Distribution files

2 collected
agent_energy_budget-0.2.0-py3-none-any.whl

bdist_wheel · 136.84 KB · Python py3

Source file
agent_energy_budget-0.2.0.tar.gz

sdist · 166.8 KB · Python source

Source file

Repository

PENDING
aumos-ai/agent-energy-budget

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:50 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:b9fd503dcd96468369159a941237df2f83fec7fee06557825495024cd558806b

Other collected versions

View all collected versions →