Install
openclaw plugins install @censgate/openclaw-redactOpenClaw plugin for privacy-preserving LLM interactions via PII redaction
openclaw plugins install @censgate/openclaw-redact
PII redaction for OpenClaw, powered by Censgate Redact
OpenClaw plugin that calls the Rust Redact HTTP API on the LLM path and restores reversible placeholders after the model runs.
Quick start · Documentation · How it works · Configuration · Contributing
redact-api), not duplicated in TypeScriptghcr.io/censgate/redact:full, discover the mapped port, and retrypreLLMHook / postLLMHook integration with per-turn token storage for restoreThis package does not implement local pattern matching. It wraps the upstream engine and applies redaction/restoration in OpenClaw hooks.
engines in package.json)ghcr.io/censgate/redact:full) with ONNX-capable NER, or point the plugin at a hosted redact-api using REDACT_API_ENDPOINT / http.endpoint.1. Install the plugin
openclaw plugins install @censgate/openclaw-redact
2. Start or configure Redact
By default the plugin is enabled, uses reversible redaction, and calls http://127.0.0.1:8080. Start Redact yourself or set REDACT_API_ENDPOINT / http.endpoint to an existing trusted Redact API.
3. Optional — if you use a plugin allowlist, allow the plugin id and ensure it is enabled:
{
"plugins": {
"allow": ["censgate-redact"],
"entries": {
"censgate-redact": { "enabled": true }
}
}
}
Local Redact with Docker: start the API yourself, then align the endpoint:
docker run --rm -p 8080:8080 ghcr.io/censgate/redact:full
# Plugin defaults expect http://127.0.0.1:8080 (or set REDACT_API_ENDPOINT).
Optional auto-start: in trusted local development only, enable Docker auto-start with REDACT_DOCKER_AUTOSTART=true or http.docker.enabled: true.
openclaw plugins install @censgate/openclaw-redact (or npm install -g / npx patterns your OpenClaw version documents).npm install, npm run build, then point OpenClaw at the built extension per OpenClaw’s local-plugin instructions.Package id in OpenClaw: censgate-redact (see openclaw.plugin.json).
redact-api from censgate/redactghcr.io/censgate/redact:full — used by manual Docker runs and the opt-in Docker auto-start helperpreLLMHook calls POST /api/v1/analyze on the Redact API.[REDACTED:<ENTITY_TYPE>:<id>] placeholders in reversible mode (or non-reversible placeholders in irreversible mode).postLLMHook restores reversible placeholders using per-turn token storage.Reversible mode and memory: Restoration uses an in-memory map from placeholder to original substring for the current turn. The plugin does not encrypt those token entries or persist them to disk. Any process with access to the OpenClaw gateway memory could read them while they exist. For workflows where placeholders must not be reversible, use mode: "irreversible".
With no custom config, the plugin typically:
http://127.0.0.1:8080ghcr.io/censgate/redact:full, dynamic host port when hostPort is unset, and restart-on-failure behaviorentityTypes unset so Redact applies its full built-in recognizer set (broad PII / HIPAA / GDPR–oriented coverage)For sustained load, use an existing Redact endpoint, pin a stable host port if using Docker, raise timeouts, and optionally pre-pull the image. Example:
{
"plugins": {
"entries": {
"censgate-redact": {
"enabled": true,
"config": {
"mode": "reversible",
"excludeAgents": [],
"logRedactions": false,
"http": {
"endpoint": "http://127.0.0.1:18080",
"timeoutMs": 3000,
"language": "en",
"docker": {
"enabled": true,
"image": "ghcr.io/censgate/redact:full",
"containerName": "openclaw-redact-api",
"host": "127.0.0.1",
"hostPort": 18080,
"containerPort": 8080,
"pull": true,
"restartOnFailure": true,
"startupTimeoutMs": 45000,
"startupProbeIntervalMs": 500
}
}
}
}
}
}
}
Notes: Keep entityTypes unset unless you need a narrower scope. Use mode: "irreversible" for strictly untrusted downstream workflows. For multiple OpenClaw instances on one host, use unique containerName and hostPort values.
All variables below are optional configuration overrides. None are required for the plugin to run with defaults, and none are cloud or provider credentials. The plugin does not read REDACT_ENCRYPTION_KEY, REDACT_PERFORMANCE_MODE, or other undocumented REDACT_* names.
| Variable | Role |
|---|---|
REDACT_API_ENDPOINT | Redact base URL (default: http://127.0.0.1:8080) |
REDACT_ENTITY_TYPES | Comma-separated entity filter (optional) |
REDACT_DOCKER_AUTOSTART | true|false (default: false) |
REDACT_DOCKER_IMAGE | Default: ghcr.io/censgate/redact:full |
REDACT_DOCKER_CONTAINER_NAME | Default: openclaw-redact-api |
REDACT_DOCKER_HOST | Default: 127.0.0.1 |
REDACT_DOCKER_HOST_PORT | Optional; omit for dynamic port |
REDACT_DOCKER_CONTAINER_PORT | Default: 8080 |
REDACT_DOCKER_PULL | true|false (default: false) |
REDACT_DOCKER_RESTART_ON_FAILURE | true|false (default: true) |
REDACT_DOCKER_STARTUP_TIMEOUT_MS | Default: 30000 |
REDACT_DOCKER_STARTUP_PROBE_INTERVAL_MS | Default: 500 |
npm install
npm run build
npm test
Clean build artifacts and pack tarballs: make clean (or npm run clean).
This repository keeps package-local checks only:
npm run build
npm run typecheck
npm run lint
npm test
Docker-backed Redact verification, OpenClaw gateway E2E tests, mock LLM fixtures,
and latency benchmarks live in
censgate/openclaw-redact-benchmark.
See docs/VERIFICATION.md for details.
Latency probes are maintained in
censgate/openclaw-redact-benchmark
so the published plugin source remains focused on runtime code.
We welcome contributions. See CONTRIBUTING.md for setup, npm run lint / typecheck / test, and the security reporting process.
Star on GitHub if this plugin is useful to you.