Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

memory-lancedb-pro

> AI 编程
Open source

Enhanced LanceDB memory plugin for OpenClaw — Hybrid Retrieval (Vector + BM25), Cross-Encoder Rerank, Multi-Scope Isolation, Management CLI

4.5K stars0 likes1 views
WebsiteGitHub

About

Enhanced LanceDB memory plugin for OpenClaw — Hybrid Retrieval (Vector + BM25), Cross-Encoder Rerank, Multi-Scope Isolation, Management CLI


Why memory-lancedb-pro?

Most AI agents have amnesia. They forget everything the moment you start a new chat.

memory-lancedb-pro is a production-grade long-term memory plugin for OpenClaw that turns your agent into an AI Memory Assistant — it automatically captures what matters, lets noise naturally fade, and retrieves the right memory at the right time. No manual tagging, no configuration headaches.

Your AI Memory Assistant in Action

Without memory — every session starts from zero:

You: "Use tabs for indentation, always add error handling." (next session) You: "I already told you — tabs, not spaces!" (next session) You: "...seriously, tabs. And error handling. Again."

With memory-lancedb-pro — your agent learns and remembers:

You: "Use tabs for indentation, always add error handling." (next session — agent auto-recalls your preferences) Agent: (silently applies tabs + error handling) ✅ You: "Why did we pick PostgreSQL over MongoDB last month?" Agent: "Based on our discussion on Feb 12, the main reasons were..." ✅

That's the difference an AI Memory Assistant makes — it learns your style, recalls past decisions, and delivers personalized responses without you repeating yourself.

What else can it do?

What you get
Auto-Capture Your agent learns from every conversation — no manual memory_store needed
Smart Extraction LLM-powered 6-category classification: profiles, preferences, entities, events, cases, patterns
Intelligent Forgetting Weibull decay model — important memories stay, noise naturally fades away
Hybrid Retrieval Vector + BM25 full-text search, fused with cross-encoder reranking
Context Injection Relevant memories automatically surface before each reply
Multi-Scope Isolation Per-agent, per-user, per-project memory boundaries
Any Provider OpenAI, Jina, Gemini, Ollama, or any OpenAI-compatible API
Full Toolkit CLI, backup, migration, upgrade, export/import — production-ready

Quick Start

CPU Requirement: Your CPU must support AVX instructions. LanceDB native vector search may require AVX2 on some Linux x64 builds and can crash AVX-only CPUs with SIGILL; set retrieval.disableNativeCosine: true or MEMORY_LANCEDB_DISABLE_NATIVE_COSINE=1 to use a scoped row scan plus JavaScript cosine ranking. Check CPU flags with: grep -o 'avx[^ ]*' /proc/cpuinfo | head -1 (no output = not supported). See #419 and #644 for details.

Option A: One-Click Install Script (Recommended)

The community-maintained setup script handles install, upgrade, and repair in one command:

bash
curl -fsSL https://raw.githubusercontent.com/CortexReach/toolbox/main/memory-lancedb-pro-setup/setup-memory.sh -o setup-memory.sh
bash setup-memory.sh

See Ecosystem below for the full list of scenarios the script covers and other community tools.

Option B: Manual Install

Via OpenClaw CLI (recommended):

bash
openclaw plugins install memory-lancedb-pro@beta

Or via npm:

bash
npm i memory-lancedb-pro@beta

If using npm, you will also need to add the plugin's install directory as an absolute path in plugins.load.paths in your openclaw.json. This is the most common setup issue.

Add to your openclaw.json:

…

Why these defaults?

  • autoCapture + smartExtraction → your agent learns from every conversation automatically
  • autoRecall → relevant memories are injected before each reply
  • extractMinMessages: 2 → extraction triggers in normal two-turn chats
  • sessionMemory.enabled: false → avoids polluting retrieval with session summaries on day one

⚠️ Memory Architecture (Important)

When memory-lancedb-pro owns the OpenClaw memory slot, it now exposes one memory capability with two coordinated stores:

Memory Layer Storage What it's for Recallable?
Plugin Memory LanceDB (vector store) Semantic recall via memory_recall / auto-recall ✅ Yes
Canonical Corpus MEMORY.md, memory/**/*.md, recent session transcripts, memory/dreaming/**/*.md Source-of-truth files and public artifacts ✅ Via LanceDB semantic index when canonicalCorpus.enabled is true

Key principle:

Canonical files remain the source of truth. LanceDB is the semantic index used to retrieve them with grounded paths, line spans, snippets, and citations.

What this means for you:

  • Need semantic recall? → Use memory_store or let auto-capture do it
  • memory/YYYY-MM-DD.md → treat as a daily journal / log that can also be indexed for semantic lookup
  • MEMORY.md → curated human-readable reference that can be indexed as canonical context
  • memory/dreaming/**/*.md → dream reports exposed as public artifacts and indexed as reflection context
  • Session JSONL transcripts → indexed as source: "sessions" when canonicalCorpus.includeSessionTranscripts is enabled
  • Plugin memory → primary write path for durable facts, preferences, decisions, and auto-captured memories

OpenClaw hosts receive:

  • api.registerMemoryCapability({ runtime, promptBuilder, flushPlanResolver, publicArtifacts })
  • runtime search results shaped as path, startLine, endLine, snippet, source, and citation
  • public artifacts for MEMORY.md, memory/**/*.md, dream reports, and the dreaming event log at memory/.dreams/events.jsonl

