360 Secure SkillHub
360 安全技能中心

Skill

为 OpenClaw 提供三层(情景、语义、程序)本地记忆:通过 Python 脚本存储和检索记忆,支持关键词、BM25、混合与增强检索模式,可配置自动回忆、自动捕获与工作区目录,运行时依赖 Python3。

分类:知识
petercheng
petercheng
热度 2.64
最近更新 2026-05-01 13:51:49

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add petercheng/opensourceclaw-claw-mem
兼容性
通用兼容
联网要求
联网要求未确认
数据出网
数据不出本机
Metadata
name
claw-mem
description
Three-Tier Memory System for OpenClaw. Store and recall memories across sessions with Episodic, Semantic, and Procedural layers. BM25 + Heuristic retrieval.
homepage
https://github.com/opensourceclaw/claw-mem
metadata
{"clawdbot":{"emoji":"🧠","requires":{"bins":["python3"],"packages":["claw-mem"]}}}

claw-mem: Three-Tier Memory System

Local-first memory system with three memory layers and intelligent retrieval.

Prerequisites

pip3 install git+https://github.com/opensourceclaw/claw-mem.git

Quick Start

Search Memory

python3 {baseDir}/scripts/search.py "project deadlines" --limit 10

Store Memory

python3 {baseDir}/scripts/store.py "User preference" --category preference

Start Bridge (for OpenClaw integration)

python3 {baseDir}/scripts/bridge.py --workspace ~/.openclaw/workspace

Memory Layers

Layer Purpose Example
Episodic Event sequences Session context
Semantic Knowledge facts User preferences
Procedural Rules Best practices

Retrieval Modes

Mode Description Use Case
keyword Simple keyword match Quick lookup
bm25 BM25 ranking Relevance ranking
hybrid BM25 + Keyword Balanced retrieval
enhanced_smart Full pipeline Best quality

Set mode via environment:

export CLAW_MEM_SEARCH_MODE=enhanced_smart

Configuration

OpenClaw config (openclaw.config.json):

{
  "plugins": {
    "slots": {
      "memory": "claw-mem"
    },
    "claw-mem": {
      "config": {
        "workspaceDir": "~/.openclaw/workspace",
        "autoRecall": true,
        "autoCapture": true,
        "topK": 10
      }
    }
  }
}

Performance

Operation Latency
Initialize ~4ms
Store ~8ms
Search ~5ms
Average ~6ms

Advanced

See references for detailed documentation: