Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
Local vector memory system with LanceDB + Pure JS embedding. No native modules or external APIs required.
Local vector memory system with LanceDB + Pure JS embedding. No native modules or external APIs required.
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
基于 LanceDB + Pure JavaScript Embedding 的本地向量记忆系统,无需外部 API。
✅ 纯本地运行 — Pure JavaScript embedding,零外部依赖 ✅ WAL 协议 — 写前日志,防数据丢失 ✅ LanceDB 向量搜索 — 语义召回相关记忆 ✅ 三层存储 — Hot/Warm/Cold 分层管理 ✅ 无需配置 — 无需 Ollama 或 OpenAI API key ✅ 自动召回/捕获 — 智能注入相关上下文
┌─────────────────────────────────────────────────────────────────┐ │ ELITE LONGTERM MEMORY │ ├─────────────────────────────────────────────────────────────────┤ │ │ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │ │ HOT RAM │ │ WARM STORE │ │ COLD STORE │ │ │ │ │ │ │ │ │ │ │ │ SESSION- │ │ LanceDB │ │ Git-Notes │ │ │ │ STATE.md │ │ Vectors │ │ Knowledge │ │ │ │ │ │ │ │ Graph │ │ │ │ (survives │ │ (semantic │ │ (permanent │ │ │ │ compaction)│ │ search) │ │ decisions) │ │ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │ │ │ │ │ │ └────────────────┼────────────────┘ │ │ ▼ │ │ ┌─────────────┐ │ │ │ MEMORY.md │ ← Curated long-term │ │ │ + daily/ │ (human-readable) │ │ └─────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────┘
层级文件/系统用途持久化1. Hot RAMSESSION-STATE.md活跃任务上下文survived compaction2. Warm StoreLanceDB Vectors语义搜索自动召回3. Cold StoreGit-Notes结构化决策永久保存4. ArchiveMEMORY.md + daily/人类可读精选归档5. EmbeddingOllama本地向量模型纯本地
# 确保 Ollama 已安装并运行 ollama --version # 拉取向量模型 ollama pull nomic-embed-text # 安装 Node 依赖 cd skills/elite-longterm-memory npm install
node bin/init.js 这会创建: SESSION-STATE.md — 热内存 MEMORY.md — 长期记忆 memory/ — 每日日志目录 memory/vectors/ — LanceDB 数据库
# 存储记忆 node bin/memory.js store "用户喜欢深色模式" --importance 0.9 --category preference # 搜索记忆 node bin/memory.js search "用户界面偏好" # 查看统计 node bin/memory.js stats # 删除记忆 node bin/memory.js forget --query "深色模式"
在 ~/.openclaw/openclaw.json 中添加: { "plugins": { "entries": { "elite-longterm-memory": { "enabled": true, "config": { "ollamaUrl": "http://localhost:11434", "embeddingModel": "nomic-embed-text", "dbPath": "./memory/vectors", "autoRecall": true, "autoCapture": false } } } } }
启用后,OpenClaw 会自动提供以下工具: memory_recall — 搜索相关记忆 memory_store — 存储重要信息 memory_forget — 删除记忆
写前日志:先写状态,再回复。 触发条件动作用户表达偏好写入 SESSION-STATE.md → 然后回复用户做出决策写入 SESSION-STATE.md → 然后回复用户给出期限写入 SESSION-STATE.md → 然后回复用户纠正你写入 SESSION-STATE.md → 然后回复 为什么? 如果先回复再保存,崩溃/压缩会导致上下文丢失。WAL 确保数据持久。
# 查看向量记忆统计 node bin/memory.js stats # 搜索所有记忆 node bin/memory.js search "*" --limit 50 # 清理重复记忆 node bin/memory.js dedup # 导出记忆 node bin/memory.js export --format json > memories.json # 备份记忆 node bin/memory.js backup ./backups/memory-$(date +%Y%m%d).zip
Ollama 连接失败 → 检查 ollama serve 是否运行 → 检查 OLLAMA_HOST 环境变量 向量搜索无结果 → 检查 LanceDB 路径是否正确 → 确认已存储记忆:node bin/memory.js stats 内存占用过高 → 运行 node bin/memory.js compact 压缩向量 → 清理旧记忆:node bin/memory.js cleanup --before 30d
对比OpenAI APIOllama 本地费用按 token 收费免费延迟网络依赖本地毫秒级隐私数据出域完全本地离线不可用可用质量text-embedding-3nomic-embed-text 对于个人使用,nomic-embed-text 的质量足够,且完全免费。
Ollama: https://ollama.com LanceDB: https://lancedb.github.io (npm: vectordb) nomic-embed-text: https://ollama.com/library/nomic-embed-text 本地优先,隐私至上。
Code helpers, APIs, CLIs, browser automation, testing, and developer operations.
Largest current source with strong distribution and engagement signals.