Local-first runtime guardrails

Put runtime limits around your Python agents.

AgentGuard checks budgets, repeated tool calls, retries, and elapsed time in instrumented Python code. Handle its exceptions to stop the next operation. No account, API key, or dashboard required for the first proof.

pip install agentguard47
0SDK runtime dependencies
MITfree SDK license
PyPIcurrent release and history
localfirst proof path
24-second demo

Watch a runaway coding agent get stopped.

A stuck agent loops and burns budget at 3 AM. AgentGuard47 trips the budget and loop guards locally and writes the trace — no account, no dashboard, no network.

Download (HDR) Graded in HDR. Brightest on a phone or HDR display.
Try it locally

See a guard stop the next operation.

The homepage points non-signup users at a concrete local sequence they can copy into a clean Python environment and inspect without talking to us.

1
Verify install agentguard doctor
2
Trip a guard agentguard demo
3
Copy into an agent loop agentguard quickstart --framework raw --write
What it kills

Four failure modes, one small SDK.

Budget burn

Set call, token, or dollar ceilings before a coding agent turns a bad loop into a bill.

Tool loops

Stop repeated tool calls and repeated argument paths while the run is still live.

Retry storms

Cap retry attempts when a tool, provider, or repo step keeps failing the same way.

Timeout drift

Make long-running agent work fail clearly instead of hanging until the operator notices.

Positioning

Start local. Add hosted control only when the work becomes shared.

Free SDK

Best first action

Run `doctor`, `demo`, and a generated quickstart file locally.

No account, no dashboard, no network requirement.

Hosted dashboard

When it matters

Use retained incidents, alerts, team visibility, and remote kill.

Useful after a workflow has real runs worth operating.

Not generic observability

Boundary

AgentGuard47 focuses on runtime enforcement and incident control.

It is not prompt management, eval orchestration, or a trace warehouse.

Copy this shape

The real integration is small.

Plain Python

import agentguard

tracer = agentguard.init(
    service="repo-coder",
    budget_usd=5.00,
    trace_file="traces.jsonl",
    local_only=True,
)

with tracer.trace("agent.run") as span:
    span.event("tool.call", data={"tool": "edit"})

After local proof

Open the quickstart for OpenAI, Anthropic, LangChain, LangGraph, CrewAI, or raw Python. Then connect the hosted dashboard only when the trace needs to be retained or shared.

Get started

Run the local proof. Keep the dashboard optional.

Run doctor and the offline demo, then add guards to the Python calls you control. Guards do not cancel in-flight provider requests or automatically protect every action in Claude Code or Cursor. The MCP server provides read-only visibility into retained traces.

Tried the demo? Run agentguard demo --feedback, inspect the local report, then share a first-run result if you choose. The form is public. Do not include traces, prompts, paths, or secrets.