Flow
- A completed turn is captured once into short-term messages. You can turn that off. On OpenClaw,
captureTurnsdefaults to on, andMEMORY_CRYSTAL_CAPTURE_TURNSoverrides it. - Distillation reads eligible turns and writes durable memories.
- Recall returns a bounded set. It does not always run a vector lookup. An identifier shortcut or a missing embedding provider skips vector work and still returns lexical matches. The response says when retrieval was degraded or took the shortcut.
- Recent unextracted messages can contribute lexical evidence, inside a bounded message lane.
- Ranking and scope filters pick the result set.
- Knowledge bases, assets, and research are queried only through their own tools.
MEMORY_CRYSTAL_INJECT_RECALL=1 or true, or set injectRecall: true in config. A non-empty environment variable takes precedence over config. Grok cannot inject.
What is kept
On the hosted service and by default when self-hosting, raw messages and raw sensory content stay until you delete them. Self-hosters who set
CRYSTAL_RETENTION_READY=1 enable age-based expiry jobs; retention then follows the tier’s expiry policy.
Distillation
Distillation is its own job. It is not Forgetting and it is not the stale archive.Forgetting
Forgetting archives memories only when the account is over its non-KB allowance.- It counts active memories that are not knowledge-base chunks.
- Unlimited has no allowance, so Forgetting archives nothing for that entitlement.
- It protects memories from the last 24 hours.
- It archives the overage, lowest memory value first. It does not delete the row.
- Enforcement is off unless
CRYSTAL_FORGETTING_ENFORCEMENT=1. A dry run reports what would be archived and writes nothing.
Stale archive
The stale archive is archive-only and restorable. It does not delete memories.CRYSTAL_STALE_ARCHIVE controls it:
The check is scheduled at 05:30 UTC. It only acts when the mode is
dry_run or on.
On the hosted service the stale archive is being enabled in October 2026 after a trial.
A memory is eligible when all of these hold:
- active, not in a knowledge base, not sensory, and auto-extracted
- not a rule, a decision, or a memory about a person
- strength below 0.85
- not core, and no
coretag (any case) - created, last accessed, and last recalled (when that timestamp exists) at least 90 days ago
Choose the right read tool
Usecrystal_recall for a decision or fact distilled from past conversations:
truncated, use crystal_get_memory for its full text.
Use crystal_recent to catch up on the latest conversation, without a search query:
crystal_search_messages when you need original wording rather than a distilled memory:
pagination.nextOffset while pagination.hasMore is true before concluding the window has no more matches. Keep the same channel or session scope across requests when you need a particular conversation. See Recall, Recent messages, and Search.
OpenClaw loop
- The user sends a message and the model replies.
- The plugin records the completed turn once, unless capture is disabled.
- The agent calls Memory Crystal tools when prior context matters.
- If you set
MEMORY_CRYSTAL_INJECT_RECALL=true, the plugin may prepend bounded context before the model call.