Dreaming compatibility is configured under the same plugin entry. If dreaming.enabled is true while this plugin owns plugins.slots.memory, OpenClaw can use the memory-core dreaming sidecar against this plugin's memory capability and public artifacts.

Validate & restart:

bash
openclaw config validate
openclaw gateway restart
openclaw logs --follow --plain | grep "memory-lancedb-pro"

You should see:

  • memory-lancedb-pro: smart extraction enabled
  • memory-lancedb-pro@...: plugin registered

Done! Your agent now has long-term memory.

More installation paths (existing users, upgrades)

Already using OpenClaw?

  1. Add the plugin with an absolute plugins.load.paths entry
  2. Bind the memory slot: plugins.slots.memory = "memory-lancedb-pro"
  3. Verify: openclaw plugins info memory-lancedb-pro && openclaw memory-pro stats

Upgrading from pre-v1.1.0?

bash
# 1) Backup
openclaw memory-pro export --scope global --output memories-backup.json
# 2) Dry run
openclaw memory-pro upgrade --dry-run
# 3) Run upgrade
openclaw memory-pro upgrade
# 4) Verify
openclaw memory-pro stats

See CHANGELOG-v1.1.0.md for behavior changes and upgrade rationale.

Turning on Jina task hints on an existing database?

Task hints are two config keys under the plugin's embedding block:

jsonc
"memory-lancedb-pro": {
  "config": {
    "embedding": {
      "model": "jina-embeddings-v5-text-small",
      "taskQuery": "retrieval.query",
      "taskPassage": "retrieval.passage"
    }
  }
}

They only affect vectors written after you set them. Rows already in your store were embedded without a task hint, so a query embedded with retrieval.query is compared against passages that live in a different vector space — you get roughly half the benefit, silently.

To fix existing rows, re-embed into a fresh database and cut over to it. Do not re-embed in place: reembed writes each row with table.add() (append by id, not replace), so an in-place run — which is exactly what --force unlocks — leaves the old vector beside the new one and doubles every row; retries pile on more. reembed refuses same-path runs unless you force it, for this reason.

…

The same cutover applies whenever you change embedding.model or embedding.dimensions — always re-embed into a fresh dbPath, never in place.

Telegram Bot Quick Import (click to expand)

If you are using OpenClaw's Telegram integration, the easiest way is to send an import command directly to the main Bot instead of manually editing config.

Send this message:

…

Ecosystem

memory-lancedb-pro is the core plugin. The community has built tools around it to make setup and daily use even smoother:

Setup Script — One-Click Install, Upgrade & Repair

CortexReach/toolbox/memory-lancedb-pro-setup

Not just a simple installer — the script intelligently handles a wide range of real-world scenarios:

Your situation What the script does
Never installed Fresh download → install deps → pick config → write to openclaw.json → restart
Installed via git clone, stuck on old commit Auto git fetch + checkout to latest → reinstall deps → verify
Config has invalid fields Auto-detect via schema filter, remove unsupported fields
Installed via npm Skips git update, reminds you to run npm update yourself
openclaw CLI broken due to invalid config Fallback: read workspace path directly from openclaw.json file
extensions/ instead of plugins/ Auto-detect plugin location from config or filesystem
Already up to date Run health checks only, no changes
bash
bash setup-memory.sh                    # Install or upgrade
bash setup-memory.sh --dry-run          # Preview only
bash setup-memory.sh --beta             # Include pre-release versions
bash setup-memory.sh --uninstall        # Revert config and remove plugin

Built-in provider presets: Jina / DashScope / SiliconFlow / OpenAI / Ollama, or bring your own OpenAI-compatible API. For full usage (including --ref, --selfcheck-only, and more), see the setup script README.

Claude Code / OpenClaw Skill — AI-Guided Configuration

CortexReach/memory-lancedb-pro-skill

Install this skill and your AI agent (Claude Code or OpenClaw) gains deep knowledge of every feature in memory-lancedb-pro. Just say "help me enable the best config" and get:

  • Guided 7-step configuration workflow with 4 deployment plans:
    • Full Power (Jina + OpenAI) / Budget (free SiliconFlow reranker) / Simple (OpenAI only) / Fully Local (Ollama, zero API cost)
  • All 9 MCP tools used correctly: memory_recall, memory_store, memory_forget, memory_update, memory_stats, memory_list, self_improvement_log, self_improvement_extract_skill, self_improvement_review (full toolset requires enableManagementTools: true — the default Quick Start config exposes the 4 core tools)
  • Common pitfall avoidance: workspace plugin enablement, autoRecall default-false, jiti cache, env vars, scope isolation, and more

Install for Claude Code:

bash
git clone https://github.com/CortexReach/memory-lancedb-pro-skill.git ~/.claude/skills/memory-lancedb-pro

Install for OpenClaw:

bash
git clone https://github.com/CortexReach/memory-lancedb-pro-skill.git ~/.openclaw/workspace/skills/memory-lancedb-pro-skill

Video Tutorial

Full walkthrough: installation, configuration, and hybrid retrieval internals. https://youtu.be/MtukF1C8epQ https://www.bilibili.com/video/BV1zUf2BGEgn/


Architecture

…

For a deep-dive into the full architecture, see docs/memory_architecture_analysis.md.

File Reference (click to expand)
File Purpose
index.ts Plugin entry point. Registers with Op

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptlancedbmemoryopenclawopenclaw-agent

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.