Quick Start¶
First time?
Check out the 5-minute tutorial — it walks you through install, your first blocked command, and approval flow hands-on.
Get Rampart protecting your AI agent in one command.
Before you dive in, skim the integration support matrix if you want the exact truth about serve requirements, approval UX, and support tiers for each surface.
Zero risk to try
Protection behavior depends on the integration. Claude Code and Cline native hooks can evaluate policy locally without rampart serve. rampart serve is still useful for dashboard views, audit APIs, and external approval workflows. OpenClaw's native plugin depends on rampart serve for policy evaluation.
Install¶
One-Command Setup¶
This detects your agent (Claude Code, Codex, Cline, OpenClaw), installs the service, wires up the right integration path, and verifies everything is working. Done.
Then use your agent normally. Rampart is invisible until something needs to be blocked or approved.
If you want persistent local defaults instead of exporting env vars, add this:
See Configuration for the full url / serve_url / api story.
Other Agents¶
Native plugin path on current OpenClaw builds. rampart serve is required for policy evaluation here.
Verify It's Working¶
Doctor should tell you which integration path is active, whether serve is optional or required for that path, and what coverage gaps remain. If something's off, it should tell you exactly what to fix.
Test the Policy Engine¶
Test decisions without running an agent:
rampart test "rm -rf /"
# → deny (block-destructive)
rampart test "git push origin main"
# → allow (or ask if you've configured it)
You can also write test suites to verify your policies in CI. See the Testing Policies guide.
Or pipe a raw hook payload:
{"hookSpecificOutput":{"permissionDecision":"deny","permissionDecisionReason":"Rampart: Destructive command blocked"}}
Approval UX by Integration¶
When a command hits an ask rule, the approval UX depends on the integration:
- Claude Code native hooks: Claude shows its native approval prompt
- Cline hooks: command is canceled with an approval-required message (no native ask UI)
- OpenClaw plugin: OpenClaw owns the visible approval UI
- Headless / external approval flows: use
rampart serve+ dashboard/watch
To use the dashboard-based approval flow, run:
The dashboard shows pending approvals, audit history, and your loaded policy. For agent team runs (multiple sub-agents in one session), approvals are grouped — one click to approve the whole run.
Serve is not universal
For direct Claude Code hooks, rampart serve is optional for local protection. It becomes important when you want dashboard visibility, approval APIs, headless-only approval flows, or integrations like OpenClaw that delegate policy evaluation through the local service.
Built-in Profiles¶
Rampart ships with three starting policies:
| Profile | Default Action | What it does |
|---|---|---|
standard | allow | Block dangerous commands, watch suspicious ones, allow the rest |
paranoid | deny | Explicit allowlist — everything blocked unless permitted |
yolo | allow | Watch everything, block nothing — observation only |
research-agent | allow | Tuned for web-heavy research agents; restricts exfiltration, allows broad fetch |
mcp-server | deny | Conservative default for MCP server deployments; explicit allows required |
See all profiles
Run rampart policy list to see every available built-in profile and any policy files you've added.
Customize Your Rules¶
When Rampart blocks something it shouldn't, unblock it in one command — no YAML editing required.
Allow a blocked command¶
Adds an allow rule for npm install <anything> to your overrides and hot-reloads the daemon immediately.
For file-based overrides, use --tool:
Block an additional command¶
See your override rules¶
Override Rules
──────────────────────────────────────────────────────────────
Global (~/.rampart/policies/user-overrides.yaml)
# ACTION TOOL PATTERN ADDED
1 allow exec npm install * just now
2 deny exec curl * | bash 2 hours ago
Remove a rule¶
Reset all override rules¶
Denial hints
When Rampart blocks a command, the error message shows the exact rampart allow command to run. Copy-paste to unblock.
Self-modification protection
rampart allow, rampart block, and rampart rules are blocked when run by an AI agent. Run them yourself in a terminal. This prevents agents from bypassing their own constraints.
For a full guide on scoping rules per-project and advanced options, see Customizing Policy →.
What's Next?¶
- 5-Minute Tutorial → — Hands-on walkthrough with real examples
- Configuration → — Write custom policies
- Customizing Policy → — Full guide to allow/block/rules
- Integration Guides → — Cline, Cursor, Codex, MCP
- Policy Engine → — Conditions, rule priority, glob patterns