memory-lancedb-pro
This skill should be used when working with memory-lancedb-pro, a production-grade long-term memory MCP plugin for OpenClaw AI agents. Use when installing, configuring, or using any feature of memory-lancedb-pro including Smart Extraction, hybrid retrieval, memory lifecycle management, multi-scope isolation, self-improvement governance, or any MCP memory tools (memory_recall, memory_store, memory_forget, memory_update, memory_stats, memory_list, self_improvement_log, self_improvement_extract_skill, self_improvement_review).
What this skill does
# memory-lancedb-pro
Production-grade long-term memory system (v1.1.0-beta.8) for OpenClaw AI agents. Provides persistent, intelligent memory storage using LanceDB with hybrid vector + BM25 retrieval, LLM-powered Smart Extraction, Weibull decay lifecycle, and multi-scope isolation.
For full technical details (thresholds, formulas, database schema, source file map), see `references/full-reference.md`.
---
## Applying the Optimal Config (Step-by-Step Workflow)
When the user says "help me enable the best config", "apply optimal configuration", or similar, follow this exact procedure:
### Step 1 โ Present configuration plans and let user choose
Present these three plans in a clear comparison, then ask the user to pick one:
---
**Plan A โ ๐ Full Power (Best Quality)**
- Embedding: Jina `jina-embeddings-v5-text-small` (task-aware, 1024-dim)
- Reranker: Jina `jina-reranker-v3` (cross-encoder, same key)
- LLM: OpenAI `gpt-4o-mini` (Smart Extraction)
- Keys needed: `JINA_API_KEY` + `OPENAI_API_KEY`
- Get keys: Jina โ https://jina.ai/api-key ยท OpenAI โ https://platform.openai.com/api-keys
- Cost: Both paid (Jina has free tier with limited quota)
- Best for: Production deployments, highest retrieval quality
**Plan B โ ๐ฐ Budget (Free Reranker)**
- Embedding: Jina `jina-embeddings-v5-text-small`
- Reranker: SiliconFlow `BAAI/bge-reranker-v2-m3` (free tier available)
- LLM: OpenAI `gpt-4o-mini`
- Keys needed: `JINA_API_KEY` + `SILICONFLOW_API_KEY` + `OPENAI_API_KEY`
- Get keys: Jina โ https://jina.ai/api-key ยท SiliconFlow โ https://cloud.siliconflow.cn/account/ak ยท OpenAI โ https://platform.openai.com/api-keys
- Cost: Jina embedding paid, SiliconFlow reranker free tier, OpenAI paid
- Best for: Cost-sensitive deployments that still want reranking
**Plan C โ ๐ข Simple (OpenAI Only)**
- Embedding: OpenAI `text-embedding-3-small`
- Reranker: None (vector+BM25 fusion only, no cross-encoder)
- LLM: OpenAI `gpt-4o-mini`
- Keys needed: `OPENAI_API_KEY` only
- Get key: https://platform.openai.com/api-keys
- Cost: OpenAI paid only
- Best for: Users who already have OpenAI and want minimal setup
**Plan D โ ๐ฅ๏ธ Fully Local (Ollama, No API Keys)**
- Embedding: Ollama `mxbai-embed-large` (1024-dim, recommended) or `nomic-embed-text:v1.5` (768-dim, lighter)
- Reranker: **None** โ Ollama has no cross-encoder reranker; retrieval uses vector+BM25 fusion only
- LLM: Ollama via OpenAI-compatible endpoint โ recommended models with reliable JSON/structured output:
- `qwen3:8b` (**recommended** โ best JSON output, native structured output, ~5.2GB)
- `qwen3:14b` (better quality, ~9GB, needs 16GB VRAM)
- `llama4:scout` (multimodal MoE, 10M ctx, ~12GB)
- `mistral-small3.2` (24B, 128K ctx, excellent instruction following, ~15GB)
- `mistral-nemo` (12B, 128K ctx, efficient, ~7GB)
- Keys needed: **None** โ fully local, no external API calls
- Prerequisites:
- Ollama installed: https://ollama.com/download
- Models pulled (see Step 5 below)
- Ollama running: macOS = launch the app from Applications; Linux = `systemctl start ollama` or `ollama serve`
- Cost: Free (hardware only)
- RAM requirements: mxbai-embed-large ~670MB; qwen3:8b ~5.2GB; qwen3:14b ~9GB; llama4:scout ~12GB; mistral-small3.2 ~15GB
- Trade-offs: No cross-encoder reranking = lower retrieval precision than Plans A/B; Smart Extraction quality depends on local LLM โ if extraction produces garbage, set `"smartExtraction": false`
- Best for: Privacy-sensitive deployments, air-gapped environments, zero API cost
---
After user selects a plan, ask in one message:
1. Please provide the required API key(s) for your chosen plan (paste directly, or say "already set as env vars")
2. Are the env vars already set in your OpenClaw Gateway process? (If unsure, answer No)
3. Where is your `openclaw.json`? (Skip if you want me to find it automatically)
If the user already stated their provider/keys in context, skip asking and proceed.
**Do NOT proceed to Step 2 until API keys have been collected and verified (Step 2 below).**
### Step 2 โ Verify API Keys (MANDATORY โ do not skip)
**Run ALL key checks for the chosen plan before touching any config.** If any check fails, STOP and tell the user which key failed and why. Do not proceed to Step 3.
**Plan A / Plan B โ Jina embedding check:**
```bash
curl -s -o /dev/null -w "%{http_code}" \
https://api.jina.ai/v1/embeddings \
-H "Authorization: Bearer <JINA_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"model":"jina-embeddings-v5-text-small","input":["test"]}'
```
**Plan A / B / C โ OpenAI check:**
```bash
curl -s -o /dev/null -w "%{http_code}" \
https://api.openai.com/v1/models \
-H "Authorization: Bearer <OPENAI_API_KEY>"
```
**Plan B โ SiliconFlow reranker check:**
```bash
curl -s -o /dev/null -w "%{http_code}" \
https://api.siliconflow.com/v1/rerank \
-H "Authorization: Bearer <SILICONFLOW_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"model":"BAAI/bge-reranker-v2-m3","query":"test","documents":["test doc"]}'
```
**Plan D โ Ollama check:**
```bash
curl -s -o /dev/null -w "%{http_code}" http://localhost:11434/api/tags
```
**Interpret results:**
| HTTP code | Meaning | Action |
|-----------|---------|--------|
| `200` / `201` | Key valid, quota available | โ
Continue |
| `401` / `403` | Invalid or expired key | โ STOP โ ask user to check key |
| `402` | Payment required / no credits | โ STOP โ ask user to top up account |
| `429` | Rate limited or quota exceeded | โ STOP โ ask user to check billing/quota |
| `000` / connection refused | Service unreachable | โ STOP โ ask user to check network / Ollama running |
**If any check fails:** Tell the user exactly which provider failed, the HTTP code received, and what to fix. **Do not proceed with installation until all required keys pass their checks.**
If the user says keys are set as env vars in the gateway process, run checks using `${VAR_NAME}` substituted inline or ask them to paste the key temporarily for verification.
### Step 3 โ Find openclaw.json
Check these locations in order:
```bash
# Most common locations
ls ~/.openclaw/openclaw.json
ls ~/openclaw.json
# Ask the gateway where it's reading config from
openclaw config get --show-path 2>/dev/null || echo "not found"
```
If not found, ask the user for the path.
### Step 4 โ Read current config
```bash
# Read and display current plugins config before changing anything
openclaw config get plugins.entries.memory-lancedb-pro 2>/dev/null
openclaw config get plugins.slots.memory 2>/dev/null
```
**Check what already exists** โ never blindly overwrite existing settings.
### Step 5 โ Build the merged config based on chosen plan
Use the config block for the chosen plan. Substitute actual API keys inline if the user provided them directly; keep `${ENV_VAR}` syntax if they confirmed env vars are set in the gateway process.
**Plan A config (`plugins.entries.memory-lancedb-pro.config`):**
```json
{
"embedding": {
"apiKey": "${JINA_API_KEY}",
"model": "jina-embeddings-v5-text-small",
"baseURL": "https://api.jina.ai/v1",
"dimensions": 1024,
"taskQuery": "retrieval.query",
"taskPassage": "retrieval.passage",
"normalized": true
},
"autoCapture": true,
"autoRecall": true,
"captureAssistant": false,
"smartExtraction": true,
"extractMinMessages": 2,
"extractMaxChars": 8000,
"llm": {
"apiKey": "${OPENAI_API_KEY}",
"model": "gpt-4o-mini",
"baseURL": "https://api.openai.com/v1"
},
"retrieval": {
"mode": "hybrid",
"vectorWeight": 0.7,
"bm25Weight": 0.3,
"rerank": "cross-encoder",
"rerankProvider": "jina",
"rerankModel": "jina-reranker-v3",
"rerankEndpoint": "https://api.jina.ai/v1/rerank",
"rerankApiKey": "${JINA_API_KEY}",
"candidatePoolSize": 12,
"minScore": 0.6,
"hardMinScore": 0.62,
"filterNoise": true
},
"sessionMemory": { "enabled": false }
}
```
**Plan B config:**
```json
{
"embedding": {
"apiKey": "${JINA_Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts โ single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score โฅ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.