Actions
Actions determine what happens when a policy rule matches a tool call. Rampart supports four core actions plus webhook delegation.Action Types
The decision to apply when a rule matches. Every rule must specify an action.Options:
deny- Block the tool callallow- Permit the tool callwatch- Permit but flag for review (formerlylog)ask- Block until human approves/denieswebhook- Delegate decision to external HTTP endpoint
Deny Action
Blocks the tool call immediately. The agent receives an error message and the call never executes.Optional error message shown to the agent. If omitted, Rampart generates a default message.
Deny Always Wins
If any policy denies a tool call, the call is denied regardless of other policies. Use this for security-critical rules:Allow Action
Permits the tool call to execute normally. Use for explicit allowlists or to override lower-priority denies.Allow actions are useful in
paranoid mode (default_action: deny) to create explicit allowlists.Watch Action
Permits the tool call but flags it for review. Logged events appear in audit trail and dashboard with a warning indicator.Optional audit annotation. Appears in logs and dashboard.
Watch vs Log
log is a deprecated alias for watch. New policies should use watch:
Ask Action
Blocks the tool call until a human approves or denies it. How approval reaches you depends on the environment:Approval Flow by Environment
| Environment | How It Works |
|---|---|
| Claude Code | Native approval prompt in UI |
| MCP Client | Proxy holds request, resolve via API/dashboard |
| OpenClaw | Chat message with inline approve/deny |
| Webhook | Notification with HMAC-signed approve/deny links |
| CLI/API | Manual resolution with rampart approve <id> |
Ask Configuration
Optional configuration for ask actions.
Approval Timeout
Pending approvals expire after 1 hour by default. Configure with--approval-timeout:
Managing Approvals
require_approval Alias
require_approval is a deprecated alias for ask with audit: true. New policies should use ask:
Webhook Action
Delegates the allow/deny decision to an external HTTP endpoint. Use for LLM-based intent verification, Slack approval bots, or custom logic.Webhook Configuration
Webhook endpoint configuration. Required when
action: webhook.Webhook Request Format
Rampart sends POST requests with this payload:Webhook Response Format
Your endpoint must return JSON with adecision field:
Reference Implementation
See rampart-verify for an LLM-based verification sidecar:- Uses gpt-4o-mini, Claude Haiku, or local Ollama
- Classifies ambiguous commands at ~$0.0001/call
- Handles 95% of decisions via pattern matching, LLM reviews the rest
Action Priority
When multiple policies match a tool call:- Deny always wins - If any policy denies, the call is denied
- Priority ordering - Lower priority number = evaluated first
- First match within policy - Rules evaluate top-to-bottom
- No match -
default_actionapplies
Complete Examples
Multi-Action Policy
Webhook with Fallback
CI/Headless Mode
Validation Rules
Required Fields
- Every rule must have an
action action: webhookrequireswebhook.url- If
messageis provided, it must be non-empty
Action Values
- Valid:
deny,allow,watch,ask,webhook - Deprecated but accepted:
log(alias forwatch),require_approval(alias foraskwith audit)
Best Practices
Deny First
Place deny rules at the top of your policy for maximum security. Deny always wins.
Use Priority
Assign priority 1 to critical security rules, priority 100 to defaults.
Fail Open for Webhooks
Set
fail_open: true so webhook downtime doesn’t block your agent.Audit Important Approvals
Enable
ask.audit: true for deployment and privileged commands.Next Steps
- Configure Webhooks for external verification
- Learn about Match Conditions
- Review Policy Structure