unbound-openclaw-plugin
v0.1.1
Published
OpenClaw plugin for enforcing Unbound AI Gateway tool policies
Readme
@anthropic/openclaw-unbound-plugin
OpenClaw plugin that enforces Unbound AI Gateway tool policies. It hooks into OpenClaw's before_tool_call event and calls the gateway's /v1/hooks/pretool endpoint to check whether each tool invocation is allowed, denied, or requires approval.
Installation
Option A: Copy to extensions directory
cp -r openclaw-unbound-plugin ~/.openclaw/extensions/unbound-gatewayOption B: Install via npm
npm install @anthropic/openclaw-unbound-pluginThen add to your OpenClaw config:
{
"extensions": ["@anthropic/openclaw-unbound-plugin"]
}Configuration
Configure the plugin in your OpenClaw settings:
| Key | Type | Required | Default | Description |
|--------------|---------|----------|---------|------------------------------------------------------------------|
| gatewayUrl | string | Yes | - | Base URL of the Unbound AI Gateway |
| apiKey | string | No | - | API key for gateway auth. Falls back to UNBOUND_OPENCLAW_API_KEY env var |
| failOpen | boolean | No | true | Allow tool calls when the gateway is unreachable |
Example plugin config:
{
"gatewayUrl": "https://gateway.example.com",
"apiKey": "sk-...",
"failOpen": true
}Environment Variables
| Variable | Description |
|-------------------|------------------------------------------|
| UNBOUND_OPENCLAW_API_KEY | Fallback API key if not set in config |
Behavior
- Terminal tools (
exec): Sent astool_name: "Bash"with the command extracted from params. - MCP tools (
mcp__server__tool): Server and tool name extracted into metadata. - Other tools: Tool name passed as-is.
- Gateway response
"allow"proceeds normally. - Gateway responses
"deny"and"ask"both block the tool call (OpenClaw has no ask UI). - On network errors or timeouts (5s): proceeds if
failOpenis true (default), blocks otherwise. - If
gatewayUrlis not configured, the plugin logs a warning and does not register the hook.
