
Security News
PolinRider: North Korea-Linked Supply Chain Campaign Expands Across Open Source Ecosystems
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.
openclaw-persistent-memory
Advanced tools
Persistent memory system for OpenClaw - automatic context capture, semantic search, and progressive disclosure
Persistent memory system for OpenClaw - automatically captures context across sessions, enabling semantic search and progressive disclosure of past work.
Inspired by and adapted from Claude-Mem by Alex Newman (@thedotmack)
OpenClaw agents wake up fresh each session. Currently, continuity relies on:
MEMORY.md filesmemory/YYYY-MM-DD.mdOpenClaw-Mem changes this:
┌─────────────────────────────────────────────────────────────────────┐
│ OpenClaw Gateway │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ SessionStart │ │ ToolResult │ │ SessionEnd │ │
│ │ Hook │ │ Hook │ │ Hook │ │
│ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │
│ │ │ │ │
│ └───────────────────┼───────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────┐ │
│ │ OpenClaw-Mem │ │
│ │ Worker Service │ │
│ │ (port 37778) │ │
│ └────────┬────────┘ │
│ │ │
│ ┌──────────────────┼──────────────────┐ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
│ │ SQLite │ │ Chroma │ │ Web UI │ │
│ │ Database │ │ Vector DB │ │ Viewer │ │
│ └────────────┘ └────────────┘ └────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────┘
Worker Service (src/worker/) - HTTP API server
Lifecycle Hooks (src/hooks/) - OpenClaw integration points
session-start.ts - Inject past context, start workertool-result.ts - Capture tool observationssession-end.ts - Generate session summaryDatabase (src/database/) - Storage layer
Search (src/search/) - Query engine
MCP Tools (src/mcp/) - Model Context Protocol integration
search - Query memory with filterstimeline - Chronological contextget_observations - Fetch full details by ID# Clone the repo
git clone https://github.com/webdevtodayjason/openclaw_memory
cd openclaw_memory
# Install dependencies
npm install
# Build
npm run build
# Link globally (optional)
npm link
# Start in foreground (for testing)
npm run dev
# Or start as daemon
openclaw-mem start-daemon
# Verify it's running
curl http://127.0.0.1:37778/api/health
# Copy extension to OpenClaw extensions directory
cp -r extension ~/.openclaw/extensions/openclaw-mem
# Or symlink for development
ln -s $(pwd)/extension ~/.openclaw/extensions/openclaw-mem
Add to your OpenClaw config (~/.openclaw/config.yaml):
extensions:
openclaw-mem:
enabled: true
workerUrl: "http://127.0.0.1:37778"
autoCapture: true # Auto-capture tool results
autoRecall: true # Auto-inject past context
maxContextTokens: 4000 # Token budget for context injection
# Check worker status
openclaw mem status
# Should show: ✓ Worker running
Once installed, OpenClaw-Mem works automatically:
In any OpenClaw session, you can search past work:
> What did we work on with the morning briefing script?
[OpenClaw-Mem searches observations]
Found 3 relevant observations:
- #1234 (2026-02-01): Fixed PATH issue for cron compatibility
- #1235 (2026-02-01): Added weather and calendar to briefing
- #1236 (2026-02-01): Configured email delivery to iCloud
Want me to show details for any of these?
Your MEMORY.md becomes an index:
# MEMORY.md
## Morning Briefing Script
Fixed PATH issue for cron on 2026-02-01.
See: observation #1234
## Silver Price Tracking
Heartbeat-based monitoring implemented.
See: observations #5678, #5679, #5680
Browse the memory stream at: http://localhost:37778
Features:
| Endpoint | Method | Description |
|---|---|---|
/api/health | GET | Health check |
/api/observations | POST | Store new observation |
/api/observations/:id | GET | Get observation by ID |
/api/search | POST | Search observations |
/api/timeline | POST | Get chronological context |
/api/sessions | GET | List sessions |
/api/sessions/:id/summary | GET | Get session summary |
/api/context | GET | Get context for injection |
searchsearch({
query: string, // Natural language query
type?: string, // Filter: observation, decision, bugfix, etc.
since?: string, // ISO date filter
project?: string, // Project filter
limit?: number // Max results (default: 10)
})
timelinetimeline({
observationId?: number, // Center on this observation
query?: string, // Or search and show context
range?: number // Hours before/after (default: 2)
})
get_observationsget_observations({
ids: number[] // Observation IDs to fetch
})
Settings stored in ~/.openclaw-mem/settings.json:
{
"port": 37778,
"dataDir": "~/.openclaw-mem",
"database": {
"path": "~/.openclaw-mem/memory.db"
},
"vectorDb": {
"enabled": true,
"path": "~/.openclaw-mem/chroma"
},
"contextInjection": {
"enabled": true,
"maxTokens": 4000,
"includeTypes": ["decision", "bugfix", "architecture"],
"excludeTypes": ["routine"]
},
"summarization": {
"enabled": true,
"model": "claude-3-haiku"
},
"ui": {
"enabled": true,
"theme": "dark"
}
}
git clone https://github.com/openclaw/openclaw-mem
cd openclaw-mem
npm install
npm run dev
npm test # Run all tests
npm run test:unit # Unit tests only
npm run test:integration # Integration tests
npm run build # Compile TypeScript
npm run build:ui # Build web viewer
npm run package # Create distributable
This project is adapted from Claude-Mem by Alex Newman (@thedotmack).
Claude-Mem is licensed under AGPL-3.0. This adaptation maintains compatibility with that license while adding OpenClaw-specific integrations.
GNU Affero General Public License v3.0 (AGPL-3.0)
See LICENSE for details.
Contributions welcome! Please:
See CONTRIBUTING.md for guidelines.
FAQs
Persistent memory system for OpenClaw - automatic context capture, semantic search, and progressive disclosure
We found that openclaw-persistent-memory demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.