OpenClaw Memory Migrator for Openclaw

A verification-first CLI workflow for migrating OpenClaw memory backends to official memory-core without losing data, traceability, or rollback options.

airbing11
v0.1.0-rc.1
Sep 9, 2026
0
140
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install memory-core-migrator

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-core-migrator 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 OpenClaw Memory Migrator?

OpenClaw Memory Migrator provides a safe, auditable path from LanceDB Pro, official LanceDB list captures, QMD, or Markdown into OpenClaw's official memory-core backend. It exports authoritative text and metadata, normalizes records, detects duplicates, renders reviewed Markdown, establishes recall benchmarks, and guides controlled cutover.

Designed for Openclaw Skills environments, the migrator defaults to read-only discovery and dry runs. It preserves source databases and backups, requires verified artifacts and run-bound approvals before writes, and blocks execution when counts, hashes, IDs, configuration, capabilities, or operational health drift.

OpenClaw Memory Migrator Use Cases

  • Migrate LanceDB Pro JSON exports into memory-core Markdown while preserving scopes and record counts.
  • Move QMD-owned or existing Markdown memory into the official memory-core workflow.
  • Convert captured official LanceDB ltm list output using the beta versioned manifest adapter.
  • Audit source, export, canonical, and rendered record counts before migration.
  • Identify exact duplicates, approximate duplicate groups, empty-text records, and secret-like metadata.
  • Benchmark recall across durable preferences, recent events, multilingual queries, operational rules, and agent-scoped facts.
  • Plan a controlled memory backend cutover with backup verification, maintenance windows, and rollback commands.
  • Soak-test memory-core while legacy sources remain preserved and writers remain disabled.
  • Retire old plugins only after promotion and retirement approvals are explicitly granted.

How OpenClaw Memory Migrator Works

  1. Discover: Resolve the OpenClaw version and executable, state directory, agents, workspaces, memory slot, source plugin details, scopes, counts, embedding configuration, dreaming schedules, disk space, and backup destination.
  2. Preflight: Validate explicit export files and required capabilities with the migrator CLI. Stop when a capability or command is unknown instead of guessing.
  3. Back up: Run the current OpenClaw backup CLI and accept the backup only when it exits successfully, reports verified: true, returns an existing archive path, and has a verified SHA-256 hash.
  4. Export read-only: Select a supported adapter and export every relevant source scope. Paginate LanceDB Pro exports when version-specific record limits apply, and use authoritative Markdown rather than derived QMD indexes.
  5. Normalize: Convert source captures into versioned canonical JSONL records containing authoritative text and metadata. Vector data is not copied into memory-core SQLite.
  6. Audit: Reconcile source, export, and canonical counts; validate IDs; detect silent empty-text drops; report exact and approximate duplicates; and reject or redact secret-like metadata.
  7. Render: Generate separate durable and dated Markdown records under a staged import directory. Review the output instead of appending directly to root MEMORY.md.
  8. Benchmark: Run owner-approved recall queries and record top-k source, score, latency, and expected evidence without indexing the evaluation report as memory.
  9. Approve cutover: Save the configuration diff, affected agents, backup and manifest hashes, baseline results, rollback commands, and maintenance window in the run report. Require APPROVE CUTOVER <RUN_ID> and rerun preflight afterward.
  10. Cut over: Enable memory-core, disable the old writer and dreaming schedules, change the single memory slot, restart through the verified service owner, validate health, build indexes for every agent, and run recall probes.
  11. Soak and retire: Keep source data cold during the soak period, verify channels, indexes, recall, dreaming output, and file changes daily, then require promotion and retirement approvals before enabling promotion-capable dreaming or uninstalling plugins.

OpenClaw Memory Migrator Setup

Requirements

  • Node.js executable available as node.
  • Authenticated OpenClaw installation and the openclaw executable.
  • Permission to run the skill only from an owner DM, Control UI, or local operator shell.
  • A verified OpenClaw backup destination with sufficient disk space.
  • Explicit source export files; do not point the tool at opaque live LanceDB databases.

Installation and preflight

