Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

bmdhodl/agent47 MCP server](https://glama.ai/mcp/servers/bmdhodl/agent47/badges/score.svg)](https://glama.ai/mcp/servers/bmdhodl/agent47) πŸ“‡ ☁️ - Runtime guardrails and incident read access for coding agents.

README.md

AgentGuard

Stop runaway agents before they burn money.

Zero-dependency Python kill switch for AI agents. Hard budget caps. Loop detection. Local traces. MIT.

![PyPI](https://pypi.org/project/agentguard47/) ![Downloads](https://pypi.org/project/agentguard47/) ![Python](https://pypi.org/project/agentguard47/) ![CI](https://github.com/bmdhodl/agent47/actions/workflows/ci.yml) ![License: MIT](LICENSE)

pip install agentguard47

Getting started

1. Install and verify

pip install agentguard47
agentguard doctor   # package ok?
agentguard demo     # offline proof (no API keys)

2. Guard an OpenAI client

from agentguard import BudgetGuard, LoopGuard, Tracer, patch_openai

budget = BudgetGuard(max_cost_usd=5.00, warn_at_pct=0.8)
loop = LoopGuard(max_repeats=3)
tracer = Tracer(service="my-agent", guards=[loop])

patch_openai(tracer, budget_guard=budget)
# every OpenAI call is now traced + budget-enforced

When spend crosses the hard limit, BudgetExceeded is raised and the run stops.

3. Cap a single task

Session budget can still have headroom. One goal can still be killed:

with budget.goal("refund", max_cost_usd=0.50, warn_at_pct=0.8) as g:
    g.attempt()
    budget.consume(cost_usd=0.12)
    # BudgetExceeded names the goal when it crosses

4. Read the local proof

agentguard report .agentguard/traces.jsonl
agentguard incident .agentguard/traces.jsonl

Or scaffold a starter file:

agentguard quickstart --framework raw --write
python agentguard_raw_quickstart.py

What it stops

| Problem | Guard | Exception | |---------|-------|-----------| | Spend blowup | BudgetGuard | BudgetExceeded | | Same tool forever | LoopGuard | LoopDetected | | Fuzzy / A-B-A-B loops | FuzzyLoopGuard | LoopDetected | | Retry storms | RetryGuard | RetryLimitExceeded | | Hung runs | TimeoutGuard | TimeoutExceeded | | Spam calls | RateLimitGuard | β€” | | Wallet drain (x402/USDC) | X402SpendGuard | BudgetExceeded |

Not a dashboard. Not a model router. An in-process exception that kills the bad run mid-flight.

Cap your agent's x402 wallet spend

Agents that pay per-call via x402 (USDC micropayments) can drain a wallet in a silent loop. X402SpendGuard wraps the payment step and refuses before paying:

from agentguard import X402SpendGuard

guard = X402SpendGuard(
    max_total_usd=5.00,        # wallet cap, add period="day" for a daily reset
    max_per_endpoint_usd=1.00, # cap per resource URL
    max_per_call_usd=0.10,     # refuse any single payment above this
)
guard.charge(0.001, "https://api.example.com/search", my_x402_pay_step)

AgentGuard meters and refuses; it never signs or settles. Amounts come from your x402 client. No crypto dependencies.

Features

  • Hard stops β€” exceptions inside your process, not after-the-fact alerts
  • Task-level budgets β€” BudgetGuard.goal(...) for sub-task caps + warn hooks
  • Local traces β€” JSONL by default; no network unless you opt in
  • Zero deps β€” stdlib only; Python 3.9+
  • Provider patches β€” patch_openai / patch_anthropic
  • Framework hooks β€” LangChain, LangGraph, CrewAI (optional extras)

Local by default

  • No API key required for local proof
  • No network unless you configure HttpSink
  • MIT licensed

The SDK is the free local proof path. Start local. Add hosted ingest later only if you want retained history, alerts, team visibility, spend trends, hosted decision history, or dashboard-managed remote kill signals. Local guards remain authoritative. HttpSink mirrors trace and decision events; it does not execute remote kill signals by itself.

Integrations

OpenAI Β· Anthropic Β· LangChain Β· LangGraph Β· CrewAI Β· raw agent loops

pip install "agentguard47[langchain]"   # optional extras as needed

Docs

Links

  • PyPI: https://pypi.org/project/agentguard47/
  • Issues: https://github.com/bmdhodl/agent47/issues
  • AgentGuard on the web (hosted history, alerts, and MCP visibility for Claude Code, Cursor, and Codex): https://bmdpat.com/tools/agentguard?utm_source=agentguard47&utm_medium=readme&utm_campaign=touchpoints

The hosted page is an optional next step, not a requirement. The SDK stays free, local, and MIT, and the local guards stay authoritative. Nothing in this package phones home. The only network egress is a sink or exporter you configure yourself, such as HttpSink or an OpenTelemetry exporter.

---

MIT Β· Built for people who ship agents and hate surprise bills.

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Other servers.