█

AI/TLDR

memory-lancedb-pro

A LanceDB-backed memory plugin for OpenClaw that captures what matters from every conversation, lets noise decay on a Weibull curve, and injects the right memories back before each reply

Agent MemoryOpen source
Latest
v1.1.0-beta.10
Updated
17 Sep 2026
Language
JavaScript
License
MIT

What's new

v1.1.0-beta.1017 Sep 2026

Adapted the plugin to OpenClaw 2026.3+'s new plugin architecture, moving to before_prompt_build hooks in place of the deprecated before_agent_start. Existing installs should run `openclaw doctor --fix` after upgrading.

Overview

memory-lancedb-pro fills the OpenClaw memory slot with a LanceDB-backed long-term store. The problem it addresses is the one every agent user hits: you state a preference, the session ends, and the next session starts from zero. The plugin captures preferences, decisions and project context as they come up in conversation, and surfaces the relevant ones automatically before the agent's next reply — no manual `memory_store` call, no tagging discipline required of the user.

Capture is LLM-driven. Rather than storing raw transcript, a smart-extraction pass classifies what it finds into six categories — profiles, preferences, entities, events, cases and patterns — so a stated coding convention is stored as a durable preference while small talk is not. Forgetting is modelled explicitly: a Weibull decay curve keeps memories that keep proving useful and lets noise fade, which is what stops the store degrading into an ever-growing pile that retrieval has to fight through.

Retrieval is hybrid. A dense vector search over LanceDB runs alongside BM25 full-text search, the two result sets are fused, and a cross-encoder reranks the survivors before anything is injected into context. Scope isolation is first-class: memory boundaries can be drawn per agent, per user and per project, so a work project's decisions do not leak into a personal assistant's answers. Embeddings can come from OpenAI, Jina, Gemini, Ollama or any OpenAI-compatible endpoint.

Since v1.1.0-beta.10 the plugin targets OpenClaw 2026.3+ and its newer plugin architecture, using `before_prompt_build` hooks in place of the deprecated `before_agent_start`; after upgrading, the project asks you to run `openclaw doctor --fix`. When it owns the memory slot it exposes one capability over two coordinated stores: plugin memory in LanceDB (semantic recall) and a canonical corpus of source-of-truth files — `MEMORY.md`, `memory/**/*.md`, recent session transcripts — which is indexed into LanceDB when `canonicalCorpus.enabled` is set. One hardware caveat is called out prominently: the CPU must support AVX, and LanceDB's native vector search may need AVX2 on some Linux x64 builds, with a JavaScript-cosine fallback available for AVX-only machines.

What it does

  • Auto-capture with LLM-powered smart extraction into six categories — profiles, preferences, entities, events, cases and patterns
  • Intelligent forgetting via a Weibull decay model, so important memories persist and noise fades instead of accumulating
  • Hybrid retrieval: dense vector search plus BM25 full-text, fused and then cross-encoder reranked
  • Automatic context injection — relevant memories surface before each reply, with no explicit recall call
  • Multi-scope isolation: per-agent, per-user and per-project memory boundaries
  • Any embedding provider — OpenAI, Jina, Gemini, Ollama, or any OpenAI-compatible API
  • A canonical-corpus layer that semantically indexes MEMORY.md, memory/**/*.md and recent session transcripts alongside the vector store
  • A production toolkit around the store: CLI, backup, migration, upgrade and export/import

Getting started

The plugin installs through the OpenClaw CLI or npm and is then wired into openclaw.json. Check first that your CPU reports AVX — LanceDB's native vector search may need AVX2 on some Linux x64 builds and can crash AVX-only CPUs with SIGILL.

VideoThe walkthrough the project links from its README: installing the plugin and demonstrating multi-scope isolation and noise filtering (in Chinese).AI超元域 ↗

Check your CPU supports AVX

No output means the instruction set is not reported. On an AVX-only machine, set retrieval.disableNativeCosine: true (or MEMORY_LANCEDB_DISABLE_NATIVE_COSINE=1) to use a scoped row scan with JavaScript cosine ranking instead.

bashbash
grep -o 'avx[^ ]*' /proc/cpuinfo | head -1

Install via the OpenClaw CLI

This is the recommended path. Installing through npm instead works, but then the plugin's install directory must be added as an absolute path under plugins.load.paths in openclaw.json — the project notes this is the most common setup mistake.

bashbash
openclaw plugins install memory-lancedb-pro@beta

Wire it into openclaw.json

Claim the memory slot and configure an embedding provider. The defaults shown are the ones the project recommends for day one: auto-capture plus smart extraction so the agent learns from every conversation, auto-recall so memories are injected before each reply, extraction triggering from two-turn chats, and session summaries left off so they do not pollute retrieval early on.

jsonjson
{
  "plugins": {
    "slots": { "memory": "memory-lancedb-pro" },
    "entries": {
      "memory-lancedb-pro": {
        "enabled": true,
        "config": {
          "embedding": {
            "provider": "openai-compatible",
            "apiKey": "${OPENAI_API_KEY}",
            "model": "text-embedding-3-small"
          },
          "autoCapture": true,
          "autoRecall": true,
          "smartExtraction": true,
          "canonicalCorpus": {
            "enabled": true,
            "syncOnSearch": true
          },
          "extractMinMessages": 2,
          "extractMaxChars": 8000,
          "sessionMemory": { "enabled": false }
        }
      }
    }
  }
}

After an upgrade, run the doctor

v1.1.0-beta.10 moved to OpenClaw 2026.3+'s before_prompt_build hooks, replacing the deprecated before_agent_start. The doctor repairs configuration left over from the old architecture.

bashbash
openclaw doctor --fix

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Reach for it when an OpenClaw agent keeps being told the same preferences and conventions every session
  • Reach for it when you need to ask why a past decision was made and want the agent to answer from a record rather than a guess
  • Reach for it when one machine runs several agents or projects and their memories must not bleed into each other
  • Reach for it when the built-in memory slot retrieves too loosely and you want BM25 plus vector search with a reranker in front of context injection

How memory-lancedb-pro compares

memory-lancedb-pro alongside other open-source agent memory tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Claude-Mem★ 102kPersistent memory layer for coding agents: it captures what an agent does during a session, compresses it into semantic summaries, and injects the relevant parts back into later sessions.
Mem0★ 67.4kA memory layer that you add to existing LLM agents to extract, store, and recall user facts and preferences across sessions using vector, graph, and key-value backends.
MemPalace★ 59.6kLocal-first agent memory that stores conversations verbatim instead of summarising them, with a structured palace index, pluggable vector backends and an MCP server.
Hindsight★ 51.1kAn agent memory server that stores facts and experiences, consolidates them into observations and mental models, and serves them back through retain, recall, and reflect operations.
OpenViking★ 40.2kA context database that stores an agent's memories, resources, and skills as one browsable viking:// filesystem with three-tier (abstract/overview/details) on-demand loading.
Cognee★ 32.5kA graph-native memory engine that turns raw documents and conversations into a queryable knowledge graph for agents that need to build lasting knowledge.
Graphiti★ 32kA library that builds a temporal knowledge graph from an agent's conversations and data so facts can be tracked and queried as they change over time.
memory-lancedb-pro★ 4.5kA LanceDB-backed memory plugin for OpenClaw that captures what matters from every conversation, lets noise decay on a Weibull curve, and injects the right memories back before each reply