Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add bmdhodl/agent47 --skill agentguardgit clone --depth 1 https://github.com/bmdhodl/agent47Wrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/bmdhodl/agent47/agentguard)<a href="https://agentmods.dev/skills/bmdhodl/agent47/agentguard"><img src="https://agentmods.dev/badge/skills/bmdhodl/agent47/agentguard/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/bmdhodl/agent47/agentguard"><img src="https://agentmods.dev/badge/skills/bmdhodl/agent47/agentguard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.00965 |
| Opus 5.5 | $0.00015 | $0.00386 |
| Sonnet 5.5 | $0.00007 | $0.00193 |
| Haiku 4.5 | $0.00004 | $0.00097 |
Grade A, and why
agentguard scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AgentGuard
Runtime guardrails for coding agents. Recorded-budget preflight, loops, retries, and timeouts on instrumented Python paths. Zero dependencies. Local-first. This skill is onboarding, not host enforcement. See docs/enforcement-boundary.md.
Install
pip install agentguard47
Verify the install:
agentguard doctor
Quick Start (4 lines)
from agentguard import Tracer, BudgetGuard, patch_openai
budget = BudgetGuard(max_cost_usd=5.00, warn_at_pct=0.8)
tracer = Tracer(service="support-agent")
patch_openai(tracer, budget_guard=budget)
# Chat Completions are tracked. Exhausted recorded budget refuses the next dispatch.
Guards
| Guard | What it stops | Example |
|---|---|---|
BudgetGuard |
Dollar/token/call overruns | BudgetGuard(max_cost_usd=5.00) |
LoopGuard |
Exact repeated tool calls | LoopGuard(max_repeats=3) |
FuzzyLoopGuard |
Similar calls, A-B-A-B patterns | FuzzyLoopGuard(max_tool_repeats=5) |
TimeoutGuard |
Wall-clock time limits | TimeoutGuard(max_seconds=300) |
RateLimitGuard |
Calls-per-minute throttling | RateLimitGuard(max_calls_per_minute=60) |
RetryGuard |
Retry storms on flaky tools | RetryGuard(max_retries=3) |
Guards raise exceptions (BudgetExceeded, LoopDetected, TimeoutExceeded, RetryLimitExceeded) on instrumented paths. They do not intercept host tools or provider invoices.
One-Liner Init with Defaults
import agentguard
agentguard.init(local_only=True)
# Reads .agentguard.json if present, sets up tracer + budget guard with sensible defaults
Or drop a .agentguard.json in your repo root:
{
"profile": "coding-agent",
"service": "my-agent",
"trace_file": ".agentguard/traces.jsonl",
"budget_usd": 5.0
}
Tracing
from agentguard import Tracer, JsonlFileSink, BudgetGuard
tracer = Tracer(
sink=JsonlFileSink("traces.jsonl"),
guards=[BudgetGuard(max_cost_usd=5.00)],
)
with tracer.trace("agent.run") as span:
span.event("reasoning", data={"thought": "search docs"})
span.cost.add("gpt-4o", input_tokens=1200, output_tokens=450)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 13d ago Changed 65968a135492
- 21d ago Changed 3f6130f585fd
- 26d ago Changed · +1 lines · -1 tokens per session 21bdb36400e5
- 28d ago Changed 77092084f2d4
- 1mo ago Changed 189cddfbde52
- 1mo ago Changed 0ba6a2cadf74
- 1mo ago First seen · 124 lines · 38 tokens per session scan A c2a75bd6797d
agentguard is a skill published in the GitHub repository bmdhodl/agent47 (4 stars, last pushed today), licensed MIT. It adds 37 tokens to every session and 965 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
llamaguard
Meta's 7-8B specialized moderation model for LLM input/output filtering. 6 safety categories - violence/hate, sexual content, weapons, substances, self-harm, criminal planning. 94-95% accuracy. Deploy with vLLM, HuggingFace, Sagemaker. Integrates with NeMo Guardrails.
safety-scanning
Automatically scan user inputs and LLM outputs for safety issues including prompt injection, PII leaks, harmful content, toxicity, and hallucinations. Use when processing untrusted text, reviewing code for security issues, or validating LLM responses.
shield
AI agent guardrails — defends prompts against injection attacks, jailbreaks, and evasion; scans LLM responses for leaked secrets and harmful content. Up to 36 inline defenses (24 default), 3 output scanners, and adaptive ranking. Keywords: shield, guardrails, prompt injection, defense, security, scan.
langchain
Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval. Use for building chatbots, question-answering systems, autonomous agents, or RAG…
constitutional-ai
Anthropic's method for training harmless AI through self-improvement. Two-phase approach - supervised learning with self-critique/revision, then RLAIF (RL from AI Feedback). Use for safety alignment, reducing harmful outputs without human labels. Powers Claude's safety system.
nemo-guardrails
NVIDIA's runtime safety framework for LLM applications. Features jailbreak detection, input/output validation, fact-checking, hallucination detection, PII filtering, toxicity detection. Uses Colang 2.0 DSL for programmable rails. Production-ready, runs on T4 GPU.