Upgrading from 4.x? 5.x needs Node 22.14+ or 24+; Node 20 and 23 are unsupported. On Node 20, npm warns and still installs unless engine-strict is set; the database engine will not load. Read the guide.
Integration
ShieldCortex for OpenClaw
Native hook and plugin in three commands. The tool gate stays off until you enable it. Optional Cloud sync adds one more command.
Native Setup in Three Commands
Local memory and security need no account. Cloud sync is optional and adds one more command.
Install the session hook from the main ShieldCortex package
Install the standalone real-time OpenClaw plugin package
Reload OpenClaw. Action Guard stays off until shieldcortex config --action-guard-enable or sudo shieldcortex protect
Requires Node.js 22.14+ or Node 24+ (not Node 20, not Node 23). On Node 20, npm warns and still installs unless engine-strict is set; the native module will not load.
Existing installs can keep using npm install -g shieldcortex and shieldcortex openclaw install. Use the wrapper once if you need legacy hook migration or duplicate cleanup.
Optional Cloud sync once you have a Cloud API key from your dashboard (free tier included):
Onboard Your Team
Adding a developer or server to an Enterprise rollout? Give them a Cloud API key from your dashboard, your Enterprise licence key if you have one, and the exact commands below.
What you give them
- 1. A Cloud API key from your dashboard (plus your Enterprise licence key, if issued)
- 2. The install, config, and worker commands below
What happens automatically
- Their device appears in your Cloud dashboard
- Every scan syncs audit metadata to the team
- Threats are visible to the whole team in real time
Headless servers need the persistent worker.
Install ShieldCortex, set the Cloud API key, enable cloud sync, then run shieldcortex service install --headless. In Cloud, online means a recent ShieldCortex heartbeat, not just that the machine is powered on.
Server / Team Cloud Onboarding
shieldcortex license statusshieldcortex config --cloud-statusshieldcortex service statusWhat the OpenClaw Hook and Plugin Do
Session Start During Session Session End (/new, /stop)
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Native │ │ Keyword │ │ Auto-extract│
│ Memory │ │ triggers │ │ /new, /stop │
│ Search │ │ dormant │ │ if enabled │
└─────────────┘ └─────────────┘ └─────────────┘
| Hook | When | What it does |
|---|---|---|
| SessionStart | Session begins | OpenClaw's own Memory Search recalls context. ShieldCortex stopped injecting bootstrap context in v2026.2.26. Prompt-time recall into Claude Code is not automatic. |
| /new, /stop | Session end | When openclawAutoMemory is true, reads the assistant text in the last 30 transcript lines (from at most the final 64 KiB) and extracts candidates: up to 5 by regex, or up to 8 when a distillation provider resolves. If the distillation call fails, that run skips capture. Candidates are deduplicated before write, so a run can save none. /stop memories are tagged session-stop; core OpenClaw 2026.9.6 shows no “Saved N memories” note on /stop. Off when the key is unset. A fresh global, non-CI npm install -g with no config file writes it true when that write succeeds. An existing config is never changed. |
| Keyword Trigger | During session | The phrases exist in the hook, but they are dormant. The hook subscribes to command:new, command:stop, and agent:bootstrap only. Core OpenClaw 2026.9.6 does not route message events to it, so “remember this:” is not saved. |
| Tool Call Interceptor New | Before tool execution | Bound on before_tool_call; Action Guard is off by default. When on and enforcing, OpenClaw holds a recognised dangerous call for approval only where an approval surface is available, unless it is pre-approved or the optional broker resolves it. Unattended calls follow the failure policy, which by default denies high and critical and allows low and medium. Watch only and enforce when ready let the ordinary dangerous tier proceed and record it; while the guard is on, recognised catastrophic calls are blocked in every posture and are never approvable, and calls that would change the guard's own state or config stay held or, with no approver, denied in every posture, and enforce when ready stays in shadow until reviewed evidence for the running version exists, which none ships yet (postures and limits). A held call is shown as a plain-English approval card on OpenClaw's own approval channel (5.6); the 5.18 webhook card is sent by the Claude Code hook, and the plugin's gateway notifications carry no card. Requires OpenClaw 2026.4.23+, the plugin's declared minimum. |
| Conversation firewall | Each turn | llm_input scans the prompt and recent history through the defence pipeline and can only observe. before_agent_run is the enforcement point. Posture is interceptor.conversation.posture: observe (default) audits and alerts but never stops the turn; enforce blocks the run on a dirty verdict and needs OpenClaw 2026.5.12+; off scans nothing. A scan that did not complete is recorded as unavailable, never as clean. Either scanning hook needs the host's hooks.allowConversationAccess grant, which a plain install never adds. No row on the conversation path carries prompt text: rows record a character count and a content-hash prefix, and an injection hit names its rules as closed-set category:pattern ids (5.18.2). |
6-Layer Defence Pipeline
The defence pipeline scans the writes that go through ShieldCortex via its MCP tools, hooks, and the OpenClaw plugin's memory path before storage, not the agent's own files or other memory stores. Semantic analysis runs asynchronously on the deep-scan path — additive escalation only, and it degrades gracefully when no embedding model is available.
Tool Call Interceptor
NewThe before-tool-call guard is off by default. When on and enforcing, OpenClaw holds a recognised dangerous call for approval only where an approval surface is available, unless it is pre-approved or the optional broker resolves it. Unattended calls follow the failure policy, which by default denies high and critical and allows low and medium. Watch only and enforce when ready let the ordinary dangerous tier proceed and record it; while the guard is on, recognised catastrophic calls are blocked in every posture and are never approvable, and calls that would change the guard's own state or config stay held or, with no approver, denied in every posture, and enforce when ready stays in shadow until reviewed evidence for the running version exists, which none ships yet (postures and limits).
X-Ray Memory Guard
X-Ray scans the writes that go through ShieldCortex on the enabled OpenClaw plugin's memory path (remember and mcp__memory__remember) before storage. Protection follows what the guard recognises; this is not blanket coverage of agent files or other memory stores. Learn more →
Cross-Tool Sync
Memories stored in ~/.shieldcortex/memories.db are immediately available in Claude Code sessions too. Same brain, multiple tools.
Auto-Memory Configuration
Auto-memory is off when openclawAutoMemory is unset. A fresh global, non-CI install with no config file writes it true when that write succeeds; local and CI installs do not. The key does nothing until the hook is installed and enabled in OpenClaw (shieldcortex openclaw install or shieldcortex setup). Keyword triggers are dormant on core OpenClaw 2026.9.6.
| Config Key | Default | Description |
|---|---|---|
| openclawAutoMemory | off if unset; true after a successful fresh global, non-CI install with no config file | Extract memories from OpenClaw at session end (/new, /stop) once the hook is installed. An existing config file is never overwritten. |
| openclawAutoMemoryDedupe | true | Deduplicate against existing memories before writing |
| openclawAutoMemoryNoveltyThreshold | 0.88 | Minimum novelty score (0.6–0.99) to save a memory. Higher = stricter |
| openclawAutoMemoryMaxRecent | 300 | Number of recent memories to check for duplicates (50–1000) |
Enable via CLI:
Or edit ~/.shieldcortex/config.json:
{
"openclawAutoMemory": true,
"openclawAutoMemoryDedupe": true,
"openclawAutoMemoryNoveltyThreshold": 0.88
}
These settings can also be adjusted from the OpenClaw Memory Panel in the local dashboard.
Use With Any Memory Backend
ShieldCortex doesn't have to be your memory system — it can guard someone else's.
The ShieldCortexGuardedMemoryBridge wraps any external memory backend with the full 6-layer defence pipeline. Only writes routed through the bridge are scanned before reaching your storage.
import {
ShieldCortexGuardedMemoryBridge,
MarkdownMemoryBackend
} from 'shieldcortex';
const bridge = new ShieldCortexGuardedMemoryBridge(
new MarkdownMemoryBackend('/path/to/MEMORY.md')
);
// Writes through bridge.save are scanned before reaching your backend
const result = await bridge.save({
title: 'Database config',
content: 'Using PostgreSQL with connection pooling'
});
if (!result.allowed) {
console.log('Blocked:', result.defence.firewall.reason);
}
MarkdownMemoryBackend
Any Markdown file
OpenClawMarkdownBackend
OpenClaw MEMORY.md format
ExternalMemoryBackend
Implement for custom backends
Audit Metadata in One Cloud Dashboard
Opt-in: once cloud sync is enabled with a Cloud API key, each connected device sends audit metadata, not content, to ShieldCortex Cloud. What syncs.
Audit Logs
Full forensic trail of every scan, with trust scores and threat classifications.
Threat Timeline
Visualise attacks as they happen across your entire team.
Device Tracking
See which machines are connected, their scan activity, and last seen times.
CLI Reference
Free to Start
Local (free)
- ✓ Unlimited local scans
- ✓ Full 6-layer defence pipeline
- ✓ Persistent memory + semantic search
- ✓ Local dashboard + API
Cloud (free tier included)
- ✓ 500 scans/month
- ✓ 7-day audit retention
- ✓ 1 team member
- Pricing →
Ready to Protect Your OpenClaw Agent?
Native hook and plugin install. Under a minute. Free.