AgentGuard
Enrichment pendingReal-time guardrail that shows token spend & kills runaway LLM/agent loops.
GraphCanon updated today · GitHub synced today
Verify the decision
Adoption
Package downloads where a registry match exists. GitHub stars (160) are secondary evidence.
- npm downloads (30d)
- 58·npm downloads API·today
Maintenance and security
Full trust report- Maintenance
- Slowing (348d since push)
- As of today
- Provenance
- Not a fork · Personal account
- As of today
- Security (OSV)
- 2 low (2 low)
- As of today
Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.
Install
npm install AgentGuard npmSimilar tools
Same-category neighbours. No typed graph edges are catalogued for this tool yet.
Evidence and technical details
Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.
Overview
Real-time guardrail that shows token spend & kills runaway LLM/agent loops.
Capability facts
- MCP server
- No MCP server detected
Source: repo_scan · Jul 15, 2026
- Languages
- javascript
Source: github.language+package.json · Jul 15, 2026
Categories
Compatibility
Sourced claims from the README excerpt - not unsourced marketing copy.
Source: README excerpt (regex_v1, Jul 15, 2026)
npm install agent-guardSource link
Tags
README
1. Install
npm install agent-guard
Quick Start
// Step 1: Add these two lines to your AI agent
const agentGuard = require('agent-guard');
await agentGuard.init({ limit: 25 }); // $25 budget limit
// Step 2: Your existing code works unchanged
const response = await openai.chat.completions.create({
model: 'gpt-4',
messages: [{ role: 'user', content: 'Hello world' }]
});
console.log('Response:', response); // ← AgentGuard automatically tracks this
// Real-time protection: 🛡️ $12.34 / $25.00 49.4%
Production Deployment
// Multi-process protection with Redis
await agentGuard.init({
limit: 1000,
mode: 'throw',
redis: 'redis://production:6379',
webhook: 'https://hooks.slack.com/alerts'
});
Accurate Cost Calculation
- Real tokenizers: OpenAI's
tiktoken+ Anthropic's official tokenizer - Live pricing: Fetches current rates from community sources
- Streaming support: Accumulates tokens from partial responses
- Multimodal: Handles images, audio, and complex content
- Smart fallback: Accurate estimation when tokenizers unavailable
📜 License
MIT - Use anywhere, even commercial projects.
For agents
This page has a .md twin and JSON over the API.