Skip to main content

What is OpenClaw?

OpenClaw is a self-hosted AI agent framework that runs on your hardware. It supports multi-agent workflows, tool execution, and integrations with MCP servers — all controlled through a local gateway. Unbound offers two independent integrations for OpenClaw:
  1. Tool Policies Plugin — Enforce your organization’s security policies on every tool call your OpenClaw agents make
  2. Unbound as LLM Provider — Route OpenClaw’s LLM calls through the Unbound gateway for visibility, guardrails, and model routing
You can use either or both depending on your needs.

Prerequisites

  • OpenClaw: Version 2026.2.0 or higher
  • Node.js / npm: Required for plugin installation
  • Unbound Account: Sign up at gateway.getunbound.ai if you don’t have one

The setup script handles everything — authentication, plugin installation, configuration, and LLM provider setup. Open your terminal and run:
python3 -c "$(curl -s https://raw.githubusercontent.com/websentry-ai/setup/refs/heads/main/openclaw/setup.py)" --domain gateway.getunbound.ai
This will:
  1. Open your browser for authentication via the Unbound dashboard
  2. Install the unbound-openclaw-plugin npm package globally
  3. Configure the tool policies plugin in ~/.openclaw/openclaw.json
  4. Set up Unbound as the LLM provider
  5. Set the UNBOUND_OPENCLAW_API_KEY environment variable in your shell profile
Once complete, restart your terminal (or source your shell profile), then verify:
openclaw agent --local --agent main --message "hello world"

Setup Options

You can choose which components to install:
FlagDescription
--pluginInstall only the tool policies plugin
--providerInstall only the LLM provider
--model MODEL_IDUse a custom model (default: claude-sonnet-4-20250514)
If neither --plugin nor --provider is specified, both are installed. Examples:
# Plugin only (tool policies, no LLM routing)
python3 -c "$(curl -s https://raw.githubusercontent.com/websentry-ai/setup/refs/heads/main/openclaw/setup.py)" --domain gateway.getunbound.ai --plugin

# Provider only with a custom model
python3 -c "$(curl -s https://raw.githubusercontent.com/websentry-ai/setup/refs/heads/main/openclaw/setup.py)" --domain gateway.getunbound.ai --provider --model fireworks-ai/kimi-k2p5

# Both with a custom model
python3 -c "$(curl -s https://raw.githubusercontent.com/websentry-ai/setup/refs/heads/main/openclaw/setup.py)" --domain gateway.getunbound.ai --model claude-opus-4-20250514
Available models can be found at gateway.getunbound.ai/models.

Removing the Integration

To undo all changes (uninstalls plugin, removes config and environment variable):
python3 -c "$(curl -s https://raw.githubusercontent.com/websentry-ai/setup/refs/heads/main/openclaw/setup.py)" --clear

Verification

After setup, test that tool policies are working: Test 1: Safe command (should succeed)
openclaw agent --local --agent main --message "run this shell command: echo hello world"
Expected: The command executes successfully. Test 2: Blocked command (requires a Block policy for delete_file)
openclaw agent --local --agent main --message "run this shell command: rm -rf /tmp/test.txt"
Expected: [tools] exec failed: This command is blocked by your organization's policy.

Configuring Policies

Tool policies are managed at gateway.getunbound.ai/policies/tool-policies. You can create policies for:
  • Terminal commands — e.g., blocking file deletions, database operations, or script execution
  • MCP tools — e.g., blocking Slack messages or GitHub issue creation
Each policy can be set to Block (always denied) or Warn (allowed for OpenClaw, prompts for confirmation in Claude Code).

Manual Configuration

If you prefer to configure everything yourself instead of using the setup script:

Tool Policies Plugin

Step 1: Install the plugin:
npm install -g unbound-openclaw-plugin
Step 2: Add the plugin to ~/.openclaw/openclaw.json:
{
  "plugins": {
    "load": {
      "paths": ["<output of npm root -g>/unbound-openclaw-plugin"]
    },
    "entries": {
      "unbound-openclaw-plugin": {
        "enabled": true,
        "config": {
          "gatewayUrl": "https://api.getunbound.ai",
          "failOpen": true
        }
      }
    }
  }
}
Run npm root -g to find your global npm modules path, then append /unbound-openclaw-plugin for the load path.
Step 3: Set the API key in your shell profile:
export UNBOUND_OPENCLAW_API_KEY="your-api-key-here"
You can find your API key at gateway.getunbound.ai/connect.

Plugin Configuration Reference

OptionTypeDefaultDescription
gatewayUrlstringrequiredUnbound gateway URL (https://api.getunbound.ai)
apiKeystring$UNBOUND_OPENCLAW_API_KEYAPI key for authentication. Falls back to the environment variable
failOpenbooleantrueWhen true, tool calls proceed if the gateway is unreachable. Set to false to block all tool calls when the gateway is down

LLM Provider

Add the provider to ~/.openclaw/openclaw.json:
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "unbound/claude-sonnet-4-20250514"
      }
    }
  },
  "models": {
    "providers": {
      "unbound": {
        "baseUrl": "https://api.getunbound.ai/v1",
        "apiKey": "${UNBOUND_OPENCLAW_API_KEY}",
        "api": "openai-completions",
        "models": [
          {
            "id": "claude-sonnet-4-20250514",
            "name": "claude-sonnet-4-20250514",
            "contextWindow": 200000,
            "maxTokens": 8192
          }
        ]
      }
    }
  }
}
Replace claude-sonnet-4-20250514 with any model available on the gateway.

Security Benefits

Using OpenClaw with Unbound Security AI Gateway provides:
  • Request Monitoring: All AI requests are logged and monitored
  • Tool Policy Enforcement: Block dangerous terminal commands and MCP tool calls
  • Compliance: Ensure AI interactions meet your organization’s standards
  • Audit Trail: Complete visibility into AI usage patterns

Tool Policies

Configure terminal command and MCP tool policies

Available Models

Browse models available through the Unbound gateway