Markdown Edit

Claude-Mem (cmem.ai)

Claude-Mem (cmem.ai) is an open-source persistent memory system and context stream designed specifically for terminal coding agents and AI workflows, such as Claude Code, OpenClaw, and cursor-based environments. It captures tool executions, user decisions, file edits, and architectural constraints across development sessions, compressing and injecting relevant memories back into future agent turns.

graph LR
    subgraph "Coding Session"
        Terminal[CLI / OpenClaw / Claude Code] --> ToolExec[Tool Calls & Code Edits]
    end

    ToolExec --> Extraction[CMEM Observation Extractor]
    Extraction --> PrivacyFilter["Privacy Redactor (<private> Tags)"]
    PrivacyFilter --> LocalStore[(Local SQLite / Markdown Memory)]
    LocalStore <--> Sync[CMEM Cloud Sync]
    LocalStore --> PromptInjection[Context Injection into Next Agent Session]

Key Characteristics

Installation & Setup

Install locally via npx:

npx claude-mem install

Or configure via OpenClaw plugin:

curl -fsSL https://cmem.ai/openclaw.sh | bash

CLI Usage & Commands

Claude-Mem exposes simple commands to view, search, and manage stored context:

# Check memory health and stored record count
cmem status

# Search memory for past architectural decisions
cmem search "authentication architecture"

# Manually record a project rule or preference
cmem remember "Always run nix-shell before executing python tests"