memory-lancedb-pro-openclaw
memory-lancedb-pro-openclaw — an installable skill for AI agents.
By reason-machines · 1,282 installs
npx skills add reason-machines/trending-skills --skill memory-lancedb-pro-openclaw
Source repository · Upstream listing
memory lancedb pro OpenClaw Plugin
Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
memory lancedb pro is a production grade long term memory plugin for [OpenClaw](https://github.com/openclaw/openclaw) agents. It stores preferences, decisions, and project context in a local [LanceDB](https://lancedb.com) vector database and automatically recalls relevant memories before each agent reply. Key features: hybrid retrieval (vector + BM25 full text), cross encoder reranking, LLM powered smart extraction (6 categories), Weibull decay based forgetting, multi scope isolation (agent/user/project), and a full management CLI.
Installation
Option A: One Click Setup Script (Recommended)
Flags:
The script handles fresh installs, upgrades from git cloned versions, invalid config fields, broken CLI fallback, and provider presets (Jina, DashScope, SiliconFlow, OpenAI, Ollama).
Option B: OpenClaw CLI
Option C: npm
Critical: When installing via npm, you must add the plugin's absolute install path to plugins.load.paths in openclaw.json . This is the most common setup issue.
Minimal Configuration ( openclaw.json )
Why these defaults:
autoCapture + smartExtraction → agent learns from conversations automatically, no manual calls needed
autoRecall → memories injected before each reply
extractMinMessages: 2 → triggers in normal two turn chats
sessionMemory.enabled: false → avoids polluting retrieval with session summaries early on
Full Production Configuration
Provider Options for Embedding
Provider provider value Notes
OpenAI / compatible "openai compatible" Requires apiKey , optional baseURL
Jina "jina" Requires apiKey
Gemini "gemini" Requires apiKey
Ollama "ollama" Local, zero API cost, set baseURL
DashScope "dashscope" Requires apiKey
SiliconFlow "siliconflow" Requires apiKey , free reranker tier
Deployment Plans
Full Power (Jina + OpenAI):
Budget (SiliconFlow free reranker):
Fully Local (Ollama, zero API cost):
CLI Reference
Validate config and restart after any changes:
Expected startup log output:
Memory Management CLI
MCP Tool API
The plugin exposes MCP tools to the agent. Core tools are always available; management tools require enableManagementTools: true in config.
Core Tools (always available)
memory recall
Retrieve relevant memories for a query.
memory store
Manually store a memory.
memory forget
Delete a specific memory by ID.
memory update
Update an existing memory.
Management Tools (requires enableManagementTools: true )
memory stats
memory list
self improvement log
Log an agent learning event for meta improvement tracking.
self improvement extract skill
Extract a reusable pattern from a conversation.
self improvement review
Review and consolidate recent self improvement logs.
Smart Extraction: 6 Memory Categories
When smartExtraction: true , the LLM automatically classifies memories into:
Category What gets stored Example
profile User identity, background "User is a senior TypeScript developer"
preference Style, tool, workflow choices "Prefers functional programming patterns"
entity Projects, people, systems "Project 'Falcon' uses PostgreSQL + Redis"
event Decisions made, things that happened "Chose Vite over webpack on 2026 02 15"
case Solutions to specific problems "Fixed CORS by adding proxy in vite.config.ts"
pattern Recurring behaviors, habits "Always asks for tests before implementation"
Hybrid Retrieval Internals
With retrieval.mode: "hybrid" , every recall runs:
1. Vector search — semantic similarity via embeddings (weight: vectorWeight , default 0.7)
2. BM25 full text search — keyword matching (weight: bm25Weight , default 0.3)
3. Score fusion — results merged with weighted RRF (Reciprocal Rank Fusion)
4. Cross encoder rerank — top candidatePoolSize candidates reranked by a cross encoder model
5. Score filtering — results below hardMinScore are dropped
Retrieval mode options:
"vector" — pure semantic search only
"bm25" — pure keyword search only
"hybrid" — both fused (recommended)
Multi Scope Isolation
Scopes let you isolate memories by context. Enabling all three gives maximum flexibility:
When recalling, specify scope to narrow results:
Weibull Decay Model
Memories naturally fade over time. The decay model prevents stale memories from polluting retrieval.
Memories accessed frequently get their decay clock reset
Important, repeatedly recalled memories effectively become permanent
Noise and one off mentions fade naturally after ~30 days
Upgrading
From pre v1.1.0
See CHANGELOG v1.1.0.md in the repo for behavior changes and upgrade rationale.
Troubleshooting
Plugin not loading
Common causes:
Missing or relative plugins.load.paths (must be absolute when using npm install)
plugins.slots.memory not set to "memory lancedb pro"
Plugin not listed under plugins.entries
autoRecall not injecting memories
By default autoRecall is false in some versions — explicitly set it to true :
Also confirm the plugin is bound to the memory slot, not just loaded.
Jiti cache issues after upgrade
Memories not being extracted from conversations
Check extractMinMessages — must be ≥ number of turns in the conversation (set to 2 for normal chats)
Check extractMaxChars — very long contexts may be truncated; increase to 12000 if needed
Verify extraction LLM config has a valid apiKey and reachable endpoint
Check logs: openclaw logs follow plain grep "extraction"
Retrieval returns nothing or poor results
1. Confirm retrieval.mode is "hybrid" not "bm25" alone (BM25 requires indexed content)
2. Lower rerank.hardMinScore temporarily (try 0.4 ) to see if results exist but are being filtered
3. Check embedding model is consistent between store and recall operations — changing models requires re embedding
Environment variable not resolving
Ensure env vars are exported in the shell that runs OpenClaw, or use a .env file loaded by your process manager. The ${VAR} syntax in openclaw.json is resolved at startup.
Telegram Bot Quick Config Import
If using OpenClaw's Telegram integration, send this to the bot to auto configure:
Resources
GitHub: https://github.com/CortexReach/memory lancedb pro
npm: https://www.npmjs.com/package/memory lancedb pro
Setup script: https://github.com/CortexReach/toolbox/tree/main/memory lancedb pro setup
Agent skill: https://github.com/CortexReach/memory lancedb pro skill
Video walkthrough (YouTube): https://youtu.be/MtukF1C8epQ
Video walkthrough (Bilibili): https://www.bilibili.com/video/BV1zUf2BGEgn/