forked from SpeedyFoxAi/jarvis-memory
191 lines
5.6 KiB
Markdown
191 lines
5.6 KiB
Markdown
# OpenClaw Jarvis-Like Memory System - Complete Blueprint
|
|
|
|
> **Version:** 1.5.0
|
|
> **Date:** February 19, 2026
|
|
> **Purpose:** Build an AI assistant that actually remembers
|
|
|
|
---
|
|
|
|
## 📦 What's Included
|
|
|
|
This blueprint contains everything needed to build a production-grade, multi-layer memory system for OpenClaw.
|
|
|
|
### Core Components
|
|
|
|
| Component | Purpose | Status |
|
|
|-----------|---------|--------|
|
|
| **mem-redis** | Redis buffer (Layer 1) | ✅ Complete |
|
|
| **qdrant-memory** | Vector DB (Layer 3) | ✅ Complete |
|
|
| **task-queue** | Background jobs | ✅ Complete |
|
|
| **install.sh** | One-command installer (with auto-backup) | ✅ Complete |
|
|
| **uninstall.sh** | Recovery/uninstall script | ✅ Complete |
|
|
| **RESTORE.md** | Manual backup/restore guide | ✅ Complete |
|
|
| **CHANGELOG.md** | Version history | ✅ Complete |
|
|
| **docker-compose.yml** | Infrastructure | ✅ Complete |
|
|
|
|
### Files Overview
|
|
|
|
```
|
|
blueprint/
|
|
├── install.sh ⭐ Main installer (auto-backs up existing files)
|
|
├── uninstall.sh 🧹 Recovery/uninstall script
|
|
├── RESTORE.md 🛡️ Manual backup/restore guide
|
|
├── CHANGELOG.md 📋 Version history
|
|
├── README.md ⭐ Start here (includes command reference & known issues)
|
|
├── TUTORIAL.md 🎬 YouTube script
|
|
├── docker-compose.yml 🐳 Infrastructure
|
|
├── requirements.txt 📦 Python deps
|
|
│
|
|
├── skills/
|
|
│ ├── mem-redis/ 🚀 Fast buffer
|
|
│ │ ├── SKILL.md
|
|
│ │ └── scripts/
|
|
│ │ ├── hb_append.py # Heartbeat: new turns
|
|
│ │ ├── save_mem.py # Manual: all turns
|
|
│ │ ├── cron_backup.py # Daily: flush to Qdrant
|
|
│ │ ├── mem_retrieve.py # Read from Redis
|
|
│ │ └── search_mem.py # Search Redis+Qdrant
|
|
│ │
|
|
│ ├── qdrant-memory/ 🧠 Long-term storage
|
|
│ │ ├── SKILL.md
|
|
│ │ ├── HARVEST.md
|
|
│ │ └── scripts/
|
|
│ │ ├── auto_store.py # Store with embeddings
|
|
│ │ ├── q_save.py # Quick save
|
|
│ │ ├── search_memories.py # Semantic search
|
|
│ │ ├── init_kimi_memories.py # Initialize collection
|
|
│ │ ├── init_kimi_kb.py
|
|
│ │ ├── init_private_court_docs.py
|
|
│ │ ├── daily_conversation_backup.py
|
|
│ │ ├── harvest_sessions.py
|
|
│ │ ├── harvest_newest.py
|
|
│ │ ├── sliding_backup.sh
|
|
│ │ ├── store_conversation.py
|
|
│ │ ├── store_memory.py
|
|
│ │ ├── get_conversation_context.py
|
|
│ │ └── smart_search.py
|
|
│ │
|
|
│ └── task-queue/ 📋 Background jobs
|
|
│ ├── SKILL.md
|
|
│ └── scripts/
|
|
│ ├── add_task.py
|
|
│ ├── list_tasks.py
|
|
│ └── heartbeat_worker.py
|
|
│
|
|
├── config/
|
|
│ └── HEARTBEAT.md.template 📝 Copy to HEARTBEAT.md
|
|
│
|
|
└── docs/
|
|
└── MEM_DIAGRAM.md 📖 Full architecture docs
|
|
```
|
|
|
|
---
|
|
|
|
## 🚀 Quick Start
|
|
|
|
```bash
|
|
# 1. Copy this blueprint to your workspace
|
|
cp -r blueprint/* ~/.openclaw/workspace/
|
|
|
|
# 2. Run the installer
|
|
cd ~/.openclaw/workspace
|
|
chmod +x install.sh
|
|
./install.sh
|
|
|
|
# 3. Source environment and test
|
|
source .memory_env
|
|
python3 skills/mem-redis/scripts/save_mem.py --user-id yourname
|
|
```
|
|
|
|
---
|
|
|
|
## 🎥 For YouTube Creators
|
|
|
|
See `TUTORIAL.md` for:
|
|
- Complete video script
|
|
- Section timestamps
|
|
- Thumbnail ideas
|
|
- Description template
|
|
- Tag suggestions
|
|
|
|
---
|
|
|
|
## 🏗️ Architecture
|
|
|
|
```
|
|
Layer 1: Redis Buffer (fast, real-time)
|
|
↓
|
|
Layer 2: Daily Files (.md, human-readable)
|
|
↓
|
|
Layer 3: Qdrant (semantic, searchable)
|
|
```
|
|
|
|
**Commands:**
|
|
- `save mem` → Redis + File
|
|
- `save q` → Qdrant (embeddings)
|
|
- `q <topic>` → Semantic search
|
|
|
|
---
|
|
|
|
## 📊 Statistics
|
|
|
|
| Metric | Value |
|
|
|--------|-------|
|
|
| Python Scripts | 52 |
|
|
| Lines of Code | ~5,000 |
|
|
| Documentation | 3,000+ lines |
|
|
| Architecture Diagrams | 5 |
|
|
| Skills | 3 |
|
|
| Installer Backups | Automatic `.bak.rush` files |
|
|
|
|
## Version History
|
|
|
|
| **Version** | **Date** | **Changes** |
|
|
|-------------|----------|-------------|
|
|
| 1.4.0 | Feb 19, 2026 | Compaction threshold recommendation (90%), manual setup docs |
|
|
| 1.3.0 | Feb 19, 2026 | Command reference, known issues documentation |
|
|
| 1.2.0 | Feb 19, 2026 | Auto-backup, RESTORE.md, version tracking |
|
|
| 1.1.0 | Feb 19, 2026 | Added uninstall.sh recovery script |
|
|
| 1.0.0 | Feb 18, 2026 | Initial release - 52 scripts, full tutorial |
|
|
|
|
---
|
|
|
|
## ✅ Verification Checklist
|
|
|
|
Before sharing this blueprint, verify:
|
|
|
|
- [ ] All scripts are executable (`chmod +x`)
|
|
- [ ] Docker Compose starts all services
|
|
- [ ] Install script runs without errors
|
|
- [ ] Installer creates `.bak.rush` backups before modifying files
|
|
- [ ] `save mem` works
|
|
- [ ] `save q` works
|
|
- [ ] `q <topic>` search works
|
|
- [ ] Cron jobs are configured
|
|
- [ ] HEARTBEAT.md template is correct
|
|
- [ ] RESTORE.md explains manual restore process
|
|
|
|
---
|
|
|
|
## 🔗 Related Files
|
|
|
|
| File | Description |
|
|
|------|-------------|
|
|
| MEM_DIAGRAM.md | Complete architecture documentation |
|
|
| install.sh | Automated installer (auto-backs up before changes) |
|
|
| uninstall.sh | Recovery/uninstall script |
|
|
| RESTORE.md | Manual backup/restore documentation |
|
|
| CHANGELOG.md | Version history |
|
|
| TUTORIAL.md | YouTube video script |
|
|
| docker-compose.yml | Infrastructure as code |
|
|
|
|
---
|
|
|
|
## 📝 License
|
|
|
|
MIT - Use this however you want. Attribution appreciated.
|
|
|
|
---
|
|
|
|
**Ready to build Jarvis?** Run `./install.sh` 🚀
|