Skip to content
PyRank
  • Search
  • PyPI
  • GitHub
  • Insights
  • Compare
  • Advisories
  • Ecosystem
  • About

Cost Control Python Packages

Python packages with the GitHub topic cost-control. Sorted by monthly downloads, with stars and forks.
crimsondevil0929
interlock-agentgov

Spend and rate limits for a whole tree of AI agents, held before a call and settled after.

7K 0 0
Blitz00X
agentcap-cli

Local-first quota and cost guard for coding agents: per-job share of Claude Code/Codex/Gemini subscription quota, loop breaker, evidence receipt.

6K 0 0
kazenai-ai
kazenai

A hard spending limit for every customer's AI. Python SDK that checks each OpenAI and Anthropic call against a limit before it runs.

4K 0 0
theagentplane
agent-tokenops

Run-aware token governance for multi-agent systems.

4K 84 23
ENDEVSOLS
longguard

In-flight circuit breaker & loop recovery for LangGraph, LangChain, OpenAI & Anthropic agents. Catches reasoning loops, prevents runaway LLM costs with budget hard caps, and auto-injects Reflect & Pivot prompts.

4K 8 1
vishal-dehurdle
state-harness

Runtime safety net for LLM agents. Detects token spirals, kills doomed tasks early, tells you exactly why. Rust core, Python SDK. pip install state-harness

3K 18 2
domondi1
inferrail

Self-hosted OpenAI/Anthropic-compatible gateway: give each AI agent run a dollar budget, enforced before the provider, with a payload-free per-run cost record.

3K 1 0
tokenrein
tokenrein

Self-hosted spend guardrails for AI agents: a budget on every run, a loop guard, approvals and alerts.

2K 0 0
bmdhodl
agentguard47

Python runtime checks for AI agents: budgets, loops, retries, and local traces. Zero runtime dependencies. MIT.

2K 4 3
vijaym2k6
steerplane

The safety layer for the AGI era. Runtime guardrails for AI agents: spend limits, loop detection and action rules in Python and TypeScript SDKs, plus a gateway for model calls.

2K 8 1
amabito
veronica-core

Runtime containment kernel for LLM agents. Enforces budget, step, retry, and circuit-breaker limits before the model call.

2K 5 0
docket-dev-org
docket-ai

Docket

2K 1 0
alicelik-games
warderbox

Guardrails for AI agents — self-improving cost prediction, rollback, budget control, live FinOps dashboard, 36 modules + 5 framework integrations. Zero dependencies.

1K 1 0
amirimi
litellm-brownout

LiteLLM plugin that downgrades selected routes to cheaper models as a team's budget runs out

1K 1 1
abhijitgunjal
llm-token-guard

Track LLM token usage, enforce rate limit & budget policies, and trigger alerts across OpenAI, Groq, OpenRouter, and AWS Bedrock.

1K 21 2
krivonosoff161
agentic-llm-router

Small cost-aware LLM router for role-tiered OpenAI-compatible and Yandex calls with per-call usage logging.

948 0 0
runcycles
langchain-runcycles

LangChain agent middleware for Cycles — pre-tool-call authorization and per-tenant budget enforcement for Python agents using create_agent

943 0 0
loopgain-ai
loopgain

An open-source cost controller for AI agent loops — stops a loop when it's actually converged and rolls back before it degrades, instead of running to a fixed max_iterations cap. Real-time loop-gain (Aβ) bands + best-so-far rollback. Adapters for LangGraph, CrewAI, AutoGen, LangChain, OpenAI Agents, and Claude Agent SDK; raw API for custom stacks.

899 127 11
coreystevensdev
rolling-cost-cap

Python adaptive rolling-median cost cap for LLM API calls

836 0 0
runcycles
runcycles-openai-agents

Budget governance for OpenAI Agents SDK — enforce cost limits before tools execute

728 0 0
arieradle
shekel

LLM budget enforcement and cost tracking. Zero config — with budget(max_usd=1.00): run_agent(). Or: shekel run agent.py --budget 1. Works with LangGraph, CrewAI, raw OpenAI/Anthropic/Gemini.

625 20 1
mariadb-RupeshBiswas
bq-readonly-mcp

Read-only BigQuery MCP server for Claude, Cursor, Windsurf, Copilot and other MCP clients. Auto-LIMIT, dry-run cost guard, Application Default Credentials. Run with uvx.

543 0 0
anilatambharii
agentmesh-proxy

The governance plane for AI agents — policy, budget, and audit across every framework. Istio for AI agents.

493 1 1
marcoschulz7
agentbrake-sdk

The emergency brake for multi-agent systems. Stop runaway LangChain & CrewAI agents before they burn your budget.

479 1 0
    • Original data from PyPI, GitHub, and OSV; downloads served through ClickHouse
    • Sources & methodology