OpenClaw Memory System - Make OpenClaw Truly Remember. Compatible with existing formats, enhanced memory management.
Resources
33Install
npx skillscat add opensourceclaw/claw-mem Install via the SkillsCat registry.
SKILL.md
claw-mem - OpenClaw Memory System
Make OpenClaw Truly Remember.
๐ Quick Start
Installation
git clone https://github.com/opensourceclaw/claw-mem/claw-mem.git ~/.openclaw/workspace/skills/claw-mem
cd ~/.openclaw/workspace/skills/claw-mem
pip3 install -e .Enable
Add to ~/.openclaw/config.json:
{
"skills": {
"claw-mem": {
"enabled": true
}
}
}Usage
claw-mem automatically integrates into every OpenClaw session:
- On Start - Load relevant memories
- During Conversation - Auto-store and retrieve
- On End - Auto-save memories
No manual configuration required!
๐ Memory Storage
claw-mem is fully compatible with existing OpenClaw memory formats:
~/.openclaw/workspace/
โโโ MEMORY.md # Core Memory (Semantic)
โโโ memory/
โโโ YYYY-MM-DD.md # Daily Memory (Episodic)
โโโ skills/ # Skill Memory (Procedural)๐๏ธ Core Features
1. Three-Layer Memory Architecture
| Layer | Type | Storage Location | Expiry Policy |
|---|---|---|---|
| L1 | Working Memory | Current Session | Transfer on End |
| L2 | Short-term Memory | memory/YYYY-MM-DD.md |
30 days |
| L3 | Long-term Memory | MEMORY.md + skills/ |
Permanent |
2. Three Memory Types
| Type | Description | Example |
|---|---|---|
| Episodic | Daily conversations | "2026-03-17 User asked about Shanghai weather" |
| Semantic | Core facts | "User prefers DD/MM/YYYY date format" |
| Procedural | Skills/Processes | "Deployment: 1) Test 2) Build 3) Deploy" |
3. Hybrid Retrieval
- โ Keyword search
- โ Type filtering
- โ Time-based sorting
- โ Semantic search (optional)
4. Security Design
- โ Write validation (rejects imperative content)
- โ Checkpoints (regular snapshots)
- โ Audit logging (records modifications)
โ๏ธ Configuration (Optional)
claw-mem is zero-config by default, but you can customize:
{
"claw-mem": {
"storage": {
"workspace": "~/.openclaw/workspace",
"episodic_ttl_days": 30
},
"security": {
"enable_validation": true,
"enable_checkpoint": true,
"enable_audit_log": true
},
"retrieval": {
"max_results": 10,
"enable_semantic_search": false
}
}
}๐ง API
Python API
from claw_mem import MemoryManager
# Initialize
memory = MemoryManager(workspace="~/.openclaw/workspace")
# Start session
memory.start_session("session_001")
# Store memory
memory.store("User prefers DD/MM/YYYY date format", type="semantic")
# Retrieve memory
results = memory.search("date format", type="semantic")
# End session
memory.end_session()OpenClaw Skill API
claw-mem automatically injects into OpenClaw sessions:
# Automatically available in OpenClaw conversations
System: Loaded 5 relevant memories
User: Did I say anything about dates before?
Agent: Yes, you prefer DD/MM/YYYY date format.๐ Performance Targets
MVP version, data to be populated
| Metric | Target | Current |
|---|---|---|
| Startup Time | <1s | - |
| Memory Footprint | <100MB | - |
| Retrieval Latency | <100ms | - |
| Memory Persistence | 100% | - |
๐ค Contributing
Community contributions are welcome!
Development Environment
git clone https://github.com/opensourceclaw/claw-mem/claw-mem.git
cd claw-mem
pip3 install -e ".[dev]"
pytestSubmit PR
- Fork the project
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'feat: add amazing feature') - Push to remote (
git push origin feature/amazing-feature) - Create Pull Request
๐ License
Apache License 2.0
๐ Acknowledgments
- OpenClaw Community
- All Contributors
Make OpenClaw Truly Remember. ๐ง