OpenGuardrails for Openclaw

OpenGuardrails is an open-source runtime security plugin designed to protect AI agents from data exfiltration, prompt injection, and sensitive data leakage.

thomaslwang
v2.0.2
Feb 23, 2026
0
1.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install og-openclawguard-test

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install og-openclawguard-test using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is OpenGuardrails?

OpenGuardrails provides a robust security layer for AI agents, functioning as a local-first guardrail against critical threats. By integrating directly into the agent workflow, it monitors tool calls in real-time to block suspicious activities like shell escapes and unauthorized data transfers. As one of the most vital Openclaw Skills for production environments, it ensures that sensitive information like PII and credentials are sanitized before ever reaching an LLM provider.

The plugin operates with a privacy-first approach, offering local-only detection for common attack vectors while providing an optional cloud-based behavioral assessment for complex patterns. Whether you are building autonomous agents or internal tools, OpenGuardrails acts as a comprehensive AI Security Gateway that maintains data integrity and prevents malicious exploitation without compromising agent performance.

OpenGuardrails Use Cases

  • Prevent agents from sending sensitive local files like SSH keys or AWS credentials to external servers.
  • Redact prompt injection attacks hidden in web content or documents before the agent processes them.
  • Block malicious shell command injections and backtick substitutions in tool parameters.
  • Sanitize PII including emails, credit cards, and SSNs using a local proxy before data reaches cloud LLM providers.
  • Monitor agent behavior for statistical anomalies or unusual tool sequences that indicate hijacking.

How OpenGuardrails Works

  1. The plugin hooks into specific agent events including before_tool_call, after_tool_call, and tool_result_persist.
  2. It classifies tool calls in real-time, tracking file access and network requests across the session to detect exfiltration patterns.
  3. Local fast-path detection immediately blocks high-risk actions like reading credentials followed by an external web fetch.
  4. Content from files or web pages is scanned for injection patterns and redacted in-place to prevent task hijacking.
  5. Borderline behavioral signals are optionally sent to a cloud API for deeper assessment if the user has activated the feature.
  6. The agent receives clear feedback if an action is blocked, ensuring transparency and safety in the security logic.

OpenGuardrails Setup

Install the plugin via the CLI to add these security capabilities to your Openclaw Skills environment:

# Install from npm
openclaw plugins install @openguardrails/openclaw-security

To verify the installation and check the current security status, use the status command:

/og_status

For cloud-based behavioral assessment, activate the plugin to receive a claim URL and verification code:

/og_activate

OpenGuardrails Data Schema & Taxonomy

OpenGuardrails manages configuration and credentials locally to ensure security and persistence. The primary files include:

File Path Description
~/.openclaw/openclaw.json Main configuration file where plugin settings like blockOnRisk and apiKey are stored.
~/.openclaw/credentials/openguardrails/credentials.json Stores the unique Agent ID and API key used for cloud-based detection.

Sanitization Taxonomy:

  • <EMAIL>: Redacted email addresses detected in tool calls.
  • <SECRET>: API keys, tokens, and high-entropy secrets stripped before transmission.
  • <CREDIT_CARD>: Credit card and bank card numbers replaced by placeholders.
  • <IP_ADDRESS>: Internal and external IP addresses hidden from external providers.

OpenGuardrails Advanced Features

  • Local-first AI Security Gateway that acts as a transparent HTTP proxy for LLM API calls to sanitize data in-flight.
  • Behavioral assessment that identifies intent-action mismatches where tool sequences deviate from stated user goals.
  • Customizable risk levels including Critical, High, Medium, and Low that define whether to block or alert on specific patterns.
  • Fail-open design ensuring that network issues with cloud APIs never interrupt the agent's core functionality.
  • Multi-agent support where several Openclaw Skills can share a single security quota and centralized account dashboard.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*