explaingit

cortexreach/memory-lancedb-pro

4,349JavaScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A plugin for the OpenClaw AI agent framework that upgrades its memory system with hybrid retrieval combining vector and keyword search, cross-encoder reranking, and multi-scope memory isolation between users and projects.

Mindmap

mindmap
  root((memory-lancedb-pro))
    Retrieval methods
      Vector search
      BM25 keyword search
      Hybrid fusion
      Cross-encoder reranking
    Memory scoring
      Recency boost
      Time decay
      Importance weighting
      MMR diversity
    Scopes
      Global shared
      Per agent
      Per user
      Per project
    Management
      CLI tool
      Inspect and search
      Export and delete
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Replace OpenClaw's default memory plugin with one that finds relevant memories using both semantic similarity and keyword matching for better recall.

USE CASE 2

Give each user or project their own isolated memory scope so different agent sessions do not mix up context.

USE CASE 3

Use the management CLI to inspect, search, export, or delete stored agent memories without going through the agent interface.

USE CASE 4

Configure a cross-encoder reranking step using Jina or Pinecone to sharpen the precision of retrieved memories.

Tech stack

JavaScriptLanceDBBM25OpenAIGeminiJinaOllama

Getting it running

Difficulty · moderate Time to first run · 30min

Requires an existing OpenClaw agent setup and a compatible embedding provider such as OpenAI or Jina.

MIT license, use freely in any project including commercial ones, as long as you keep the copyright notice.

In plain English

memory-lancedb-pro is a plugin for OpenClaw (an AI agent framework) that gives agents a more capable long-term memory system. The built-in OpenClaw memory plugin only does basic vector search, finding memories based on semantic similarity. This plugin replaces that with a richer retrieval pipeline. The core feature is hybrid retrieval: it combines vector search (finding memories that mean something similar to the query) with BM25 full-text search (finding memories that share the same keywords), then fuses the two result sets together. After that, a cross-encoder reranking step, using Jina, SiliconFlow, Pinecone, or any compatible endpoint, re-scores the results more precisely. Additional scoring factors include recency boost, time decay, importance weighting, and MMR diversity, a technique that reduces redundant results. The plugin also introduces multi-scope isolation: memories can be scoped to different contexts, globally shared, per-agent, per-project, per-user, or custom-named scopes, so different agents or users don't contaminate each other's memory. A management command-line interface lets you inspect, search, export, delete, and migrate stored memories without going through the agent itself. Noise filtering skips low-quality content like greetings or refusals before storing, and adaptive retrieval detects when a query doesn't need a memory lookup at all, such as simple confirmations or slash commands. The plugin is compatible with embedding providers including OpenAI, Gemini, Jina, and Ollama. It is written in JavaScript and licensed under MIT. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
How do I install memory-lancedb-pro into my OpenClaw agent and configure it with an OpenAI embedding provider? Show me the setup steps.
Prompt 2
Explain how the hybrid retrieval in memory-lancedb-pro combines vector search and BM25 keyword search. How are the two result sets merged?
Prompt 3
How do I set up per-user memory scopes in memory-lancedb-pro so that two users' agent sessions do not share memories?
Prompt 4
Show me how to use the memory-lancedb-pro CLI to search stored memories and export them to a file for backup.
Prompt 5
How does the noise filter in memory-lancedb-pro decide to skip storing a memory, and how do I tune the threshold?
Open on GitHub → Explain another repo

← cortexreach on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.