Xpersona
M

Memory LanceDB Setup

CLAWHUB · Unverified

Configure OpenClaw's memory-lancedb plugin to enable local semantic vector memory using LanceDB and an OpenAI-compatible embedding provider. Skill: Memory LanceDB Setup Owner: ssyvonne Summary: Configure OpenClaw's memory-lancedb plugin to enable local semantic vector memory using LanceDB and an OpenAI-compatible embedding provider. Tags: latest:1.0.0 Version history: v1.0.0 | 2026-03-29T16:04:35.164Z | user Initial release: OpenClaw vector memory setup with LanceDB + Gemini embedding, arm64 patch script, troubleshooting guide Archive index: Archive v1.0.

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s171b27yewwv1455np1e49d1v583v0r5:memory-lancedb-setup
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-ssyvonne-memory-lancedb-setup/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

8,029 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: memory-lancedb-setup
description: Configure OpenClaw's memory-lancedb plugin for semantic vector memory using a local LanceDB database. Use when: (1) setting up vector memory for the first time, (2) memory-lancedb fails with module not found errors, (3) migrating from flat-file MEMORY.md to vector-based recall, (4) configuring an embedding provider (Gemini, OpenAI-compatible). NOT for: general memory_store/memory_recall usage (just use the tools directly).
---

# memory-lancedb Setup

Enables semantic vector memory in OpenClaw: memories stored with `memory_store` are embedded and indexed locally, then recalled on-demand via `memory_recall` — no full-context load.

## Prerequisites

- OpenClaw installed at `/usr/local/lib/node_modules/openclaw`
- An OpenAI-compatible embedding API key (Gemini AI Studio free key works well)

## Setup Steps

### 1. Get a Gemini API Key (free)

