Files
true-recall/session.md.bak.2026-02-24-1518

225 lines
7.7 KiB
Plaintext

# TrueRecall v2 - Session Notes
**Last Updated:** 2026-02-24 15:08 CST
---
## Summary of Changes (2026-02-24)
### Collection Migration
| Action | From | To | Status |
|--------|------|----|--------|
| **Rename** | `kimi_memories` | `memories_tr` | ✅ Done + data migrated (12,223 points) |
| **Create** | — | `gems_tr` | ✅ Created (empty, ready for curation) |
| **Archive** | `true_recall` | `true_recall` | ✅ Preserved (existing data kept) |
### Dual Collection Support (NEW - 14:10)
**Problem:** Auto-capture was saving to `gems_tr` because that's where recall pulled from. This was wrong.
**Solution:** Added `captureCollection` option to memory-qdrant plugin:
- `collectionName`: `gems_tr` — for recall/injection (gems only)
- `captureCollection`: `memories_tr` — for auto-capture (full conversations)
**Files Modified:**
1. `/root/.openclaw/extensions/memory-qdrant/config.ts` — Added `captureCollection` option
2. `/root/.openclaw/extensions/memory-qdrant/index.ts` — Uses `dbRecall` and `dbCapture` separately
3. `/root/.openclaw/openclaw.json` — Added `"captureCollection": "memories_tr"`
### Auto-Capture Architecture (Real-Time Watcher)
**Mechanism:** `realtime_qdrant_watcher.py` daemon
- Watches OpenClaw session JSONL files in real-time
- Parses each conversation turn
- Embeds with `snowflake-arctic-embed2` via Ollama
- Stores directly to `memories_tr` collection (no Redis)
- Cleans content (removes metadata, thinking tags)
**Files:**
- Script: `/root/.openclaw/workspace/skills/qdrant-memory/scripts/realtime_qdrant_watcher.py`
- Service: `/root/.openclaw/workspace/skills/qdrant-memory/mem-qdrant-watcher.service`
**Status:** ✅ Deployed and running
**Deployment:**
- Stopped: `mem-redis-watcher`
- Started: `mem-qdrant-watcher`
- Status: Active (PID 84465)
- Verified: ✅ Capturing (points: 12,223 → 12,224)
### Current State (2026-02-24 15:08)
| Collection | Purpose | Points | Last Update |
|------------|---------|--------|-------------|
| `memories_tr` | Full text (autoCapture via watcher) | 12,228 | **Live** |
| `gems_tr` | Gems (for injection) | 5 | Feb 24 |
**Flow:**
```
OpenClaw Session → Real-Time Watcher → memories_tr (Qdrant)
Daily Curator (2:45 AM)
gems_tr (Qdrant)
memory-qdrant plugin → Injection
```
### Files Modified Today
1. `/root/.openclaw/openclaw.json` — Changed collectionName to `gems_tr`
2. `/root/.openclaw/extensions/memory-qdrant/config.ts` — Default to `memories_tr`
3. `/root/.openclaw/extensions/memory-qdrant/openclaw.plugin.json` — Defaults to `memories_tr`
4. `/root/.openclaw/workspace/skills/mem-redis/scripts/save_mem.py` — Added `--silent` flag
5. `/root/.openclaw/workspace/HEARTBEAT.md` — Updated to use `--silent`
6. `/root/.openclaw/workspace/.projects/true-recall-v2/tr-daily/curate_from_qdrant.py` — TARGET_COLLECTION = `gems_tr`
7. `/root/.openclaw/workspace/SOUL.md` — Updated collection references
8. `/root/.openclaw/workspace/kb/relevant-memories-ui-issue.md` — Updated documentation
### Migration Script Created
- `/root/.openclaw/workspace/.projects/true-recall-v2/migrate_memories.py`
- Migrated 12,223 points from `kimi_memories` → `memories_tr`
- Cleaned noise (metadata, thinking tags) during migration
- Preserved original `kimi_memories` as backup
### Current Collections (Qdrant)
| Collection | Purpose | Points |
|------------|---------|--------|
| `memories_tr` | Full text (live capture) | **12,228** |
| `gems_tr` | Gems (for injection) | 5 |
| `true_recall` | Legacy gems archive | existing |
| `kimi_memories` | Original (backup) | 12,223 |
---
## Final Status (2026-02-24)
| Component | Status |
|-----------|--------|
| **Collections** | 4 active (memories_tr, gems_tr, true_recall, kimi_memories) |
| **Curator v2** | ✅ Tested & working - 327 turns → 5 gems |
| **Config** | ✅ Using `gems_tr` for injection |
| **Cron** | ✅ Simplified - only essential jobs |
| **Redis** | ✅ Only for notifications (not memory) |
### Collection Summary
| Collection | Points | Purpose | Status |
|------------|--------|---------|--------|
| `memories_tr` | **12,228** | Full text (live capture) | ✅ Active |
| `gems_tr` | 5 | Gems (curated) | ✅ Active |
| `true_recall` | existing | Legacy archive | 📦 Preserved |
| `kimi_memories` | 12,223 | Original backup | 📦 Preserved |
### Cron Schedule (Cleaned)
| Time | Job |
|------|-----|
| 2:45 AM | Curator v2: memories_tr → gems_tr |
| 2:20 AM | File backup |
| 2:00 AM | Log monitoring |
**Removed:** 2:15 AM Redis backup, 2:50 AM archive, 5-min cron_capture (all redundant)
---
## What We Did Today
### Issue: `<relevant-memories>` showing in UI
**Problem:** The `<relevant-memories>` block was showing full conversation text in webchat UI. It should be hidden/internal.
**Investigation:**
1. Initially thought it was `save_mem.py` output (wrong)
2. Then thought it was HTML comment issue (wrong)
3. Found root cause: memory-qdrant plugin was recalling from `memories_tr` (full text) instead of `gems_tr` (gems)
**Solution Applied:**
Changed `openclaw.json` config:
- Before: `"collectionName": "memories_tr"`
- After: `"collectionName": "gems_tr"`
**Result:** ✅ Fixed! Now injection uses gems from true_recall, not full text.
### Issue: Auto-Capture Architecture Change
**Problem:** Real-time capture was going through Redis, we needed direct Qdrant storage
**Solution:**
1. Created `realtime_qdrant_watcher.py` — watches session JSONL, embeds, stores directly to Qdrant
2. Created `mem-qdrant-watcher.service` — systemd service for the watcher
3. Deployed and verified:
- Points before: 12,223
- Points after test messages: 12,228
- Verified new captures have correct structure (role, content, date, source)
**Status:** ✅ **Deployed and working**
### Other Changes Made
1. **Plugin dual collection support** — Added `captureCollection` option
2. **Session/Readme updates** — Clarified architecture
### Files Modified
| File | Change |
|------|--------|
| `/root/.openclaw/openclaw.json` | collectionName: memories_tr → gems_tr, added captureCollection |
| `/root/.openclaw/extensions/memory-qdrant/config.ts` | Added captureCollection option |
| `/root/.openclaw/extensions/memory-qdrant/index.ts` | Dual collection support, debug logging |
| `/root/.openclaw/extensions/memory-qdrant/openclaw.plugin.json` | Added captureCollection to schema |
### Files Created (NEW)
| File | Purpose |
|------|---------|
| `/root/.openclaw/workspace/skills/qdrant-memory/scripts/realtime_qdrant_watcher.py` | Real-time watcher daemon (Qdrant direct) |
| `/root/.openclaw/workspace/skills/qdrant-memory/mem-qdrant-watcher.service` | Systemd service file |
### Deployment
| Service | Action | Status |
|---------|--------|--------|
| `mem-redis-watcher` | Stopped | ✅ |
| `mem-qdrant-watcher` | Started | ✅ Active |
### Backups Created
- `/root/.openclaw/openclaw.json.bak.2026-02-24`
- `/root/.openclaw/extensions/memory-qdrant/index.ts.bak.2026-02-24`
---
## Current Status
| Component | Status |
|-----------|--------|
| **Curation (daily)** | v1 cron at 2:45 AM |
| **Injection** | ✅ Working, uses gems_tr |
| **Collection** | gems_tr |
| **KB** | Updated |
---
## What Still Needs Doing
1. ~~Test autoCapture (cleaned content to memories_tr)~~ ✅ Done
2. Test v2 curator (read from Qdrant, not Redis) — Next step
3. Full validation 2x
---
## Session Recovery
If starting new session:
1. Read this session.md
2. Read README.md for architecture
3. Read KB for issue history
---
**Next:** Test v2 curator (reads from memories_tr, creates gems in gems_tr)