API Reference
Migrate
Import markdown files (e.g., OpenClaw memory files) as MemoClaw memories.
POST
Parses markdown files, splits by
## headers, auto-detects importance and memory type, and stores each section as a separate memory. Idempotent — duplicate content is deduplicated via content hashing.
Request Body
array
required
Array of file objects to import. Maximum 50 files per request.
Response
integer
Number of files successfully processed.
integer
Number of new memories stored.
integer
Number of memories skipped due to duplicate content.
array
Present only if some files failed. Each entry has
filename and error.How parsing works
- Each file is split on
##headers - Each section becomes one memory with:
- content: header + body text (max 8,000 chars)
- importance: 0.6–0.9 based on keyword heuristics (decisions=0.9, preferences=0.8, etc.)
- memory_type: auto-detected (
decision,preference,correction,project,observation,general) - tags: header words +
date:YYYY-MM-DDfrom filename +migrated+openclaw
- Content is SHA-256 hashed for intra-batch and cross-request deduplication
- Files without
##headers are stored as a single memory