项目介绍

quilrai/AgentGuard 是一个托管在 GitHub 上的开源项目,主要使用 Rust 编写,目前获得 33 个 Star、2 次 Fork。

仓库全名
quilrai/AgentGuard
Star 数
33
Fork 数
2

README 摘要

AgentGuard Local guardrails and token saving for coding agents. Website: https://agentguard.quilrai.dev Downloads: Mac, Apple silicon - 12MB Ubuntu, x8664 .deb Windows build: coming soon. What It Is AgentGuard is a Tauri desktop app. It runs locally, listens on localhost:8008, and connects to agent CLIs/IDEs through hooks. No proxy. No cloud relay. Hook events come in, policy decisions go out. Supports: Claude Code…

完整内容见 GitHub 原始 README 或本页 。

常见问题

AgentGuard 用什么语言开发?

主要使用 Rust 编写,目前有 33 个 Star。

如何获取 AgentGuard 的源码?

可以直接克隆仓库:git clone https://github.com/quilrai/AgentGuard.git,默认分支为 main;安装与运行步骤见仓库 README。

AgentGuard 最近还在维护吗?

仓库最近一次更新为 1 周前,当前没有未关闭的 Issue;Star 数为 33,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Guardian Agent and Token Savings for Claude Code

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

CSS
HTML
JavaScript
Rust
Shell

Release

README

AgentGuard

Local guardrails and token saving for coding agents.

Website: https://agentguard.quilrai.dev

Downloads:

Windows build: coming soon.

AgentGuard screenshot

What It Is

AgentGuard is a Tauri desktop app. It runs locally, listens on localhost:8008, and connects to agent CLIs/IDEs through hooks.

No proxy. No cloud relay. Hook events come in, policy decisions go out.

Supports:

  • Claude Code
  • Codex CLI
  • Cursor IDE

Save Costs With Claude Code

AgentGuard cuts token waste before it reaches Claude Code.

  • Smart file-read cache: unchanged files come back as compact references instead of being resent.
  • Context-aware reads: full, diff, or line-range responses are chosen based on what changed.
  • Shell output compression: noisy output from builds, tests, package managers, logs, git, grep, rg, find, ls, curl, and more gets summarized.
  • Search compression: large grep/rg results are grouped by file and trimmed to the useful matches.
  • Cheaper shell habits: rg-style search, targeted reads, and summarized file discovery instead of giant recursive dumps.
  • Diff compression: keeps the actual changes, drops excess context.
  • JSON crusher: trims huge arrays, long strings, and deep nesting while preserving structure.

Use the Token Saver tab and apply recommended settings for Claude Code.

Guardian Agent

AgentGuard puts a local policy layer in front of coding agents.

  • Sensitive data guard: blocks prompts, tool inputs, file reads, shell commands, and MCP calls that match secrets, credentials, API keys, PII, or custom patterns.
  • Dependency guard: blocks known compromised or vulnerable packages before the agent installs them.
  • Update advisor: nudges the agent toward newer exact-pinned package versions instead of relying on stale model memory.
  • Token limit: blocks oversized requests per agent.
  • Local logs: records prompts, tool calls, blocks, detections, and token savings in SQLite.

Dependency protection checks install commands and dependency files such as package.json, requirements.txt, pyproject.toml, Cargo.toml, go.mod, Gemfile, pom.xml, build.gradle, .csproj, and composer.json.

Vulnerability data comes from OSV. Latest-version checks cover PyPI, npm, crates.io, RubyGems, NuGet, and Go.

What The App Has

  • Agent hook installer for Claude Code, Codex CLI, and Cursor IDE.
  • Per-agent DLP settings and custom pattern management.
  • Per-agent dependency protection toggles: Vulnerability Guard and Update Advisor.
  • Claude Code token-saving toggles.
  • Dashboard for requests, tools, token usage, latency, and savings.
  • Logs page for searchable local event history.
  • Behaviour monitor for read-first discipline, exploration balance, bash reliance, and tool tempo.
  • Garden view for project/module/file activity, import graphs, and tree-sitter symbols.

How It Works

AgentGuard writes hook scripts into the agent’s config area:

  • Claude Code: ~/.claude/settings.json and ~/.claude/hooks/
  • Codex CLI: ~/.codex/hooks.json and ~/.codex/hooks/
  • Cursor IDE: ~/.cursor/hooks/

The hooks POST events to the local Tauri server. If the app is not running, hooks fail open so the agent is not stuck.

Local database:

~/.quilrdlpapp/proxy_requests.db

Build The App Yourself

Requirements:

  • Node.js
  • npm
  • Rust
  • Tauri system dependencies for your OS

Run:

npm install
npm run tauri dev

Build:

npm run tauri build

评论

暂无评论