Skip to content

GhostClaw Configuration Guide ​

Already running OpenClaw? Add GhostClaw in minutes.

This guide assumes you have a working OpenClaw (2026.3.2+) installation. Pick the integration path that fits your needs — from a 2-minute JSON config change to a full plugin install with slash commands and privacy receipts.


Prerequisites ​

RequirementDetails
OpenClawVersion 2026.3.2 or later (openclaw --version)
GhostAI API keyStarts with gst_ — create one at Settings > API Keys in your GhostAI instance
NemoClaw (optional)For sandbox policy enforcement

Set your API key:

bash
export GHOSTAI_API_KEY="gst_your_key_here"

Option A: Zero-Code Provider Config (3 min) ​

The fastest path. Edit your openclaw.json to route all LLM traffic through GhostAI:

json
{
  "models": {
    "providers": {
      "ghostclaw": {
        "api": "openai-completions",
        "baseUrl": "https://your-ghostai-instance.com/v1",
        "apiKey": "${GHOSTAI_API_KEY}",
        "models": [
          "openai/gpt-4o",
          "openai/gpt-4o-mini",
          "anthropic/claude-3.5-sonnet",
          "anthropic/claude-3-haiku",
          "google/gemini-1.5-pro"
        ]
      }
    }
  }
}

What happens: OpenClaw treats GhostAI as a standard OpenAI-compatible provider. Every message is PII-tokenized before the LLM sees it. Responses are automatically detokenized. Streaming works. No code changes, no plugins.

Select the provider in OpenClaw: When starting a conversation, choose "ghostclaw" from the model picker. All listed models route through GhostAI.

Limitations: No privacy receipts, no slash commands, no feedback badges. Protection is fully silent.


Option B: Zero-Code MCP Tools (2 min) ​

Add GhostAI's MCP tools so the agent can proactively scan text and files. This works alongside any provider — even without Option A:

json
{
  "mcp": {
    "ghostai": {
      "command": "ghostai-mcp",
      "env": {
        "GHOSTAI_BASE_URL": "https://your-ghostai-instance.com",
        "GHOSTAI_API_KEY": "${GHOSTAI_API_KEY}"
      }
    }
  }
}

Available tools:

ToolDescription
ghostai_detect_piiScan text, return entity types and locations
ghostai_sanitizeReplace PII with reversible tokens
ghostai_restoreRestore tokens to original values
ghostai_scan_fileDeep-scan files (PDF, Office, archives, DICOM, etc.)

Best combined with Option A: Provider config handles automatic protection; MCP tools add on-demand scanning for files and ad-hoc text.


Option C: Full Plugin Install (5 min) ​

The richest integration. Adds slash commands, onboarding wizard, privacy receipts, and agent tools:

bash
openclaw plugins install ghostclaw

Run the setup wizard:

/ghostclaw setup

The wizard validates your API key, lets you pick an industry vertical, and runs a test scan. After setup, you get:

  • Privacy receipts on every message with PII
  • 12 slash commands (/ghostclaw status, scan, explain, config, etc.)
  • Agent tools the AI can call proactively
  • Configurable feedback (auto/always/verbose/silent)
  • failMode control (block/warn/pass)

Configuring Verticals ​

GhostClaw supports 9 industry verticals, each with specialized entity detectors and compliance tagging:

/ghostclaw config vertical healthcare
VerticalKey EntitiesCompliance
generalNames, emails, phones, SSNs, credit cardsCCPA, GDPR
healthcarePHI, MRN, diagnosis codes, prescriptionsHIPAA §164.514
financialAccount numbers, routing, SWIFT, tax IDsPCI-DSS, SOX, GLBA
legalCase numbers, privileged communicationsAttorney-client privilege
governmentCUI markings, clearance levels, ITAR dataNIST 800-171, ITAR, EAR
technologyAPI keys, secrets, source code, IPsSOC 2, proprietary
educationStudent IDs, FERPA records, gradesFERPA
retailLoyalty numbers, purchase historyPCI-DSS, CCPA
manufacturingTrade secrets, formulations, patentsDTSA, proprietary

Via JSON config (no plugin needed):

json
{
  "mcp": {
    "ghostai": {
      "command": "ghostai-mcp",
      "env": {
        "GHOSTAI_BASE_URL": "https://your-ghostai-instance.com",
        "GHOSTAI_API_KEY": "${GHOSTAI_API_KEY}",
        "GHOSTAI_VERTICAL": "healthcare"
      }
    }
  }
}

