Observed since 20 Oct, 21:36 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
agentcap
Cost guardrails for LLM agent runs.
agentcap is a cost guardrail for LLM agent runs. It calculates safe token limits before execution and enforces strict budget ceilings using real usage data.
Github: https://github.com/OliverIida/agentcap
PyPI: https://pypi.org/project/agentcap/
pip install agentcap
from agentcap import AgentCap
prompt = "Write 2 lines about Tallinn."
cap = AgentCap(
model="gpt-5",
budget_usd=0.05,
)
plan = cap.plan(prompt_text=prompt)
# Pass plan.max_output_tokens into your LLM call
actual_cost = cap.finalize(
prompt_tokens=response_prompt_tokens,
output_tokens=response_output_tokens,
)
print("Actual cost (USD):", actual_cost)
https://github.com/OliverIida/agentcap/blob/main/DOCUMENTATION.md
https://github.com/OliverIida/agentcap/blob/main/agentcap/models.json To add more models, open a PR.
Note: Prices may change. Please verify with the provider.
OpenAI pricing: https://developers.openai.com/api/docs/pricing?latest-pricing=standard
Anthropic pricing: https://platform.claude.com/docs/en/about-claude/pricing
Gemini pricing: https://ai.google.dev/gemini-api/docs/pricing#standard
Download counts and popularity will appear here as the collector receives them.
Declarations describe requirements; they are not a resolved dependency graph.
bdist_wheel · 7.67 KB · Python py3
sdist · 4.43 KB · Python source
Observed since 20 Oct, 21:36 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:b267bb757bd1709ed573124ea11215d5591bf4ef2cacb2be540a02d229b2d3b2