{"data":{"slug":"dipampaul17-agentguard","name":"AgentGuard","tagline":"Real-time guardrail that shows token spend & kills runaway LLM/agent loops.","github_url":"https://github.com/dipampaul17/AgentGuard","owner":"dipampaul17","repo":"AgentGuard","owner_avatar_url":"https://avatars.githubusercontent.com/u/40596409?v=4","primary_language":"JavaScript","stars":160,"forks":9,"topics":["ai-agents","anthropic","anthropic-claude","cost-monitoring","debugging","guardrails","llm","observability","openai","openai-api","prompt-engineering","token-usage"],"archived":false,"github_pushed_at":"2025-07-31T15:20:56+00:00","maintenance_label":"Slowing","url":"https://www.graphcanon.com/tools/dipampaul17-agentguard","markdown_url":"https://www.graphcanon.com/tools/dipampaul17-agentguard.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/dipampaul17-agentguard","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=dipampaul17-agentguard","description":"Real-time guardrail that shows token spend & kills runaway LLM/agent loops.","homepage_url":null,"license":"MIT","open_issues":1,"watchers":2,"ai_summary":null,"readme_excerpt":"### 1. Install\n\n```bash\nnpm install agent-guard\n```\n\n---\n\n### Quick Start\n```javascript\n// Step 1: Add these two lines to your AI agent\nconst agentGuard = require('agent-guard');\nawait agentGuard.init({ limit: 25 });  // $25 budget limit\n\n// Step 2: Your existing code works unchanged\nconst response = await openai.chat.completions.create({\n  model: 'gpt-4',\n  messages: [{ role: 'user', content: 'Hello world' }]\n});\nconsole.log('Response:', response); // ← AgentGuard automatically tracks this\n\n// Real-time protection: 🛡️ $12.34 / $25.00 49.4%\n```\n\n---\n\n### Production Deployment\n```javascript\n// Multi-process protection with Redis\nawait agentGuard.init({\n  limit: 1000,\n  mode: 'throw',\n  redis: 'redis://production:6379',\n  webhook: 'https://hooks.slack.com/alerts'\n});\n```\n\n---\n\n### Accurate Cost Calculation\n- **Real tokenizers**: OpenAI's `tiktoken` + Anthropic's official tokenizer\n- **Live pricing**: Fetches current rates from community sources\n- **Streaming support**: Accumulates tokens from partial responses\n- **Multimodal**: Handles images, audio, and complex content\n- **Smart fallback**: Accurate estimation when tokenizers unavailable\n\n---\n\n## 📜 License\n\nMIT - Use anywhere, even commercial projects.","github_created_at":"2025-07-31T02:46:39+00:00","created_at":"2026-07-15T10:43:00.607372+00:00","updated_at":"2026-07-15T10:43:04.197386+00:00","categories":[{"slug":"ai-agents","name":"AI Agents","url":"https://www.graphcanon.com/categories/ai-agents","markdown_url":"https://www.graphcanon.com/categories/ai-agents.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/ai-agents"},{"slug":"inference-serving","name":"Inference & Serving","url":"https://www.graphcanon.com/categories/inference-serving","markdown_url":"https://www.graphcanon.com/categories/inference-serving.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/inference-serving"},{"slug":"llm-frameworks","name":"LLM Frameworks","url":"https://www.graphcanon.com/categories/llm-frameworks","markdown_url":"https://www.graphcanon.com/categories/llm-frameworks.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/llm-frameworks"}],"tags":[{"slug":"ai-agents","name":"ai-agents"},{"slug":"anthropic","name":"anthropic"},{"slug":"anthropic-claude","name":"anthropic-claude"},{"slug":"cost-monitoring","name":"cost-monitoring"},{"slug":"debugging","name":"debugging"},{"slug":"guardrails","name":"guardrails"},{"slug":"llm","name":"llm"},{"slug":"observability","name":"observability"}],"trust":{"provenance":{"is_fork":false,"github_id":1029413969,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-07-15T10:43:01.587Z","maintenance":{"label":"Slowing","score":36,"methodology":"github_public_v1","releases_90d":0,"days_since_push":348,"last_release_at":null},"security_summary":{"status":"findings","scanner":"osv@v1","low_count":2,"high_count":0,"last_scan_at":"2026-07-15T10:43:02.086Z","medium_count":0,"scan_profile":"deps","critical_count":0}},"capability_facts":{"mcp":{"source":"repo_scan","observed_at":"2026-07-15T10:43:01.350Z","server_manifest":false},"scan":{"source":"repo_scan","observed_at":"2026-07-15T10:43:01.350Z"},"languages":{"value":["javascript"],"source":"github.language+package.json","observed_at":"2026-07-15T10:43:01.350Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-07-15T10:43:01.350Z"}}}}