memory-lancedb-pro
БесплатноБез исполняемых скриптовНе проверенComprehensive guide for maintaining, debugging, and upgrading the memory-lancedb-pro OpenClaw plugin — an enhanced LanceDB-backed long-term memory system with…
от win4r★ 47 звёзд на GitHubОб этом скилле
memory-lancedb-pro Plugin Maintenance Guide
Overview
memory-lancedb-pro is an enhanced long-term memory plugin for OpenClaw. It replaces the built-in memory-lancedb plugin with advanced retrieval capabilities, multi-scope memory isolation, and a management CLI.
Repository: https://github.com/win4r/memory-lancedb-pro License: MIT | Language: TypeScript (ESM) | Runtime: Node.js via OpenClaw Gateway
Architecture
┌─────────────────────────────────────────────────────────┐
│ index.ts (Entry Point) │
│ Plugin Registration · Config Parsing · Lifecycle Hooks │
└────────┬──────────┬──────────┬──────────┬───────────────┘
│ │ │ │
┌────▼───┐ ┌────▼───┐ ┌───▼────┐ ┌──▼──────────┐
│ store │ │embedder│ │retriever│ │ scopes │
│ .ts │ │ .ts │ │ .ts │ │ .ts │
└────────┘ └────────┘ └────────┘ └─────────────┘
│ │
┌────▼───┐ ┌─────▼──────────┐
│migrate │ │noise-filter.ts │
│ .ts │ │adaptive- │
└────────┘ │retrieval.ts │
└────────────────┘
┌─────────────┐ ┌──────────┐
│ tools.ts │ │ cli.ts │
│ (Agent API) │ │ (CLI) │
└─────────────┘ └──────────┘
File Reference (Quick Navigation)
| File | Purpose | Key Exports |
|---|---|---|
index.ts |
Plugin entry point. Registers with OpenClaw Plugin API, parses config, mounts lifecycle hooks | memoryLanceDBProPlugin (default), shouldCapture, detectCategory |
openclaw.plugin.json |
Plugin metadata + full JSON Schema config with uiHints |
— |
package.json |
NPM package. Deps: @lancedb/lancedb, openai, @sinclair/typebox |
— |
cli.ts |
CLI: memory-pro list/search/stats/delete/delete-bulk/export/import/reembed/migrate |
createMemoryCLI, registerMemoryCLI |
src/store.ts |
LanceDB storage layer. Table creation, FTS indexing, CRUD, vector/BM25 search | MemoryStore, MemoryEntry, loadLanceDB |
src/embedder.ts |
Embedding abstraction. OpenAI-compatible API, task-aware, LRU cache | Embedder, createEmbedder, getVectorDimensions |
src/retriever.ts |
Hybrid retrieval engine. Full scoring pipeline | MemoryRetriever, createRetriever, DEFAULT_RETRIEVAL_CONFIG |
src/scopes.ts |
Multi-scope access control | MemoryScopeManager, createScopeManager |
src/tools.ts |
Agent tool definitions: memory_recall/store/forget/update/stats/list |
registerAllMemoryTools |
src/noise-filter.ts |
Noise filter for low-quality content | isNoise, filterNoise |
src/adaptive-retrieval.ts |
Skip retrieval for greetings, commands, emoji | shouldSkipRetrieval |
src/migrate.ts |
Migration from legacy memory-lancedb |
MemoryMigrator, createMigrator |
scripts/jsonl_distill.py |
JSONL session distillation script (Python) | — |
Core Subsystem Reference
For detailed deep-dives into each subsystem, read the appropriate reference file:
- Retrieval Pipeline (scoring math, RRF fusion, reranking, all scoring stages): See references/retrieval_pipeline.md
- Storage & Data Model (LanceDB schema, FTS indexing, CRUD, vector dim): See references/storage_and_schema.md
- Embedding System (providers, task-aware API, caching, dimensions): See references/embedding_system.md
- Plugin Lifecycle & Config (hooks, registration, config parsing): See references/plugin_lifecycle.md
- Scope System (multi-scope isolation, agent access, patterns): See references/scope_system.md
- Tools & CLI (agent tools, CLI commands, parameters): See references/tools_and_cli.md
- Common Gotchas & Troubleshooting: See references/troubleshooting.md
Development Workflows
Adding a New Embedding Provider
- Check if it's OpenAI-compatible (most are). If so, no code change needed — just config
- If the model is not in
EMBEDDING_DIMENSIONSmap insrc/embedder.ts, add it - If the provider needs special request fields beyond
taskandnormalized, extendbuildPayload()insrc/embedder.ts - Test with
embedder.test()method - Document the provider in README.md table
Adding a New Rerank Provider
- Add provider name to
RerankProvidertype insrc/retriever.ts - Add case in
buildRerankRequest()for request format (headers + body) - Add case in
parseRerankResponse()for response parsing - Add to
rerankProviderenum inopenclaw.plugin.json - Test with actual API calls — reranker has 5s timeout protection
Adding a New Scoring Stage
- Create a
private apply<StageName>(results: RetrievalResult[]): RetrievalResult[]
Установить memory-lancedb-pro в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл memory-lancedb-pro?
Comprehensive guide for maintaining, debugging, and upgrading the memory-lancedb-pro OpenClaw plugin — an enhanced LanceDB-backed long-term memory system with hybrid retrieval (Vector + BM25), cross-encoder reranking, multi-scope isolation, noise filtering, adaptive retrieval, and a management CLI. Use this skill when: (1) developing new features or fixing bugs in memory-lancedb-pro, (2) modifying the retrieval pipeline (vector search, BM25, RRF fusion, reranking, scoring stages), (3) adding or changing embedding providers, (4) updating scope/access control logic, (5) modifying agent tools or CLI commands, (6) troubleshooting memory quality issues (noise, duplicates, low recall), (7) working on the JSONL session distillation pipeline, (8) migrating data between memory backends, or (9) understanding the plugin's architecture to plan enhancements.
Как установить скилл memory-lancedb-pro?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл memory-lancedb-pro запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic