memory-sync for Openclaw

An automated tool to reconstruct and synchronize AI agent memory files by analyzing session logs and providing narrative summaries.

mpesavento
v1.0.1
Feb 9, 2026
0
2.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install memory-sync

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install memory-sync using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is memory-sync?

memory-sync is a robust utility designed to maintain continuity in agent memory across different model switches and sessions. By scraping OpenClaw JSONL logs, it identifies gaps and reconstructs missing memory files using either fast keyword extraction or high-quality LLM-driven narrative summaries. This ensures your agent retains context even when switching between providers or recovering from lost data.

Built for the Openclaw Skills ecosystem, the tool prioritizes security with built-in sanitization for over 30 types of secrets and API keys. It allows developers to automate their daily memory maintenance via cron jobs, ensuring that the workspace memory always reflects the most recent interactions and decisions without manual intervention.

memory-sync Use Cases

  • Backfilling incomplete agent memory after switching between different LLM models.
  • Automating daily memory synchronization to maintain a persistent context layer.
  • Recovering lost memory files from existing session log history.
  • Verifying memory coverage and identifying gaps in agent knowledge.
  • Sanitizing sensitive information from session logs before committing to permanent memory.

How memory-sync Works

  1. The tool scans the session logs directory to identify interaction history and existing memory files.
  2. It compares the two datasets to find dates or sessions where memory coverage is missing or incomplete.
  3. Users select an extraction mode: Simple Extraction for speed or LLM Summarization for a narrative overview.
  4. During processing, the tool automatically scrubs over 30 types of sensitive patterns (API keys, tokens, etc.) to ensure security.
  5. It generates or updates Markdown memory files, optionally preserving hand-written notes through smart merging or LLM context injection.

memory-sync Setup

Install the required dependencies and start tracking your Openclaw Skills performance:

pip install click

# Optional: for direct API summarization backends
pip install openai

# Run a comparison to check for gaps
python memory_sync.py compare

memory-sync Data Schema & Taxonomy

The skill manages data between raw session logs and formatted workspace memory. It uses a state file to track incremental updates.

Component Path Format
Session Logs ~/.openclaw/agents/main/sessions/*.jsonl JSON Lines
Memory Files ~/.openclaw/workspace/memory/ Markdown
State Tracking ~/.memory-sync/state.json JSON

Files are structured with clear markers to separate auto-generated summaries from user-preserved manual notes.

memory-sync Advanced Features

  • Smart Incremental Mode: Automatically detects and processes only the logs that have changed since the last execution.
  • Multi-Backend Summarization: Choose between native OpenClaw models, Anthropic, or OpenAI for generating narrative summaries.
  • Content Preservation: Seamlessly integrates existing manual notes into new LLM-generated summaries using narrative context injection.
  • Automated Secret Redaction: Advanced pattern matching for 30+ secret types, including JWTs, database strings, and provider-specific API keys.
  • Validation & Stats: Comprehensive tools to check for consistency issues and view coverage statistics across the entire history.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*