claw-mem: Three-Tier Memory

v2.0.1

Three-Tier Memory System for OpenClaw. Store and recall memories across sessions with Episodic, Semantic, and Procedural layers. BM25 + Heuristic retrieval.

0· 85·0 current·0 all-time
byPeter Cheng@petercheng

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for petercheng/opensourceclaw-claw-mem.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "claw-mem: Three-Tier Memory" (petercheng/opensourceclaw-claw-mem) from ClawHub.
Skill page: https://clawhub.ai/petercheng/opensourceclaw-claw-mem
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required binaries: python3
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install opensourceclaw-claw-mem

ClawHub CLI

Package manager switcher

npx clawhub@latest install opensourceclaw-claw-mem
Security Scan
Capability signals
Crypto
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description, SKILL.md, and the three scripts all align: they implement a local memory system, rely on a Python package named 'claw_mem', and operate on a workspace directory. No unrelated credentials, binaries, or system-wide config are requested.
Instruction Scope
Runtime instructions limit actions to installing the package, running the provided scripts, and configuring a workspace path and a search-mode env var. The SKILL.md does not instruct reading unrelated files, harvesting environment secrets, or posting data to third-party endpoints.
Install Mechanism
The README recommends pip installing directly from the GitHub repository (git+https://github.com/opensourceclaw/claw-mem.git). That is a common and expected install path but it does execute code from that remote repository at install-time — review the upstream repository before running pip install.
Credentials
No required environment variables or credentials are declared. Only a search-mode env var (CLAW_MEM_SEARCH_MODE) is suggested, and the scripts use a local workspace path (~/.openclaw/workspace) for SQLite persistence. No disproportionate secret access is requested.
Persistence & Privilege
Skill is not forced always-on and does not request elevated system privileges. It will read/write local SQLite DBs in the specified workspace (episodic.db, semantic.db, procedural.db) which is expected for a memory plugin. Note: the default config in SKILL.md enables autoCapture/autoRecall, which means the plugin will persist conversation data if enabled.
Assessment
This skill appears coherent for a local memory plugin, but take the following precautions before installing: 1) Review the upstream GitHub repo (https://github.com/opensourceclaw/claw-mem) because pip install from a git URL runs code from that repository during install. 2) Install into an isolated environment (virtualenv) to limit impact. 3) Be aware it persists data to ~/.openclaw/workspace (SQLite files) — avoid storing sensitive secrets there and consider its autoCapture/autoRecall settings. 4) If you need stronger assurance, inspect the full claw_mem package source (especially any network code or RPC bridge implementation) before running the bridge. Otherwise the package and included scripts are proportionate to the stated purpose.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🧠 Clawdis
Binspython3
aivk97ct1155es4cxcv0bc59ebs2h85099zlatestvk97ct1155es4cxcv0bc59ebs2h85099zmemoryvk97ct1155es4cxcv0bc59ebs2h85099zopenclawvk97ct1155es4cxcv0bc59ebs2h85099z
85downloads
0stars
2versions
Updated 1w ago
v2.0.1
MIT-0

claw-mem: Three-Tier Memory System

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

Prerequisites

pip 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

LayerPurposeExample
EpisodicEvent sequencesSession context
SemanticKnowledge factsUser preferences
ProceduralRulesBest practices

Retrieval Modes

ModeDescriptionUse Case
keywordSimple keyword matchQuick lookup
bm25BM25 rankingRelevance ranking
hybridBM25 + KeywordBalanced retrieval
enhanced_smartFull pipelineBest 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

OperationLatency
Initialize~4ms
Store~8ms
Search~5ms
Average~6ms

Advanced

See references for detailed documentation:

Comments

Loading comments...