Enterprise DNA Enterprise DNA
M MCP Servers Developer low

bmdhodl/agent47

by Various

Your AI agent just burned $200. AgentGuard stops it at $5. Runtime cost guardrails for AI agents — budget enforcement, loop detection, kill switch. Zero dependencies, MIT licensed.

MCP

bmdhodl/agent47

Added 7 June 2026

#agent-safety #ai-agents #ai-cost-management #ai-safety #anthropic #budget-enforcement #budget-guard #coding-agents

Overview

AgentGuard is a Python library that enforces runtime cost guardrails for AI agents. It provides budget enforcement, loop detection, and a kill switch to prevent runaway spending. The tool has zero dependencies and is MIT licensed.

Best for

Best for
Developers building AI agents who need a lightweight, no-frills cost guardrail

Use cases

  • Set a hard budget cap on agent API calls to avoid cost overruns
  • Detect and halt infinite loops in agent execution
  • Implement a kill switch to manually stop an agent mid-task

How to use

Install

pip install agentguard47

Tested with

Claude Code, Cursor, Cline, ChatGPT

Example client config

from agentguard import BudgetGuard, LoopGuard, RateLimitGuard, Tracer\nbudget = BudgetGuard(max_calls=20, max_cost_usd=1.00)\nloop = LoopGuard(max_repeats=2)\nrate = RateLimitGuard(max_calls_per_minute=10)\ntracer = Tracer(service="cursor-agent", guards=[loop, rate])\nwith tracer.trace("agent.run"):\n    budget.consume(calls=1)\n    # tool call here — guards raise on overrun

Notes

AgentGuard is a Python library that enforces runtime cost guardrails for AI agents. It provides budget enforcement, loop detection, and a kill switch to prevent runaway spending. The tool has zero dependencies and is MIT licensed.

3 stars on GitHub. Last updated 2026-06-07. Licensed MIT.

Use cases

  • Set a hard budget cap on agent API calls to avoid cost overruns
  • Detect and halt infinite loops in agent execution
  • Implement a kill switch to manually stop an agent mid-task

Pros

  • Zero dependencies makes it easy to integrate
  • MIT license allows unrestricted use and modification
  • Simple, focused solution for a common cost problem

Cons

  • Limited to Python environments only
  • No built-in monitoring or alerting beyond the kill switch
  • Small community and limited documentation due to low stars

Indexed from awesome-mcp-servers-punkpeye and enriched against its public facts.

Pros

  • Zero dependencies makes it easy to integrate
  • MIT license allows unrestricted use and modification
  • Simple, focused solution for a common cost problem

Cons

  • Limited to Python environments only
  • No built-in monitoring or alerting beyond the kill switch
  • Small community and limited documentation due to low stars
Free 27-page guide

Get the free Developer’s Field Guide

A 27-page field guide to the AI coding workflow with Claude. Claude Code, MCP servers, the prompt patterns that work, and what to delegate. Free.

Enter your work email. We send it straight over, plus a few short notes worth knowing. Unsubscribe any time.

No spam. Unsubscribe any time.

Running a business, not writing the code? See the MCP servers picked for operators, and get your first one wired up with us.

Operator picks