Go to [aistudio.google.com](https://aistudio.google.com) → Get API key → Create API key.

### 2. Configure the plugin

```bash
openclaw config set plugins.entries.memory-lancedb.enabled true
openclaw config set plugins.entries.memory-lancedb.config.embedding.baseUrl "https://generativelanguage.googleapis.com/v1beta/openai/"
openclaw config set plugins.entries.memory-lancedb.config.embedding.model "text-embedding-004"
openclaw config set plugins.entries.memory-lancedb.config.embedding.apiKey "YOUR_API_KEY"
openclaw config set plugins.entries.memory-lancedb.config.embedding.dimensions 768
```

### 3. Install dependencies

```bash
# Step 1: install main package in openclaw root
cd /usr/local/lib/node_modules/openclaw
npm install @lancedb/lancedb

# Step 2: install platform-specific native binding in plugin dir
cd /usr/local/lib/node_modules/openclaw/extensions/memory-lancedb
npm install @lancedb/lancedb-darwin-arm64   # Apple Silicon (arm64)
# npm install @lancedb/lancedb-darwin-x64   # Intel Mac
# npm install @lancedb/lancedb-linux-x64-gnu  # Linux x64
```

### 4. Patch native.js (Apple Silicon only)

LanceDB's `native.js` tries x64 first, hits `break` on failure, and never reaches arm64. Run the patch script:

```bash
python3 ~/.openclaw/workspace/skills/memory-lancedb-setup/references/patch_native.py
```

### 5. Restart gateway and verify

```bash
openclaw gateway restart
```

Then test:
```
memory_store → should return: Stored: "..."
memory_recall → should return matching entries with similarity %
```

## Migrating from MEMORY.md

If MEMORY.md is large, migrate key facts to the vector store and shrink MEMORY.md to a 20-30 line index. Group by topic and call `memory_store` for each:

- Identity & permissions
- Execution rules
- Project configurations (cron IDs, doc tokens)
- Technical knowledge (API quirks, field names)
- Workflows and SOPs

Keep only "must-know-every-session" rules in MEMORY.md.

## Troubleshooting

See `references/troubleshooting.md` for common errors and fixes.

_meta.json

{
  "ownerId": "kn7d5c3mmrtr430wgq6fa2z8n582vh8d",
  "slug": "memory-lancedb-setup",
  "version": "1.0.0",
  "publishedAt": 1774800275164
}

references/troubleshooting.md

# Troubleshooting: memory-lancedb

## Error: Cannot find module '@lancedb/lancedb'

**Cause**: Main package not installed in openclaw root.

**Fix**:
```bash
cd /usr/local/lib/node_modules/openclaw
npm install @lancedb/lancedb
```

---

## Error: Cannot find module '@lancedb/lancedb-darwin-x64' (on arm64 Mac)

**Cause**: arm64 native binding not installed + native.js falls through x64 → break before reaching arm64.

**Fix**: Install arm64 binding + run patch script:
```bash
cd /usr/local/lib/node_modules/openclaw/extensions/memory-lancedb
npm install @lancedb/lancedb-darwin-arm64
python3 ~/.openclaw/workspace/skills/memory-lancedb-setup/references/patch_native.py
openclaw gateway restart
```

---

## Error: npm EBADPLATFORM (x64 package on arm64)

**Cause**: Trying to install the wrong architecture package.

**Fix**: Use `@lancedb/lancedb-darwin-arm64` on Apple Silicon, not `x64`.

---

## Error: @lancedb/lancedb-darwin-universal 404

**Cause**: This package does not exist on npm.

**Fix**: Use architecture-specific package + patch script instead.

---

## memory_store returns "Invalid memory ID format"

**Cause**: `memory_forget` only accepts full UUIDs, not short IDs from `memory_recall`.

**Fix**: To effectively "delete", overwrite with updated content via `memory_store` using the same topic. The old low-relevance entry will be deprioritized in future recalls.

---

## Memories not showing up in relevant-memories

**Cause**: Similarity threshold not met, or autoRecall not enabled.

**Check**: Run `memory_recall` manually with a relevant query to confirm entries exist.

---

## Plugin shows "disabled" in `openclaw plugins list`

**Cause**: Plugin not enabled in config.

**Fix**:
```bash
openclaw config set plugins.entries.memory-lancedb.enabled true
openclaw gateway restart
```

skill-card.md

## Description:

Configure OpenClaw's memory-lancedb plugin to enable local semantic vector memory using LanceDB and an OpenAI-compatible embedding provider.

This skill is ready for commercial/non-commercial use.

## Publisher:

[ssyvonne](https://clawhub.ai/user/ssyvonne)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and engineers use this skill to configure OpenClaw semantic vector memory, install LanceDB dependencies, migrate selected MEMORY.md facts into vector recall, and troubleshoot common memory-lancedb setup failures.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Memory content may be embedded through an external provider and stored in a local vector database.

Mitigation: Store only non-secret memory content, do not store tokens or credentials, and consider a local embedding provider for confidential work.

Risk: Embedding API keys may be exposed through command history or broad reuse.

Mitigation: Use a dedicated low-quota API key, avoid placing keys in shell history, and rotate any key that may have been exposed.

Risk: The setup modifies a global OpenClaw installation and references unpinned npm package installs plus a direct native.js patch.

Mitigation: Review the patch before execution, back up the OpenClaw installation, and pin npm package versions where possible.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/ssyvonne/skills/memory-lancedb-setup)
- [Troubleshooting: memory-lancedb](references/troubleshooting.md)
- [Apple Silicon LanceDB native patch script](references/patch_native.py)
- [Google AI Studio](https://aistudio.google.com)
- [Gemini OpenAI-compatible embedding endpoint](https://generativelanguage.googleapis.com/v1beta/openai/)

## Skill Output:

**Output Type(s):** [guidance, shell commands, configuration, code]

**Output Format:** [Markdown with inline bash commands and a Python patch script reference]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Produces setup and troubleshooting guidance for local OpenClaw vector memory; users provide their own embedding API key.]

## Skill Version(s):

1.0.0 (source: server release evidence)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Memory LanceDB Setup and adjacent AI workflows.