OpenClaw integration, minus the hand-waving
If you already use OpenClaw, Memory Crystal should behave like native infrastructure: invisible when healthy, obvious when broken.
Integration model
Memory Crystal hooks into three phases:
- Capture hook after assistant/user messages settle
- Wake hook when a session starts
- Recall hook during relevant queries
That means you don’t manually serialize context. The plugin does it continuously.
Install in workspace mode
cd /Users/gerald/projects/memorycrystal
npm install @memorycrystal/openclaw-plugin
Then register plugin config:
{
"plugins": {
"memory-crystal": {
"enabled": true,
"apiKeyEnv": "MEMORY_CRYSTAL_API_KEY",
"wakeBriefing": true,
"maxRecallItems": 8
}
}
}
Wake briefings explained
Wake briefing is not just “recent chat.” It combines:
- high-salience long-term memories
- recent message matches
- open goals/decisions if present
This gives the model a compact operational snapshot before any user prompt.
Recall flow under the hood
When you ask something memory-relevant, the plugin:
- builds a semantic query from current user intent
- searches vector memory + graph edges
- re-ranks by recency, salience, and relationship proximity
- injects top memories as context snippets
The model never sees the entire database. It sees the top-ranked slice.
Hook reliability checklist
- log hook registration at startup
- fail closed on invalid key (don’t pretend memory works)
- idempotent install scripts for upgrades
- structured errors for 401/429/500
Debugging empty recall
Run a controlled test:
- Save deterministic fact: “Project codename is Aurora-7.”
- Start new session.
- Ask: “What is project codename?”
If empty, check API key, namespace, and whether capture events fire.
Production tuning
- Keep
maxRecallItemssmall (6–10) - Use category-aware recall modes (decision/project/people)
- checkpoint after releases and incident retros
OpenClaw performs best when memory context is sharp, not bloated.
Bottom line
Integration is straightforward. The hard part is memory hygiene and retrieval quality. Get hooks stable first, then optimize ranking.