CortexReach/memory-lancedb-pro
Enhanced LanceDB memory plugin for OpenClaw — Hybrid Retrieval (Vector + BM25), Cross-Encoder Rerank, Multi-Scope Isolation, Management CLI
What it solves
AI agents often suffer from "amnesia," forgetting user preferences, past decisions, and project context as soon as a new session begins. memory-lancedb-pro provides a production-grade long-term memory system for OpenClaw agents, allowing them to learn from conversations and recall relevant information across different sessions, users, and projects without requiring manual tagging or constant repetition from the user.
How it works
The plugin uses LanceDB as a vector store to create a semantic index of an agent's experiences. It employs a multi-layered architecture to manage memory:
- Auto-Capture & Extraction: It uses an LLM to automatically classify and extract information into six categories (profiles, preferences, entities, events, cases, and patterns) from conversations.
- Hybrid Retrieval: It combines vector search (semantic similarity) with BM25 full-text search (keyword matching), which are then fused and refined via cross-encoder reranking.
- Intelligent Forgetting: A Weibull decay model is used to ensure that important memories persist while noise naturally fades over time.
- Context Injection: Relevant memories are automatically surfaced and injected into the agent's prompt before it generates a response.
- Canonical Corpus: It integrates with local Markdown files (like
MEMORY.md) and session transcripts, treating them as the source of truth while using LanceDB for fast semantic lookup.
Who it’s for
Developers using the OpenClaw agent framework who want to give their AI agents persistent, personalized long-term memory and the ability to handle complex, multi-session project contexts.
Highlights
- Automated Memory Management: Auto-captures and extracts key facts without manual input.
- Advanced Search: Hybrid Vector + BM25 search with cross-encoder reranking for high precision.
- Multi-Scope Isolation: Maintains separate memory boundaries for different agents, users, and projects.
- Flexible Provider Support: Works with OpenAI, Jina, Gemini, Ollama, and other OpenAI-compatible APIs.
- Production Toolkit: Includes a CLI for exporting, importing, upgrading, and re-embedding memory databases.