360 Secure SkillHub
360 安全技能中心

Lovefromio Openclaw Persistent Memory

这是基于SQLite+FTS5的持久化内存系统,核心功能包括自动捕获/回忆跨会话上下文、快速语义搜索,还提供memory_search等4个内存管理工具。典型场景为AI交互时保留重要信息,避免重复输入。输入可为自然语言查询或工具指令,输出匹配记忆或操作结果,也可通过API接口调用,适合需要跨会话记忆能力的AI应用场景。

lovefromio
lovefromio
热度 41.67
最近更新 2026-05-11 17:46:05
分类:知识依赖:MCP 服务 / 第三方 API / 读写文件应用场景:笔记整理 / 研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add lovefromio-openclaw-persistent-memory
Metadata
name
openclaw-persistent-memory
version
0.1.0
description
Persistent memory system - automatic context capture and semantic search
author
Jason Brashear / Titanium Computing
repository
https://github.com/webdevtodayjason/openclaw_memory
metadata
{"openclaw":{"requires":{"bins":["openclaw-persistent-memory"]},"install":[{"id":"node","kind":"node","package":"openclaw-persistent-memory","bins":["openclaw-persistent-memory"],"label":"Install OpenClaw Persistent Memory (npm)"}]}}

OpenClaw Persistent Memory

Persistent memory system that automatically captures context across sessions using SQLite + FTS5.

Features

  • 🧠 Auto-capture - Important observations saved automatically after each response
  • 🔍 Auto-recall - Relevant memories injected before each prompt
  • 💾 SQLite + FTS5 - Fast full-text search across all memories
  • 🛠️ Tools - memory_search, memory_get, memory_store, memory_delete
  • 📊 Progressive disclosure - Token-efficient retrieval

Setup

  1. Install the npm package:

    npm install -g openclaw-persistent-memory
    
  2. Start the worker service:

    openclaw-persistent-memory start
    
  3. Install the OpenClaw extension:

    # Copy extension to OpenClaw extensions directory
    cp -r node_modules/openclaw-persistent-memory/extension ~/.openclaw/extensions/openclaw-mem
    cd ~/.openclaw/extensions/openclaw-mem && npm install
    
  4. Configure OpenClaw (in ~/.openclaw/openclaw.json):

    {
      "plugins": {
        "slots": {
          "memory": "openclaw-mem"
        },
        "allow": ["openclaw-mem"],
        "entries": {
          "openclaw-mem": {
            "enabled": true,
            "config": {
              "workerUrl": "http://127.0.0.1:37778",
              "autoCapture": true,
              "autoRecall": true
            }
          }
        }
      }
    }
    
  5. Restart OpenClaw gateway

Tools Provided

Tool Description
memory_search Search memories with natural language
memory_get Get a specific memory by ID
memory_store Save important information
memory_delete Delete a memory by ID

API Endpoints

Worker runs on http://127.0.0.1:37778:

Endpoint Method Description
/api/health GET Health check
/api/stats GET Database statistics
/api/search POST Full-text search
/api/observations GET List recent observations
/api/observations/:id GET Get observation
/api/observations/:id DELETE Delete observation
/api/observations/:id PATCH Update observation

Troubleshooting

Worker not running

curl http://127.0.0.1:37778/api/health
# If fails, restart:
openclaw-persistent-memory start

Auto-recall not working

  • Check OpenClaw logs: tail ~/.openclaw/logs/*.log | grep openclaw-mem
  • Verify plugins.slots.memory is set to "openclaw-mem"
  • Restart gateway after config changes