plugin/openclaw.plugin.json). The public installer and scripts/crystal-enable.sh write different defaults for local storage. Read the row that matches the command you ran.
Options
defaultRecallLimit (4) is the plugin’s own recall fan-in. maxMemories (12) is the injection block size. Hosted crystal_recall still defaults to 12 when a caller omits limit.
Two installers, two local-store defaults
The public installer (install-openclaw-plugin.sh) runs for a cloud backend from the universal Bash installer. When contextEngineMode, localStoreEnabled, and dbPath are all unset, it writes:
scripts/crystal-enable.sh is the older enabler used from a source checkout. When better-sqlite3 loads, it independently sets localStoreEnabled to true if that field is not a boolean, and contextEngineMode to full if no valid mode is set. An explicit dbPath alone does not prevent those choices. When SQLite is missing and the fields are unset, it removes contextEngineMode and leaves the schema default (reduced).
Agent scope
Policies partition visibility inside one account. They do not create a separate tenant. Use a separate Memory Crystal account when two customers must not share data. See Scoping.
For an identified agent without a matching policy,
channelScope defaults to shared mode. A session scope set by crystal_set_scope takes precedence. If a direct session has no agent identity but matches a prefix with a direct-peer policy, the runtime fails closed rather than falling into the shared bucket.
Peer ids derived from direct-session keys accept letters, digits, and _.@-, length 2–128. main, default, and unknown are reserved and rejected. Numeric-only ids are allowed when they match that pattern.
Example, with placeholders:
agent-a is per-peer. agent-b shares one bucket across its chats. Any other agent id on this prefix uses shared mode.
OpenClaw session keys
acceptOpenclawSessionKey defaults to false. Set it on a mode: "peer" policy when the peer id is only present in the session key. The runtime then accepts:
agent:<agentId>:<channel>:<account>:direct:<peerId>when the session agent id equals the policy<provider>:<peerId>when the provider name matches^[A-Za-z][A-Za-z0-9_-]{1,40}$
Commands from a source checkout
npm run crystal:doctor runs scripts/crystal-doctor.sh. Installed OpenClaw uses openclaw crystal_status and openclaw crystal_doctor instead.
Direct-session example
A peer policy can resolve a session key such as:Troubleshooting
Use the native plugin schema rather than the compatibility hook manifest when configuring OpenClaw. UseenableTriggers or actionTriggers; a non-empty list enables checks for every tool call, not only the listed names.
If scoped recall returns nothing, check the resolved agent identity, policy, and peer id. If local summaries are missing, check localStoreEnabled, localSummaryInjection, and which installer set them. full mode is an explicit choice with the public installer. It permits local compaction at the host session boundary; reduced keeps lean turn capture, and hook-only uses lifecycle hooks and tools.