ClawSentry (OpenClaw Security Plugin)
claw-sentry is a security plugin for OpenClaw. It audits LLM traffic and key Agent lifecycle hook points to reduce harmful requests and sensitive data leakage.
Requirements
- OpenClaw:
>=2026.4.14
- Node.js:
>=22
Install
Volcengine
openclaw plugins install @volcengine/claw-sentry
openclaw config set plugins.entries.claw-sentry.hooks.allowConversationAccess true
BytePlus
openclaw plugins install @byteplus/claw-sentry
openclaw config set plugins.entries.claw-sentry.hooks.allowConversationAccess true
Enable
After installing the plugin package, enable it and restart the gateway:
openclaw plugins enable claw-sentry
openclaw gateway restart
Configuration
Configure the plugin in your OpenClaw config (fields are aligned with openclaw.plugin.json):
plugins:
claw-sentry:
enabled: true
config:
apiKey: "<encrypted-api-key>"
clawId: "<claw-id>"
ctEndpoint: "https://<control-endpoint>"
lmEndpoint: "https://<moderation-endpoint>"
asClawId: "<as-claw-id>"
configVersion: "<version-string>"
openClawDir: "<path-to-openclaw-state-dir>"
logRecord: false
enableFetch: false
enableBeforeToolCall: true
enableAfterToolCall: true
enableHeartbeat: true
timeoutMs: 30000
failureThreshold: 3
retryInterval: 60
maxRetryInterval: 3600
dlpInputGate:
mode: marker_only
language: "en"
Hooks & auditing
before_dispatch + before_prompt_build: collect moderation results and inject safe context into prompts.
before_tool_call: audit tool name/params (and optional tool-result context). The isGroup flag is derived from ctx.sessionKey (format agent:<id>:<channel>:group|direct:<target>).
after_tool_call: store tool result context for subsequent audits.
llm_input: capture LLM input (e.g. system prompt) for auditing/traceability.
agent_end: upload conversation record and clear per-session cached contexts.
- Degradation/circuit breaker: automatically bypasses checks when the security service is unavailable and probes for recovery.
Development
pnpm -C openclaw-plugin build
pnpm -C openclaw-plugin test
Publishing scripts are defined in openclaw-plugin/package.json (including beta and private tags).