Keep the run directory outside indexed workspaces and review references/compatibility.md before selecting an adapter.

node bin/openclaw-memory-migrator.js preflight \
  --input export/global.json \
  --output canonical/memory-records.jsonl

Normalize a supported export

node bin/openclaw-memory-migrator.js normalize \
  --adapter lancedb-pro \
  --input export/global.json \
  --input export/main.json \
  --output canonical/memory-records.jsonl

For official LanceDB, capture openclaw ltm list --agent <id> for each agent and wrap each result in the documented lancedb-official-list-beta manifest. For QMD or Markdown, migrate authoritative Markdown and follow the official Doctor migration where required; do not restore retired QMD backend keys.

Audit and render

node bin/openclaw-memory-migrator.js audit \
  --adapter canonical-v1 \
  --input canonical/memory-records.jsonl \
  --output reports/audit.json
node bin/openclaw-memory-migrator.js render \
  --adapter canonical-v1 \
  --input canonical/memory-records.jsonl \
  --output staged-memory/imports/<source>

Before any write or cutover, create and verify the backup, review the generated Markdown, document the rollback plan, and obtain the exact run-bound approval. Use APPROVE ROLLBACK <RUN_ID> if health or recall gates fail.

OpenClaw Memory Migrator Data Schema & Taxonomy

Canonical migration data

Artifact Purpose
Source export files Read-only captures from LanceDB Pro, official LanceDB list output, QMD-owned Markdown, or Markdown files
canonical/memory-records.jsonl Versioned normalized records containing authoritative text, source metadata, IDs where available, scopes, and adapter context
reports/audit.json Reconciliation results, duplicate groups, rejected records, empty-text checks, and metadata safety findings
Staged Markdown imports Reviewable memory-core files split between durable records and dated records
Recall benchmark report Query set, expected evidence, top-k source, score, latency, and source-only probe results; never indexed as memory
Run report Run ID, phase, timestamps, host fingerprint, versions, adapter, agents, scopes, backup hash, manifest hash, counts, status, blockers, and next approval

Metadata taxonomy

  • Identity and provenance: source adapter, source file, source ID, export version, manifest version, and host or agent context.
  • Scope: agent, workspace, channel, global scope, and configured memory slot.
  • Content class: durable memory versus dated or event-oriented memory.
  • Integrity: source, export, canonical, and rendered counts; SHA-256 values; duplicate status; and validation status.
  • Operational state: phase, timestamps, indexing status, channel health, recall status, approval state, and rollback eligibility.
  • Safety controls: rejected or redacted secret-like metadata, approval run ID, backup archive path, and declared rollback window.

The workflow intentionally excludes source vectors from memory-core SQLite. memory-core rebuilds derived indexes from rendered authoritative text and metadata. Source databases, SQLite files, WAL/SHM sidecars, Markdown files, and backups are preserved rather than deleted.

OpenClaw Memory Migrator Advanced Features

  • Run-bound approval gates invalidate stale approvals when configuration, scope, counts, hashes, agents, or capabilities change.
  • Read-only discovery, dry-run defaults, and explicit preflight checks prevent unsafe assumptions.
  • Adapter support covers LanceDB Pro, canonical records, Markdown, QMD-owned Markdown, and beta official LanceDB list manifests.
  • Version-aware pagination handles LanceDB Pro export caps, including the 1,000-record cap detected for memory-lancedb-pro v1.1.0-beta.10.
  • Report-only deduplication identifies exact and approximate duplicates without automatic deletion.
  • Multi-agent migration captures official LanceDB records and builds memory-core indexes for every configured agent.
  • Recall benchmarking supports multilingual or CJK phrases, channel- and agent-scoped facts, durable preferences, recent events, and operational rules.
  • Cutover controls enforce a single memory slot and prevent two dreaming writers from running simultaneously.
  • Soak, promotion, rollback, and retirement stages preserve cold source data throughout the declared rollback window.
  • Every phase produces an auditable report with hashes, counts, host fingerprint, health gates, blockers, and the exact next approval.
  • The skill is model-invocation-disabled by default, reinforcing operator-controlled execution for high-impact memory changes.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*