Problem
Each OpenClaw agent has its own SQLite memory store at ~/.openclaw/memory/<agent>.sqlite on mack. These are siloed — they are not searchable via local memu's hybrid/RAPTOR search, not federated to Railway, and not visible to other agents.
Current state
- Files like
~/.openclaw/memory/mack.sqlite, ~/.openclaw/memory/lenny.sqlite etc. exist
- Schema: individual per-agent key-value or structured fact records (exact schema TBD — needs investigation)
- Local memu (
localhost:8000) has no knowledge of these records
memory-learning engine writes new extractions to memu but legacy/existing SQLite records are untouched
Desired behavior
- One-time backfill: scan
~/.openclaw/memory/*.sqlite, convert each record to a memu MemoryRecord (fact/lesson/decision), POST to localhost:8000/memories with agent_id set to the source agent name
- Ongoing sync: watch for new rows in each SQLite (file mtime or last_rowid polling) and forward them
- Deduplication: use a
source_id or external_id field to avoid double-importing on repeated runs
Files likely involved
- New script:
tools/sqlite_bridge.py (or memu/sqlite_agent_bridge.py)
- Possibly new launchd plist:
com.openclaw.sqlite-bridge
memu/api.py — confirm POST /memories accepts external_id for idempotent upserts
Investigation needed
- SSH to mack and inspect
~/.openclaw/memory/*.sqlite schema: sqlite3 ~/.openclaw/memory/mack.sqlite .schema
- Map SQLite columns → memu MemoryRecord fields
- Determine if memu API needs an
external_id field for idempotency
Acceptance criteria
Problem
Each OpenClaw agent has its own SQLite memory store at
~/.openclaw/memory/<agent>.sqliteon mack. These are siloed — they are not searchable via local memu's hybrid/RAPTOR search, not federated to Railway, and not visible to other agents.Current state
~/.openclaw/memory/mack.sqlite,~/.openclaw/memory/lenny.sqliteetc. existlocalhost:8000) has no knowledge of these recordsmemory-learningengine writes new extractions to memu but legacy/existing SQLite records are untouchedDesired behavior
~/.openclaw/memory/*.sqlite, convert each record to a memuMemoryRecord(fact/lesson/decision), POST tolocalhost:8000/memorieswithagent_idset to the source agent namesource_idorexternal_idfield to avoid double-importing on repeated runsFiles likely involved
tools/sqlite_bridge.py(ormemu/sqlite_agent_bridge.py)com.openclaw.sqlite-bridgememu/api.py— confirmPOST /memoriesacceptsexternal_idfor idempotent upsertsInvestigation needed
~/.openclaw/memory/*.sqliteschema:sqlite3 ~/.openclaw/memory/mack.sqlite .schemaexternal_idfield for idempotencyAcceptance criteria
GET /memories?agent_id=mack/search/hybrid