Skip to content

Integration Guides

Rampart works with every major AI agent through multiple integration methods. Choose the guide for your agent below.

Integration Methods

Method How It Works Best For
Native Hooks Uses the agent's built-in hook system Claude Code, Cline
Shell Wrapper Sets $SHELL to a policy-checking shim Aider, OpenCode, Continue
MCP Proxy Transparent proxy for MCP tool calls Claude Desktop, Cursor
LD_PRELOAD Intercepts exec syscalls at the OS level Codex CLI, any process
HTTP API RESTful endpoint for custom integrations Python agents, custom code
Native Plugin Agent framework calls Rampart before each tool runs OpenClaw
Shim + Service Legacy shell shim + dist patching compatibility path Older OpenClaw
WebSocket Daemon WebSocket integration for real-time agents OpenClaw (legacy / alternative)

Ask Behavior

When a policy action is ask, behavior varies by integration:

Integration Behavior
Claude Code Hook returns "permissionDecision":"ask" — Claude Code shows native prompt
Cline Hook returns {"cancel":true} with approval message (no native ask)
MCP (Claude Desktop/Cursor) Proxy blocks, returns JSON-RPC error on deny
OpenClaw OpenClaw owns the visible approval UI; Rampart plugin supplies policy decisions
Shell Wrapper Shim blocks, command appears "hung" until resolved
LD_PRELOAD Library blocks exec call, process appears "hung"
HTTP API Returns "decision":"ask" with approval metadata when interactive review is required

Agent Compatibility

Agent Method Command Platforms
Claude Code Native hooks rampart setup claude-code All
Cline Native hooks rampart setup cline All
Cursor MCP proxy rampart mcp -- All
Claude Desktop MCP proxy rampart mcp -- All
Codex CLI Wrapper + preload rampart setup codex Linux, macOS*
OpenClaw Native plugin rampart setup openclaw Linux, macOS
Python Agents HTTP API rampart serve All
Any CLI Agent Shell wrapper rampart wrap -- Linux, macOS

* macOS preload coverage is best for Homebrew/user-installed binaries; SIP-protected system binaries cannot be interposed.

Choosing an Integration

Your agentIntegration method?rampart setup claude-code\nrampart setup clinerampart setup openclaw\nnative plugin on current buildsrampart mcp --rampart wrap --rampart preload --HTTP API / SDK\nlocalhost:9090 Claude Code or Cline\n(native hooks, lowest overhead)OpenClaw\n(native plugin on supported builds)Cursor, Claude Desktop\nor any MCP-compatible clientAny CLI agent\nwith $SHELL supportAny CLI agent\nwithout $SHELL or native hooksCustom / Python agent\nor CI pipeline

Start with the simplest method

Preferred order is: native hooks/plugin > wrap > MCP proxy > preload > HTTP API. Use the first one your agent supports cleanly.