rampart

OpenClaw Approval Flow

Overview

Rampart and OpenClaw can work together to enforce human-in-the-loop control for risky agent actions.

Architecture

Agent → Rampart Shim → Rampart HTTP API → action: ask
                                        → 202 + approval_id
                                        → webhook fires to Discord/Slack
                                        → OpenClaw receives notification
                                        → User approves in chat
                                        → OpenClaw calls resolve API
                                        → Shim unblocks → command executes

Configuration Example

# rampart.yaml
notify:
  url: "https://discord.com/api/webhooks/..."
  platform: discord
  on: [deny, ask]

policies:
  - name: dangerous-commands
    match:
      tool: [exec]
    rules:
      - action: ask
        when:
          command_matches: ["^(rm|terraform|kubectl delete)"]
        message: "Requires human approval"

OpenClaw Integration

OpenClaw can act as the chat-side resolver:

Resolve API Examples

# Approve
curl -X POST http://localhost:9090/v1/approvals/{id}/resolve \
  -H "Content-Type: application/json" \
  -d '{"approved": true, "resolved_by": "trevor@discord"}'

# Deny
curl -X POST http://localhost:9090/v1/approvals/{id}/resolve \
  -H "Content-Type: application/json" \
  -d '{"approved": false, "resolved_by": "trevor@discord"}'