memory-sync
Scrape and analyze OpenClaw JSONL session logs to reconstruct and backfill agent memory files. Use when: (1) Memory appears incomplete after model switches, (2) Verifying memory coverage, (3) Reconstructing lost memory, (4) Automated daily memory sync via cron/heartbeat. Supports simple extraction and LLM-based narrative summaries with automatic secret sanitization.
Why use this skill?
Reconstruct and backfill OpenClaw agent memory with Memory Sync. Features automated secret sanitization, LLM summarization, and robust log parsing for seamless model transitions.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/mpesavento/memory-syncWhat This Skill Does
Memory Sync is a specialized utility for the OpenClaw agent designed to maintain historical continuity across model swaps and session resets. By parsing raw JSONL session logs, it reconstructs and backfills your agent's memory files. The tool offers two distinct processing tiers: a high-speed simple extraction for rapid synchronization and an LLM-powered narrative mode that generates human-readable summaries. Crucially, Memory Sync includes an integrated sanitization layer to detect and redact secrets automatically during the processing pipeline, ensuring that sensitive information is not persisted in long-term memory logs.
Installation
To install, ensure you have Python 3.11 or higher installed. Navigate to your OpenClaw skills directory and use the clawhub command:
clawhub install openclaw/skills/skills/mpesavento/memory-sync
For manual local dependencies, run:
pip install click
Use Cases
- Model Transitions: When upgrading from one LLM version to another, use
compareandbackfillto ensure the new model has full context of past interactions. - Daily Hygiene: Automate your memory maintenance by running a nightly cron job with the
--summarizeand--preserveflags for a perfectly curated, evolving knowledge base. - Recovery: If an agent's context window clears or a memory file is corrupted, use
backfill --allto rebuild the timeline from raw logs. - Audit Compliance: Utilize the
validateandstatscommands to verify memory coverage and ensure important decisions are not lost.
Example Prompts
- "OpenClaw, run a memory sync for today's sessions and summarize the key technical decisions made."
- "Compare my current memory file with the latest logs and backfill any missing interactions from this week."
- "Perform an incremental memory backfill using LLM summarization while preserving my existing custom notes."
Tips & Limitations
- Preservation: Always use the
--preserveflag if you have added manual annotations to your memory files; otherwise, the tool may overwrite your custom notes. - LLM Cost: The
--summarizemode triggers API calls. If you are on a restricted budget, default to standard extraction for large date ranges and reserve LLM summarization for daily incremental updates. - Sanitization: While the tool features automated secret detection, always perform a manual audit of generated memory files containing highly sensitive PII or credentials.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-mpesavento-memory-sync": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, external-api