Skip to main content

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

Metadata

Release files for claw-memory 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claw-memory 1.2.1
File Size Uploaded
claw_memory-1.2.1.tar.gz 226.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for claw-memory 1.2.1
File Interpreter ABI Platform
claw_memory-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 247.2 kB

Release files / claw_memory-1.2.1.tar.gz

Download URL claw_memory-1.2.1.tar.gz
Size 226.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7257f504e66bd8073c57bd01b726c1a0b3a6a114dcb63f5b24f31d45cb57cded
BLAKE2b-256 checksum
How to use checksums
7d8d77c3a79d3cef442aba74eb84977b644e79527c537930823616139ffbd85f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / claw_memory-1.2.1-py3-none-any.whl

Download URL claw_memory-1.2.1-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87e41b4e6b93802ac330d2d7744b8a4c74356e43e84ce2a865fd2a8b9ffbb6bd
BLAKE2b-256 checksum
How to use checksums
ae01f3280d9a3805441f068438b015a281a4c05d20e67d48a33e0d6bf2cbb6dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page