AgentGuard stops runaway AI agents before they drain your budget. Runtime loop detection, hard dollar caps, and cost tracking per LLM call. Three lines of code. Zero dependencies.
Set a dollar limit. Agent stops when it's hit. No more surprise invoices.
Catch repeated tool calls before they compound. Automatic circuit breaker.
See exactly what each agent run costs, per call. Dollar amounts, not guesses.
Pure Python stdlib. One package, nothing to audit. No supply chain risk.
Patch OpenAI/Anthropic in one line. Costs and traces flow automatically.
Record real runs and replay deterministically for regression tests.
Gantt visualization with color-coded spans and click-to-expand details.
Install the SDK
pip install agentguard47
Add 3 lines
Wrap your agent with Tracer and HttpSink
See traces
Gantt timelines, alerts, and usage in the dashboard
from agentguard import Tracer, BudgetGuard from agentguard.sinks.http import HttpSink from agentguard.instrument import patch_openai sink = HttpSink(url="https://app.agentguard47.com/api/ingest", api_key="ag_...") tracer = Tracer(sink=sink, service="my-agent") patch_openai(tracer) # auto-tracks cost per call guard = BudgetGuard(max_cost_usd=5.00) # stop at $5 with tracer.trace("agent.run") as span: span.event("reasoning.step", data={"thought": "search docs"}) with span.span("tool.search"): pass # your tool here
"I used AgentGuard's LoopGuard to create a hard circuit-breaker for Ralph's tool-execution loop, which immediately stopped a runaway Gemini model that had been flooding Discord with over 100 duplicate error messages."
"I leveraged AgentGuard's structured tracing to diagnose a hidden failure in Ralph's reasoning, discovering that he was hallucinating missing tools because I had accidentally truncated the system prompt during an update."
No supply chain risk. One pip install, one package to audit.
MIT-licensed. Read every line on GitHub. No vendor lock-in.
TLS 1.3 in transit, AES-256 at rest via Supabase Postgres.
7-90 day auto-cleanup by plan. No indefinite data hoarding.
New features, integration guides, and agent reliability tips. No spam.