Rampart and OpenClaw can work together to enforce human-in-the-loop control for risky agent actions.
action: ask (with audit: true), Rampart returns 202 Accepted plus an approval_id.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
# 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 can act as the chat-side resolver:
approval_id, resolve_url, and expires_at.# 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"}'