AgentGuard
Stop runaway Python agents before they burn money.
AgentGuard47 is a zero-dependency runtime control SDK for Python agents. Add hard budget caps, loop detection, retry limits, timeouts, local traces, and incident reports without changing agent frameworks or sending data anywhere by default.
Use it when an agent can call tools, retry work, review code, or run long enough to create surprise spend.
⭐ Star this repo if AgentGuard stops one runaway run for you. It is how other builders find it.
Install
As a Python package
pip install agentguard47
agentguardThe bare agentguard command prints a 60-second local tour. If the script is
not on PATH, use python -m agentguard instead. Both run the same CLI.
As a skill (Codex, Claude Code, Cursor, Cline, and more)
npx skills add bmdhodl/agent47Or with GitHub CLI:
gh skill install bmdhodl/agent47 agentguardWhy AgentGuard
Most agent tooling tells you what happened after the run. AgentGuard stops the bad run while it is happening.
AgentGuard is an in-process agentic-loop guard, not an LLM cost router. It runs inside the agent's process, sees the call graph, and raises exceptions that kill the run before the next bad call lands. Routers and gateways like Manifest or Vercel AI Gateway sit at the network layer and shape egress traffic. The layers are complementary, see the competitive notes for when each fits.