Configuring Sensitivity ​

Control how aggressively GhostClaw detects PII:

/ghostclaw config sensitivity high
LevelBehavior
lowOnly high-confidence matches (>95%). Fewest false positives.
mediumBalanced detection (>85%). Good default for most use cases.
highAggressive detection (>70%). Catches more, may flag some non-PII.
paranoidMaximum detection (>50%). Use in regulated environments where false positives are acceptable.

Configuring Feedback Mode ​

Control what you see after each protected message:

/ghostclaw config feedback auto
ModeBehavior
autoShow badge only when PII was detected. Silent when clean. (default)
alwaysShow badge on every message, including "0 items — clean".
verboseShow full entity breakdown automatically (Layer 2 summary).
silentNo visible feedback. PII is still protected.

Configuring failMode ​

What happens when GhostAI is unreachable:

/ghostclaw config failMode warn
ModeBehaviorBest For
blockMessage is held — not sent to LLM.Compliance-critical environments (healthcare, finance).
warnMessage is sent unprotected. User sees a warning. (default)Balanced usability and safety.
passMessage is sent silently without protection.Non-sensitive use cases. Not recommended.

NemoClaw: Adding GhostAI to Sandbox Policy ​

If you're using NemoClaw, add GhostAI as an allowed egress endpoint in your sandbox's policies/network.yaml:

yaml
version: "1.0"
egress:
  default: deny
  allow:
    - host: "your-ghostai-instance.com"
      port: 443
      protocol: https
      paths:
        - "/v1/**"
        - "/api/detect"
        - "/api/pii/**"
      methods: [GET, POST]
      description: "GhostAI — mandatory privacy proxy"

This ensures the agent cannot bypass GhostClaw. All inference must route through GhostAI.

Apply the policy:

bash
nemoclaw policy apply

NemoClaw: Blueprint with GhostClaw Pre-Configured ​

For new sandbox environments, use the GhostClaw blueprint that bundles the plugin, provider config, and network policy:

bash
nemoclaw init my-agent --blueprint ghostclaw

This creates a sandbox with:

  • GhostAI as the only allowed inference gateway
  • GhostClaw plugin pre-installed
  • Provider config pointing at your GhostAI instance
  • Network policy denying direct LLM access

API Key Management ​

Rotating keys ​

GhostClaw handles key rotation without restart. Update the environment variable and the next API call uses the new key:

bash
export GHOSTAI_API_KEY="gst_new_key_here"

Or update via the wizard:

/ghostclaw setup

Key security ​

  • Keys are stored in OpenClaw's encrypted credential store (plugin) or environment variables (zero-code)
  • Never commit gst_ keys to version control
  • Use ${GHOSTAI_API_KEY} variable references in openclaw.json, not literal values
  • The plugin logs only the last 4 characters: gst_...7f3a

Key permissions ​

Your API key's tier determines available features:

FeatureFreePersonalTeamEnterprise
PII tokenizationPattern onlyFull pipelineFullFull
Audit trail—BasicFullFull + SIEM
Vertical compliance——YesYes
DSAR export———Yes
MCP toolsYesYesYesYes

Advanced: Hook Priority with Other Plugins ​

If you use other OpenClaw plugins that register before_llm_call hooks (like openclaw-shield), hook execution order matters.

Recommendation: Install GhostClaw before other security plugins so PII tokenization happens first:

bash
openclaw plugins install ghostclaw
openclaw plugins install openclaw-shield

Hooks execute in plugin registration order. GhostClaw tokenizes PII first, then other plugins process the already-tokenized content.

To verify plugin order:

bash
openclaw plugins list --verbose

Quick Reference ​

CommandDescription
/ghostclawProtection status for current session
/ghostclaw statusDetailed entity breakdown
/ghostclaw scan <text>Scan text without sending to AI
/ghostclaw explainDeep-dive on most recent detection
/ghostclaw configShow all settings
/ghostclaw config <key> <value>Change a setting
/ghostclaw vertical <name>Switch industry vertical
/ghostclaw sensitivity <level>Change detection sensitivity
/ghostclaw historyRecent PII detections
/ghostclaw exportDSAR export (GDPR)
/ghostclaw setupRe-run onboarding
/ghostclaw helpShow all commands

For the full installation walkthrough, see the Full Lab Guide. For live demos, see the Demo Script.

SOC 2 Type II Certified | BAA Available | HIPAA-Ready