{
  "schemaVersion": "1.0",
  "item": {
    "slug": "elite-longterm-memory-local",
    "name": "Elite Longterm Memory",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/LHMiles/elite-longterm-memory-local",
    "canonicalUrl": "https://clawhub.ai/LHMiles/elite-longterm-memory-local",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/elite-longterm-memory-local",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=elite-longterm-memory-local",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "CHANGELOG.md",
      "README.md",
      "SKILL.md",
      "bin/init.js",
      "bin/memory.js",
      "bin/test.js"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/elite-longterm-memory-local"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/elite-longterm-memory-local",
    "agentPageUrl": "https://openagent3.xyz/skills/elite-longterm-memory-local/agent",
    "manifestUrl": "https://openagent3.xyz/skills/elite-longterm-memory-local/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/elite-longterm-memory-local/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Elite Longterm Memory (Local Edition) 🧠",
        "body": "基于 LanceDB + Pure JavaScript Embedding 的本地向量记忆系统，无需外部 API。"
      },
      {
        "title": "核心特性",
        "body": "✅ 纯本地运行 — Pure JavaScript embedding，零外部依赖\n✅ WAL 协议 — 写前日志，防数据丢失\n✅ LanceDB 向量搜索 — 语义召回相关记忆\n✅ 三层存储 — Hot/Warm/Cold 分层管理\n✅ 无需配置 — 无需 Ollama 或 OpenAI API key\n✅ 自动召回/捕获 — 智能注入相关上下文"
      },
      {
        "title": "架构",
        "body": "┌─────────────────────────────────────────────────────────────────┐\n│                    ELITE LONGTERM MEMORY                        │\n├─────────────────────────────────────────────────────────────────┤\n│                                                                 │\n│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐             │\n│  │   HOT RAM   │  │  WARM STORE │  │  COLD STORE │             │\n│  │             │  │             │  │             │             │\n│  │ SESSION-    │  │  LanceDB    │  │  Git-Notes  │             │\n│  │ STATE.md    │  │  Vectors    │  │  Knowledge  │             │\n│  │             │  │             │  │  Graph      │             │\n│  │ (survives   │  │ (semantic   │  │ (permanent  │             │\n│  │  compaction)│  │  search)    │  │  decisions) │             │\n│  └─────────────┘  └─────────────┘  └─────────────┘             │\n│         │                │                │                     │\n│         └────────────────┼────────────────┘                     │\n│                          ▼                                      │\n│                  ┌─────────────┐                                │\n│                  │  MEMORY.md  │  ← Curated long-term           │\n│                  │  + daily/   │    (human-readable)            │\n│                  └─────────────┘                                │\n│                                                                 │\n└─────────────────────────────────────────────────────────────────┘"
      },
      {
        "title": "五层记忆系统",
        "body": "层级文件/系统用途持久化1. Hot RAMSESSION-STATE.md活跃任务上下文survived compaction2. Warm StoreLanceDB Vectors语义搜索自动召回3. Cold StoreGit-Notes结构化决策永久保存4. ArchiveMEMORY.md + daily/人类可读精选归档5. EmbeddingOllama本地向量模型纯本地"
      },
      {
        "title": "1. 安装依赖",
        "body": "# 确保 Ollama 已安装并运行\nollama --version\n\n# 拉取向量模型\nollama pull nomic-embed-text\n\n# 安装 Node 依赖\ncd skills/elite-longterm-memory\nnpm install"
      },
      {
        "title": "2. 初始化记忆系统",
        "body": "node bin/init.js\n\n这会创建：\n\nSESSION-STATE.md — 热内存\nMEMORY.md — 长期记忆\nmemory/ — 每日日志目录\nmemory/vectors/ — LanceDB 数据库"
      },
      {
        "title": "3. 使用记忆工具",
        "body": "# 存储记忆\nnode bin/memory.js store \"用户喜欢深色模式\" --importance 0.9 --category preference\n\n# 搜索记忆\nnode bin/memory.js search \"用户界面偏好\"\n\n# 查看统计\nnode bin/memory.js stats\n\n# 删除记忆\nnode bin/memory.js forget --query \"深色模式\""
      },
      {
        "title": "启用插件",
        "body": "在 ~/.openclaw/openclaw.json 中添加：\n\n{\n  \"plugins\": {\n    \"entries\": {\n      \"elite-longterm-memory\": {\n        \"enabled\": true,\n        \"config\": {\n          \"ollamaUrl\": \"http://localhost:11434\",\n          \"embeddingModel\": \"nomic-embed-text\",\n          \"dbPath\": \"./memory/vectors\",\n          \"autoRecall\": true,\n          \"autoCapture\": false\n        }\n      }\n    }\n  }\n}"
      },
      {
        "title": "使用记忆工具",
        "body": "启用后，OpenClaw 会自动提供以下工具：\n\nmemory_recall — 搜索相关记忆\nmemory_store — 存储重要信息\nmemory_forget — 删除记忆"
      },
      {
        "title": "智能提示词",
        "body": "在 AGENTS.md 或 SOUL.md 中添加：\n\n## 记忆协议\n\n### 会话开始时\n1. 读取 SESSION-STATE.md — 获取热上下文\n2. 使用 memory_recall 搜索相关历史\n3. 检查 memory/YYYY-MM-DD.md 了解近期活动\n\n### 对话中\n- 用户给出具体细节？→ 先写入 SESSION-STATE.md，再回复\n- 重要决策？→ 使用 memory_store 存储\n- 表达偏好？→ memory_store --importance 0.9 --category preference\n\n### 会话结束时\n1. 更新 SESSION-STATE.md 最终状态\n2. 重要内容移至 MEMORY.md\n3. 创建/更新 memory/YYYY-MM-DD.md"
      },
      {
        "title": "WAL 协议（关键）",
        "body": "写前日志：先写状态，再回复。\n\n触发条件动作用户表达偏好写入 SESSION-STATE.md → 然后回复用户做出决策写入 SESSION-STATE.md → 然后回复用户给出期限写入 SESSION-STATE.md → 然后回复用户纠正你写入 SESSION-STATE.md → 然后回复\n\n为什么？ 如果先回复再保存，崩溃/压缩会导致上下文丢失。WAL 确保数据持久。"
      },
      {
        "title": "维护命令",
        "body": "# 查看向量记忆统计\nnode bin/memory.js stats\n\n# 搜索所有记忆\nnode bin/memory.js search \"*\" --limit 50\n\n# 清理重复记忆\nnode bin/memory.js dedup\n\n# 导出记忆\nnode bin/memory.js export --format json > memories.json\n\n# 备份记忆\nnode bin/memory.js backup ./backups/memory-$(date +%Y%m%d).zip"
      },
      {
        "title": "故障排查",
        "body": "Ollama 连接失败\n→ 检查 ollama serve 是否运行\n→ 检查 OLLAMA_HOST 环境变量\n\n向量搜索无结果\n→ 检查 LanceDB 路径是否正确\n→ 确认已存储记忆：node bin/memory.js stats\n\n内存占用过高\n→ 运行 node bin/memory.js compact 压缩向量\n→ 清理旧记忆：node bin/memory.js cleanup --before 30d"
      },
      {
        "title": "为什么本地 Embedding？",
        "body": "对比OpenAI APIOllama 本地费用按 token 收费免费延迟网络依赖本地毫秒级隐私数据出域完全本地离线不可用可用质量text-embedding-3nomic-embed-text\n\n对于个人使用，nomic-embed-text 的质量足够，且完全免费。"
      },
      {
        "title": "链接",
        "body": "Ollama: https://ollama.com\nLanceDB: https://lancedb.github.io (npm: vectordb)\nnomic-embed-text: https://ollama.com/library/nomic-embed-text\n\n本地优先，隐私至上。"
      }
    ],
    "body": "Elite Longterm Memory (Local Edition) 🧠\n\n基于 LanceDB + Pure JavaScript Embedding 的本地向量记忆系统，无需外部 API。\n\n核心特性\n✅ 纯本地运行 — Pure JavaScript embedding，零外部依赖\n✅ WAL 协议 — 写前日志，防数据丢失\n✅ LanceDB 向量搜索 — 语义召回相关记忆\n✅ 三层存储 — Hot/Warm/Cold 分层管理\n✅ 无需配置 — 无需 Ollama 或 OpenAI API key\n✅ 自动召回/捕获 — 智能注入相关上下文\n架构\n┌─────────────────────────────────────────────────────────────────┐\n│                    ELITE LONGTERM MEMORY                        │\n├─────────────────────────────────────────────────────────────────┤\n│                                                                 │\n│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐             │\n│  │   HOT RAM   │  │  WARM STORE │  │  COLD STORE │             │\n│  │             │  │             │  │             │             │\n│  │ SESSION-    │  │  LanceDB    │  │  Git-Notes  │             │\n│  │ STATE.md    │  │  Vectors    │  │  Knowledge  │             │\n│  │             │  │             │  │  Graph      │             │\n│  │ (survives   │  │ (semantic   │  │ (permanent  │             │\n│  │  compaction)│  │  search)    │  │  decisions) │             │\n│  └─────────────┘  └─────────────┘  └─────────────┘             │\n│         │                │                │                     │\n│         └────────────────┼────────────────┘                     │\n│                          ▼                                      │\n│                  ┌─────────────┐                                │\n│                  │  MEMORY.md  │  ← Curated long-term           │\n│                  │  + daily/   │    (human-readable)            │\n│                  └─────────────┘                                │\n│                                                                 │\n└─────────────────────────────────────────────────────────────────┘\n\n五层记忆系统\n层级\t文件/系统\t用途\t持久化\n1. Hot RAM\tSESSION-STATE.md\t活跃任务上下文\tsurvived compaction\n2. Warm Store\tLanceDB Vectors\t语义搜索\t自动召回\n3. Cold Store\tGit-Notes\t结构化决策\t永久保存\n4. Archive\tMEMORY.md + daily/\t人类可读\t精选归档\n5. Embedding\tOllama\t本地向量模型\t纯本地\n快速开始\n1. 安装依赖\n# 确保 Ollama 已安装并运行\nollama --version\n\n# 拉取向量模型\nollama pull nomic-embed-text\n\n# 安装 Node 依赖\ncd skills/elite-longterm-memory\nnpm install\n\n2. 初始化记忆系统\nnode bin/init.js\n\n\n这会创建：\n\nSESSION-STATE.md — 热内存\nMEMORY.md — 长期记忆\nmemory/ — 每日日志目录\nmemory/vectors/ — LanceDB 数据库\n3. 使用记忆工具\n# 存储记忆\nnode bin/memory.js store \"用户喜欢深色模式\" --importance 0.9 --category preference\n\n# 搜索记忆\nnode bin/memory.js search \"用户界面偏好\"\n\n# 查看统计\nnode bin/memory.js stats\n\n# 删除记忆\nnode bin/memory.js forget --query \"深色模式\"\n\nOpenClaw 集成\n启用插件\n\n在 ~/.openclaw/openclaw.json 中添加：\n\n{\n  \"plugins\": {\n    \"entries\": {\n      \"elite-longterm-memory\": {\n        \"enabled\": true,\n        \"config\": {\n          \"ollamaUrl\": \"http://localhost:11434\",\n          \"embeddingModel\": \"nomic-embed-text\",\n          \"dbPath\": \"./memory/vectors\",\n          \"autoRecall\": true,\n          \"autoCapture\": false\n        }\n      }\n    }\n  }\n}\n\n使用记忆工具\n\n启用后，OpenClaw 会自动提供以下工具：\n\nmemory_recall — 搜索相关记忆\nmemory_store — 存储重要信息\nmemory_forget — 删除记忆\n智能提示词\n\n在 AGENTS.md 或 SOUL.md 中添加：\n\n## 记忆协议\n\n### 会话开始时\n1. 读取 SESSION-STATE.md — 获取热上下文\n2. 使用 memory_recall 搜索相关历史\n3. 检查 memory/YYYY-MM-DD.md 了解近期活动\n\n### 对话中\n- 用户给出具体细节？→ 先写入 SESSION-STATE.md，再回复\n- 重要决策？→ 使用 memory_store 存储\n- 表达偏好？→ memory_store --importance 0.9 --category preference\n\n### 会话结束时\n1. 更新 SESSION-STATE.md 最终状态\n2. 重要内容移至 MEMORY.md\n3. 创建/更新 memory/YYYY-MM-DD.md\n\nWAL 协议（关键）\n\n写前日志：先写状态，再回复。\n\n触发条件\t动作\n用户表达偏好\t写入 SESSION-STATE.md → 然后回复\n用户做出决策\t写入 SESSION-STATE.md → 然后回复\n用户给出期限\t写入 SESSION-STATE.md → 然后回复\n用户纠正你\t写入 SESSION-STATE.md → 然后回复\n\n为什么？ 如果先回复再保存，崩溃/压缩会导致上下文丢失。WAL 确保数据持久。\n\n维护命令\n# 查看向量记忆统计\nnode bin/memory.js stats\n\n# 搜索所有记忆\nnode bin/memory.js search \"*\" --limit 50\n\n# 清理重复记忆\nnode bin/memory.js dedup\n\n# 导出记忆\nnode bin/memory.js export --format json > memories.json\n\n# 备份记忆\nnode bin/memory.js backup ./backups/memory-$(date +%Y%m%d).zip\n\n故障排查\n\nOllama 连接失败 → 检查 ollama serve 是否运行 → 检查 OLLAMA_HOST 环境变量\n\n向量搜索无结果 → 检查 LanceDB 路径是否正确 → 确认已存储记忆：node bin/memory.js stats\n\n内存占用过高 → 运行 node bin/memory.js compact 压缩向量 → 清理旧记忆：node bin/memory.js cleanup --before 30d\n\n为什么本地 Embedding？\n对比\tOpenAI API\tOllama 本地\n费用\t按 token 收费\t免费\n延迟\t网络依赖\t本地毫秒级\n隐私\t数据出域\t完全本地\n离线\t不可用\t可用\n质量\ttext-embedding-3\tnomic-embed-text\n\n对于个人使用，nomic-embed-text 的质量足够，且完全免费。\n\n链接\nOllama: https://ollama.com\nLanceDB: https://lancedb.github.io (npm: vectordb)\nnomic-embed-text: https://ollama.com/library/nomic-embed-text\n\n本地优先，隐私至上。"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/LHMiles/elite-longterm-memory-local",
    "publisherUrl": "https://clawhub.ai/LHMiles/elite-longterm-memory-local",
    "owner": "LHMiles",
    "version": "1.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/elite-longterm-memory-local",
    "downloadUrl": "https://openagent3.xyz/downloads/elite-longterm-memory-local",
    "agentUrl": "https://openagent3.xyz/skills/elite-longterm-memory-local/agent",
    "manifestUrl": "https://openagent3.xyz/skills/elite-longterm-memory-local/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/elite-longterm-memory-local/agent.md"
  }
}