Overview
AgentGuard is a local security and optimization tool designed specifically for AI coding agents such as Claude Code, Codex CLI, and Cursor. It acts as a protective boundary between your development environment and the AI models you use, ensuring that sensitive data never leaves your machine and that token usage is optimized for cost and efficiency.
Key Features
-
Guardian Agent (Security & Compliance)
- Data Loss Prevention (DLP): Automatically blocks secrets (like API keys or passwords) from being sent in prompts, tool inputs, or file reads.
- Vulnerability Guard: Flags risky package installs and vulnerable dependencies before they are executed.
- Token Caps: Prevents oversized requests that could lead to unnecessary costs or performance issues.
- Update Advisor: Provides exact recommendations for outdated dependency pins.
-
Token Saver (Optimization)
- Noise Compression: Reduces the size of verbose shell outputs, search results, diffs, and JSON responses before they reach the model.
- Caching: Caches repeated file reads to minimize redundant token usage.
- Savings Tracking: Provides clear analytics on how many tokens have been saved.
-
Observability & Analytics
- Logs: A compact event history showing all Guardian decisions and Token Saver reductions.
- Analytics: Visual charts tracking models used, token totals, savings, latency, and tool-call trends.
- Garden: A visual map of project activity, showing modules as groves, files as trees, and import edges as connections.
Supported Integrations
- Claude Code: Most complete coverage, including Guardian Agent, Token Saver, and detailed Garden file/symbol signals.
- Codex CLI: Guardian-focused integration with DLP, token caps, dependency protection, and inferred Garden paths.
- Cursor: Hook-based outbound control with Guardian-style allow/deny decisions and dependency advice.
Use Cases
- Secure Development: Prevent accidental leakage of
.envfiles, API keys, or proprietary code to AI providers. - Cost Reduction: Minimize AI API costs by compressing large logs and repetitive file contents before they are sent to the model.
- Dependency Management: Protect your project from installing known vulnerable packages or outdated libraries.
- Audit & Compliance: Maintain a local, exportable trail of all AI interactions for security reviews and debugging.



