AgentGuard banner
dipampaul17 dipampaul17

AgentGuard

AI community

Description

Real-time guardrail that shows token spend & kills runaway LLM/agent loops.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

πŸ›‘οΈ AgentGuard

[![npm version](https://img.shields.io/npm/v/agent-guard?style=flat&color=blue&logo=npm)](https://www.npmjs.com/package/agent-guard) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Node.js](https://img.shields.io/badge/node-%3E%3D16.0.0-brightgreen)](https://nodejs.org/) [![GitHub Stars](https://img.shields.io/github/stars/dipampaul17/AgentGuard?style=flat&color=blue)](https://github.com/dipampaul17/AgentGuard)

🚨 The Problem

**Your AI agent has a bug. It makes 1000 API calls in a loop. Your $2000 credit card gets charged.**

This happens to developers every week:

  • Infinite loops in AI workflows
  • Testing with production API keys
  • Agents that don't know when to stop
  • One typo = hundreds of dollars gone

**Existing tools only tell you *after* the damage is done.**

πŸ’‘ The Solution

**AgentGuard automatically kills your process *before* it burns through your budget.**

// Add 2 lines to any AI project:
const agentGuard = require('agent-guard');
await agentGuard.init({ limit: 50 }); // $50 budget limit

// Your code runs normally until it hits $50, then AgentGuard stops it
const response = await openai.chat.completions.create({...});

**Result: Instead of losing $2000, you lose $50 and get a detailed report.**

πŸ”„ How It Works

graph TD
    A["πŸ€– Your AI Agent Starts"] --> B["πŸ“¦ AgentGuard.init({ limit: $50 })"]
    B --> C["πŸ” Monitors All AI API Calls"]
    C --> D["πŸ’° Tracks Real-Time Costs"]
    D --> E{"πŸ’Έ Cost β‰₯ $50?"}
    E -->|No| F["βœ… Continue Running"]
    E -->|Yes| G["πŸ›‘ Emergency Stop"]
    F --> C
    G --> H["πŸ“Š Show Savings Report"]
    H --> I["πŸ’Ύ Log Final Statistics"]
    
    style A fill:#e1f5fe
    style B fill:#f3e5f5
    style C fill:#fff3e0
    style D fill:#fff3e0
    style E fill:#ffebee
    style G fill:#ffcdd2
    style H fill:#e8f5e8

Real-Time Monitoring

sequenceDia