OpenClaw LanceDB Memory System for Openclaw

An intelligent memory system powered by LanceDB providing AI agents with persistent, semantic, and cross-session memory capabilities.

asbinbin
v1.0.0
Mar 31, 2026
0
637
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install clawlancememory

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install clawlancememory using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is OpenClaw LanceDB Memory System?

The OpenClaw LanceDB Memory System is a sophisticated memory layer designed for OpenClaw agents to bridge the gap between short-term context and long-term intelligence. By leveraging the high-performance LanceDB vector database, this skill enables agents to store and retrieve information based on semantic meaning rather than just keyword matches. This ensures that every Openclaw Skills deployment benefits from a rich, evolving user profile that persists across different chat sessions.

Built with developer efficiency in mind, the system automatically classifies incoming information into preferences, facts, tasks, or general knowledge. It utilizes Zhipu AI for high-quality text embeddings, ensuring that the retrieval process is both accurate and contextually relevant. With its plug-and-play architecture, it integrates directly into the OpenClaw hook system, allowing for seamless bootstrap and real-time memory injection into system prompts.

OpenClaw LanceDB Memory System Use Cases

  • Persistent user preference tracking (e.g., coding styles, reporting formats).
  • Contextual project awareness where the agent remembers specific responsibilities or POC details.
  • Automated task and deadline management through conversational extraction.
  • Multi-session knowledge retention for complex, long-running AI research or development workflows.
  • Cross-user data isolation for secure, multi-tenant AI applications.

How OpenClaw LanceDB Memory System Works

  1. The OpenClaw Hook intercepts the agent bootstrap event when a session starts.
  2. The system triggers a Python script to perform a semantic search in the local LanceDB database based on the current context.
  3. Relevant memories (preferences, facts, tasks) are extracted and formatted into a markdown profile.
  4. This profile is injected into the agent's system prompt (USER_MEMORY.md) to provide immediate context.
  5. During dialogue, the auto-extraction module identifies new memories and classifies them using pattern matching and LLM logic.
  6. New data is vectorized using Zhipu AI Embeddings and stored in the local LanceDB for future retrieval.

OpenClaw LanceDB Memory System Setup

To integrate this into your Openclaw Skills environment, follow these steps:

# Clone the repository
git clone https://github.com/asbinbin/claw_lance.git
cd claw_lance

# Set up environment and dependencies
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

# Configure Zhipu AI API Key
export ZHIPU_API_KEY="your-api-key-here"

# Enable the OpenClaw Hook
openclaw hooks enable memory-system

OpenClaw LanceDB Memory System Data Schema & Taxonomy

The skill manages data locally using LanceDB with the following classification schema:

Type Description Trigger Keywords Example
preference User habits or styles like, prefer, used to "I prefer concise reporting styles"
fact Background info I am, responsible for "I am leading the POC project"
task Pending actions need to, don't forget "Submit OKR report every Thursday"
general Misc info - Dialogue history, temporary notes

Storage is maintained in the memory_lancedb/ directory, requiring approximately 100MB per 1000 memory entries.

OpenClaw LanceDB Memory System Advanced Features

  • Automatic memory extraction from raw chat messages using the auto command.
  • Seamless OpenClaw Hook integration for zero-manual-effort memory loading.
  • Millisecond-level semantic retrieval performance.
  • Comprehensive CLI for memory management including profile, stats, and cleanup operations.
  • Privacy-first local storage architecture with multi-user isolation.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*