pegasi-ai/reins
关于
阻止 AI 智能体擅自执行你未要求的操作。
人工智能与机器学习实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文In Greek myth, Athena gave Bellerophon the golden bridle — reins included — that let him guide Pegasus. Reins applies the same idea to AI agents: raw power is not enough — what matters is making it controllable.
Reins enforces deterministic security policies on every agent action, scans your configs for OWASP ASI10 vulnerabilities, and tracks drift over time. Policies evaluate in under 50ms. Works with Claude Code PreToolUse and PostToolUse hooks, OpenClaw, and any MCP-compatible agent.
Quickstart
npm install -g @pegasi-ai/reins
reins init
Purple-team quickstart
Compare an agent's shell permissions and installed skill manifests before and after a configuration change. The offline viewer shows which OWASP Agentic Skills Top 10 categories have related scan evidence and which still need review.

The preview uses a real Reins fixture scan and synthetic ARTEX findings and Shirudo verifier results.
1. Clone and run the exercise. From a terminal with Git, Node.js 18 or later, and npm, run:
git clone https://github.com/pegasi-ai/reins.git
cd reins
npm ci --ignore-scripts
npm run build
node scripts/purple-demo.cjs > purple-review.json
2. Review the results in Codex. Open the cloned reins folder in Codex and paste this prompt into a new chat. The checkout includes the purple-team skill.
$reins-purple-review Review purple-review.json. Which checks changed after the configuration edits, and which OWASP Agentic Skills risks still need evidence?
3. Open the local viewer. Double-click docs/purple-review/index.html in the checkout. Use Theme to choose Dark, Light, or System. Choose Open reports and select purple-review.json from the repo root. Look for SHELL_COMMAND_ALLOWLIST changing from FAIL to PASS and CLAWHAVOC_IOC from WARN to PASS. Select Need evidence to see the gaps.
To explore the viewer without building, open the same HTML file and load the bundled docs/purple-review/example.json. You can also load a saved ARTEX findings export and a Shirudo verifier JSON alongside the scan.
Claude Code Skill
The Claude Code skill documents the Reins plugin hooks. To copy its instructions into your personal skills directory from this checkout, run:
mkdir -p ~/.claude/skills/reins
cp plugin/skills/reins/SKILL.md ~/.claude/skills/reins/SKILL.md
Demo

An OpenClaw agent tries to bulk-delete 4,382 Gmail messages. Reins blocks it before execution.
What Reins does
- Prevent — Block destructive actions before execution. Score irreversibility. Detect risky browser state.
- Pause — Route high-impact actions through terminal or messaging approval flows. Require explicit
CONFIRM-*tokens for catastrophic operations. - Prove — Preserve an immutable audit trail of every decision, approval, and block.
Security guarantees
- Zero Trust — every action evaluated before execution
- Synchronous — agent cannot proceed until the hook exits
- No network in the hot path — policies cached locally, enforced offline
- Fail-closed — any unhandled hook error blocks the action
- Immutable audit — append-only JSONL at
~/.openclaw/reins/decisions.jsonl
Documentation
Full docs at reins.sh/docs:
- Getting Started
- How It Works
- Security Policies
- CLI Reference
- Security Scan
- Reins Cloud
- Use as a Library
- Architecture
Contributing
PRs welcome. See CONTRIBUTING.md.
License
Apache 2.0 — see LICENSE.
探索相关项目
加载中…