Enables semantic vector memory in OpenClaw: memories stored with memory_store are embedded and indexed locally, then recalled on-demand via memory_recall — no full-context load.
/usr/local/lib/node_modules/openclawGo to aistudio.google.com → Get API key → Create API key.
bash
openclaw config set plugins.entries.memory-lancedb.enabled true
openclaw config set plugins.entries.memory-lancedb.config.embedding.baseUrl "https://generativelanguage.googleapis.com/v1beta/openai/"
openclaw config set plugins.entries.memory-lancedb.config.embedding.model "text-embedding-004"
openclaw config set plugins.entries.memory-lancedb.config.embedding.apiKey "YOUR_API_KEY"
openclaw config set plugins.entries.memory-lancedb.config.embedding.dimensions 768
bash
# Step 1: install main package in openclaw root
cd /usr/local/lib/node_modules/openclaw
npm install @lancedb/lancedb
# Step 2: install platform-specific native binding in plugin dir
cd /usr/local/lib/node_modules/openclaw/extensions/memory-lancedb
npm install @lancedb/lancedb-darwin-arm64 # Apple Silicon (arm64)
# npm install @lancedb/lancedb-darwin-x64 # Intel Mac
# npm install @lancedb/lancedb-linux-x64-gnu # Linux x64
LanceDB's native.js tries x64 first, hits break on failure, and never reaches arm64. Run the patch script:
bash
python3 ~/.openclaw/workspace/skills/memory-lancedb-setup/references/patch_native.py
bash
openclaw gateway restart
Then test:
text
memory_store → should return: Stored: "..."
memory_recall → should return matching entries with similarity %
If MEMORY.md is large, migrate key facts to the vector store and shrink MEMORY.md to a 20-30 line index. Group by topic and call memory_store for each:
Keep only "must-know-every-session" rules in MEMORY.md.
See references/troubleshooting.md for common errors and fixes.