feat(examples): OpenClaw → OpenViking memory migration tool#1289
feat(examples): OpenClaw → OpenViking memory migration tool#1289deepakdevp wants to merge 1 commit intovolcengine:mainfrom
Conversation
Closes volcengine#1011. Implements a zero-LLM-call migration script that reads OpenClaw workspace memory files and writes them directly into OpenViking's memory system using MemoryExtractor.create_memory() + SessionCompressor._index_memory(). Category mapping: MEMORY.md / memory.md → entities (curated durable knowledge) YYYY-MM-DD.md → events (daily logs / time-stamped records) YYYY-MM-DD-slug.md → cases (session summaries) everything else → entities (safe fallback) Files added: examples/openclaw-migration/migrate.py — main migration script examples/openclaw-migration/README.md — usage guide tests/unit/test_openclaw_migration.py — 25 unit tests (no OV server needed) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
|
Thanks for the contribution, and sorry for the delay here. We are about to adjust the agent/user directory layout and namespace model, which may change how memories are distributed and stored. To avoid reviewing and merging migration logic against a layout that is about to change, we'd prefer to pause this PR for now and continue the review after that refactor lands. That should help us evaluate the migration path against the final storage model instead of introducing compatibility baggage too early. |
|
For reference, the refactor we want to land first is here: #1356 . Once that storage / namespace change settles, we can review this migration path against the updated model. |
Closes #1011.
Summary
examples/openclaw-migration/migrate.py— a standalone script that imports OpenClaw workspace memory files directly into OpenViking's memory systemMemoryExtractor.create_memory()+SessionCompressor._index_memory()for direct write + embedding enqueueexamples/openclaw-migration/README.mdwith usage guide, category mapping table, and dry-run exampletests/unit/test_openclaw_migration.py— 25 unit tests, no OV server requiredCategory mapping
MEMORY.md,memory.mdentitiesYYYY-MM-DD.mdeventsYYYY-MM-DD-slug.mdcasesentities--categoryflag overrides all files to a single category.Test plan
PYTHONPATH=. .venv/bin/python -m pytest tests/unit/test_openclaw_migration.py -v --no-cov→ 25 passedpython examples/openclaw-migration/migrate.py --dry-runagainst a real OpenClaw workspace--ov-data-dir ./test-data --user-id testuser, verify memories appear underviking://user/testuser/memories/🤖 Generated with Claude Code