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 agentmods add skills/bmdhodl/agent47/agentguardnpx skills add bmdhodl/agent47 --skill agentguardgit clone --depth 1 https://github.com/bmdhodl/agent47What 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 | $0.00038 | $0.00922 |
| Opus 5 | $0.00019 | $0.00461 |
| Sonnet 5 | $0.00008 | $0.00184 |
| Haiku 4.5 | $0.00004 | $0.00092 |
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 2d 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 — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AgentGuard
Runtime guardrails for coding agents. Stops loops, budget overruns, retry storms, and timeouts mid-run. Zero dependencies. Local-first.
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)
# OpenAI chat completions are now tracked. At $4 you get a warning. At $5 the agent stops.
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) to kill the agent immediately.
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.
- 2d 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 3d ago), licensed MIT. It adds 38 tokens to every session and 922 once invoked, about $0.0002 per session on Opus 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
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.
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.
bug-hunt
Deploy parallel QA agents to hunt for bugs across selectools. Each agent audits a different subsystem. Use for pre-release quality gates or periodic sweeps.
ralph-bug-hunt
Autonomous hunt-and-fix loop for a single selectools module. Finds bugs, auto-applies fixes, writes regression tests, verifies with pytest. Outputs RALPHRESULT sentinel on the last line so the orchestration script can detect convergence.
release
Prepare and execute a selectools release — version bump, changelog, docs, git, PyPI.
feature
End-to-end feature implementation — source, exports, tests, docs, examples, and notebook.