What this means in practice
Important plugin-facing settings include things like:- API key / backend URL
- default recall mode
- default recall limit
- optional global channel scoping
- optional per-agent scope policies
- local summary behavior
Most important options
One API key, mixed agent scopes
The shipped model now supports one API key for both private and shared agents. Use:mode: "peer"for agents likecoachorcoach-beta- captures/recalls resolve to
scope:{peerId} - use this for strict per-client isolation
- captures/recalls resolve to
mode: "shared"for internal/content agents likedm-replies,support-bot,social-media, etc.- captures/recalls resolve to
scope:main - use this for open/shared knowledge across chats
- captures/recalls resolve to
- explicit
agentScopePoliciesoverridechannelScope - if no policy matches, Memory Crystal falls back to the legacy/global
channelScope - this preserves backward compatibility for existing installs
OpenClaw direct-session peer derivation
Some self-hosted OpenClaw deployments provide the peer id only in the session key, for example:mode: "peer" policies,
requires the session agent id to match the policy agentId, accepts only
agent:<agentId>:<channel>:<account>:direct:<numericPeerId>, and still rejects
reserved peers such as main, default, and unknown. Memory search/message
tool results are exact-channel filtered before they are surfaced.
Installer behavior
The installer/enabler is now conservative:- if you already set
contextEngineMode,localStoreEnabled, ordbPath, it preserves those choices - if local SQLite (
better-sqlite3) is available and you have not explicitly configured those fields, it automatically enables:localStoreEnabled: truecontextEngineMode: "full"
- if SQLite is unavailable, it leaves installs safely in reduced mode
How it actually works
The main plugin config shape is defined in:plugin/openclaw.plugin.json
plugin/index.js
scripts/crystal-enable.shscripts/crystal-doctor.sh
Commands / examples
Safe validation:Common mistakes
- reading the legacy hook manifest and assuming it is the only config surface
- documenting defaults without checking the actual plugin schema
- forgetting the operational scripts that wire the plugin into OpenClaw
Source of truth
Primary files behind this page:plugin/openclaw.plugin.jsonplugin/index.jsscripts/crystal-enable.shscripts/crystal-doctor.sh