Skip to main content

Record and search your AI chat history. Markdown files, zero dependencies beyond MCP.

Project description

OpenClaw Memory

Your AI conversations disappear after every session. OpenClaw Memory fixes that.

Every time you chat with an AI coding assistant, valuable context — decisions, solutions, debugging steps — vanishes when the session ends. The next session starts from zero.

OpenClaw Memory automatically records every conversation turn to local Markdown files, making your entire AI chat history searchable and browsable. No cloud, no database — just plain text files in your project.

How It Works

You chat with AI  →  Every turn auto-saved to .openclaw_memory/journal/2026-02-24.md
                  →  Search past conversations via MCP tool or web viewer

Each journal entry captures the complete conversation: timestamps, model used, your input, the AI's full response, and any code changes made.

Quick Start

1. Install

pip install claw-memory

2. Initialize in your project

cd your-project
claw-memory init

This creates:

  • .openclaw_memory/journal/ — where chat history lives
  • .cursor/mcp.json — connects the MCP server to Cursor
  • .cursor/rules/memory.mdc — tells the AI agent to auto-record

3. Restart Cursor — that's it. Every conversation is now being recorded.

Searching Past Conversations

The AI agent can search your history automatically. Just ask naturally:

"We discussed this before, what was the solution?"

"Last time we fixed a similar bug, how did we do it?"

The agent will call memory_search() behind the scenes and find matching conversations.

Search via Web Viewer

# Single project (current directory)
claw-memory web

# Multiple projects — scan a parent directory
claw-memory web --scan-dir ~/projects

Opens a browser-based viewer where you can:

  • Browse journal files by date
  • Full-text search across all conversations
  • Dark/light mode
  • Multi-project view: use --scan-dir to scan a parent directory and browse all projects in one place, with sidebar grouped by project

What Gets Recorded

Each conversation turn is saved as Markdown:

## 14:32 | claude-4-opus

### User

How do I fix the N+1 query problem in the user list endpoint?

### Agent

The issue is in `api/users.py` where each user triggers a separate query for their roles...

### Code Changes

- `api/users.py` (modified)
- `tests/test_users.py` (modified)

MCP Tools

Tool Purpose
memory_log_conversation Record a complete conversation turn
memory_log_conversation_append Append to the last turn (for long responses)
memory_search Search chat history by keyword

Storage

All data is stored locally in .openclaw_memory/journal/ as plain Markdown files — one file per day. No database, no cloud sync. You own your data.

The .openclaw_memory/ directory is auto-gitignored to prevent accidental commits of chat history.

Project Isolation

Each project gets its own .openclaw_memory/ directory. MCP tools always operate on the current project only.

To view multiple projects together, use the web viewer with --scan-dir.

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claw_memory-1.1.0.tar.gz (247.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claw_memory-1.1.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file claw_memory-1.1.0.tar.gz.

File metadata

  • Download URL: claw_memory-1.1.0.tar.gz
  • Upload date:
  • Size: 247.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for claw_memory-1.1.0.tar.gz
Algorithm Hash digest
SHA256 272ef13076b22ae017229774ba1bc7e615e602e7acd9396bf7739e5dcea2fede
MD5 1be3833c88edba991e347eaf130755d8
BLAKE2b-256 42aac492382345e9821a3cdbe3fdeebf0aa7a0100fce928893e15ba0c20c5d15

See more details on using hashes here.

File details

Details for the file claw_memory-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: claw_memory-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for claw_memory-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3319f9d872b7619d8847767c391df1219a48e09d6ec610bd4f00beb0b1ba626f
MD5 d0463dbef40ca0e1409d85388e26589f
BLAKE2b-256 e09cab700b04c6417f01c4b176abcbe38c8eed19acbcf76c4f990f08bb35df08

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page