Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

memory-lancedb-pro内存 lancedb pro

Agent Skill

memory-lancedb-pro 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

13,994

周安装

595

GitHub Stars

47

下载量

4,903
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:memory-lancedb-pro(内存 lancedb pro)
来源仓库:https://github.com/win4r/memory-lancedb-pro-skill
仓库路径:skills/memory-lancedb-pro
安装命令:
npx skills add https://github.com/win4r/memory-lancedb-pro-skill --skill memory-lancedb-pro
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/win4r/memory-lancedb-pro-skill --skill memory-lancedb-pro

简介

LanceDB 支持的长期内存系统,具有混合检索、重新排序、多范围隔离和管理 CLI。

  • 混合检索管道结合了矢量搜索、BM25 全文搜索、倒数排名融合、跨编码器重新排名和自适应评分阶段(新近度、重要性、长度归一化、时间衰减、噪声过滤、MMR)
  • 用于访问控制的多范围内存隔离、带有类别检测(偏好/事实/决策/实体)的自动捕获,以及可选的自动召回注入到代理上下文中
  • 与 OpenAI 兼容的嵌入抽象,具有任务感知请求、LRU 缓存以及对多个嵌入提供程序的支持;通过 Cohere 或 Jina 重新排名
  • 用于内存管理的 CLI 命令:列表、搜索、统计、删除、批量操作、导出/导入、重新嵌入以及从旧内存-lancedb 迁移
  • 用于回忆、存储、遗忘、更新和统计的代理工具;低质量内容的噪声过滤;用于数据预处理的 JSONL 会话蒸馏管道

SKILL.md

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)

FilePurposeKey Exports
index.tsPlugin entry point. Registers with OpenClaw Plugin API, parses config, mounts lifecycle hooksmemoryLanceDBProPlugin (default), shouldCapture, detectCategory
openclaw.plugin.jsonPlugin metadata + full JSON Schema config with uiHints
package.jsonNPM package. Deps: @lancedb/lancedb, openai, @sinclair/typebox
cli.tsCLI: memory-pro list/search/stats/delete/delete-bulk/export/import/reembed/migratecreateMemoryCLI, registerMemoryCLI
src/store.tsLanceDB storage layer. Table creation, FTS indexing, CRUD, vector/BM25 searchMemoryStore, MemoryEntry, loadLanceDB
src/embedder.tsEmbedding abstraction. OpenAI-compatible API, task-aware, LRU cacheEmbedder, createEmbedder, getVectorDimensions
src/retriever.tsHybrid retrieval engine. Full scoring pipelineMemoryRetriever, createRetriever, DEFAULT_RETRIEVAL_CONFIG
src/scopes.tsMulti-scope access controlMemoryScopeManager, createScopeManager
src/tools.tsAgent tool definitions: memory_recall/store/forget/update/stats/listregisterAllMemoryTools
src/noise-filter.tsNoise filter for low-quality contentisNoise, filterNoise
src/adaptive-retrieval.tsSkip retrieval for greetings, commands, emojishouldSkipRetrieval
src/migrate.tsMigration from legacy memory-lancedbMemoryMigrator, createMigrator
scripts/jsonl_distill.pyJSONL session distillation script (Python)

Core Subsystem Reference

For detailed deep-dives into each subsystem, read the appropriate reference file:

Development Workflows

Adding a New Embedding Provider

  1. Check if it's OpenAI-compatible (most are). If so, no code change needed — just config
  2. If the model is not in EMBEDDING_DIMENSIONS map in src/embedder.ts, add it
  3. If the provider needs special request fields beyond task and normalized, extend buildPayload() in src/embedder.ts
  4. Test with embedder.test() method
  5. Document the provider in README.md table

Adding a New Rerank Provider

  1. Add provider name to RerankProvider type in src/retriever.ts
  2. Add case in buildRerankRequest() for request format (headers + body)
  3. Add case in parseRerankResponse() for response parsing
  4. Add to rerankProvider enum in openclaw.plugin.json
  5. Test with actual API calls — reranker has 5s timeout protection

Adding a New Scoring Stage

  1. Create a private apply<StageName>(results: RetrievalResult[]): RetrievalResult[] method in MemoryRetriever
  2. Add corresponding config fields to RetrievalConfig interface
  3. Insert the stage in the pipeline sequence in both hybridRetrieval() and vectorOnlyRetrieval()
  4. Add defaults to DEFAULT_RETRIEVAL_CONFIG
  5. Add JSON Schema fields to openclaw.plugin.json
  6. Pipeline order: Fusion → Rerank → Recency → Importance → LengthNorm → TimeDecay → HardMin → Noise → MMR

Adding a New Agent Tool

  1. Create registerMemory<ToolName>Tool() in src/tools.ts
  2. Define parameters with Type.Object() from @sinclair/typebox
  3. Use stringEnum() from openclaw/plugin-sdk for enum params
  4. Always validate scope access via context.scopeManager
  5. Register in registerAllMemoryTools() — decide if core (always) or management (optional)
  6. Return {content: [{type: "text", text}], details: {...}}

Adding a New CLI Command

  1. Add command in registerMemoryCLI() in cli.ts
  2. Pattern: memory.command("name <args>").description("...").option("--flag", "...").action(async (args, opts) => {...})
  3. Support --json flag for machine-readable output
  4. Use process.exit(1) for error cases
  5. CLI is registered via api.registerCli() in index.ts

Modifying Auto-Capture Logic

  1. shouldCapture(text) in index.ts controls what gets auto-captured
  2. MEMORY_TRIGGERS regex array defines trigger patterns (supports EN/CJK)
  3. detectCategory(text) classifies captures as preference/fact/decision/entity/other
  4. Auto-capture runs in agent_end hook, limited to 3 per turn
  5. Duplicate detection threshold: cosine similarity > 0.95

Modifying Auto-Recall Logic

  1. Auto-recall uses before_agent_start hook (OFF by default)
  2. shouldSkipRetrieval() from src/adaptive-retrieval.ts gates retrieval
  3. Injected as <relevant-memories> XML block with UNTRUSTED DATA warning
  4. sanitizeForContext() strips HTML, newlines, limits to 300 chars per memory
  5. Max 3 memories injected per turn

Key Design Decisions

  • autoRecall defaults to OFF — prevents model from echoing injected memory context
  • autoCapture defaults to ON — transparent memory accumulation
  • sessionMemory defaults to OFF — raw session summaries degrade retrieval quality; use JSONL distillation instead
  • LanceDB dynamic import — loaded asynchronously to avoid blocking; cached in singleton promise
  • Startup checks are fire-and-forget — gateway binds HTTP port immediately; embedding/retrieval tests run in background with 8s timeout
  • Daily JSONL backup — 24h interval, keeps last 7 files, runs 1 min after start
  • BM25 score normalization — raw BM25 scores are unbounded, normalized with sigmoid: 1 / (1 + exp(-score/5))
  • Update = delete + re-add — LanceDB doesn't support in-place updates
  • ID prefix matching — 8+ hex char prefix resolves to full UUID for user convenience
  • CJK-aware thresholds — shorter minimum lengths for Chinese/Japanese/Korean text (4–6 chars vs 10–15 for English)
  • Env var resolution${VAR} syntax resolved at config parse time; gateway service may not inherit shell env

Testing

  • Smoke test: node test/cli-smoke.mjs
  • Manual verification: openclaw plugins doctor, openclaw memory-pro stats
  • Embedding test: embedder.test() returns {success, dimensions, error?}
  • Retrieval test: retriever.test() returns {success, mode, hasFtsSupport, error?}

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.64%
按下载量换算1,845

Claude

29.93%
按下载量换算1,467

Cursor

17.68%
按下载量换算867

Gemini CLI

9.12%
按下载量换算447

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/win4r/memory-lancedb-pro-skill --skill memory-lancedb-pro 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills