What
Wire /export and /import endpoints so users can export memories to JSONL and import them back (backup, migration, transfer between namespaces).
Why
No backup/export path = data lock-in. Users need a way to:
- Backup memories before major lifecycle operations
- Migrate between namespaces or instances
- Share memory sets between agents
How
Endpoints
| Endpoint |
Method |
Return |
GET /export |
?namespace=X&format=jsonl -> JSONL stream |
Existing |
POST /import |
JSONL body -> {imported, skipped, errors} |
Existing |
Implementation
Layer 0-2: Standard pattern. Export returns streaming text, import sends JSONL body.
Layer 3 — Settings or Tools menu:
- Export:
- Namespace selector (or "all")
[Export to JSONL] -> native file save dialog
- Progress indicator for large exports
- Import:
[Import JSONL] -> native file open dialog
- Preview: show count, first 5 entries
- Confirmation: "Import N memories? Duplicates will be skipped."
- Result: "Imported N, skipped N duplicates, N errors"
Safety
- Import always dedup (skip existing IDs)
- Preview before commit
- Export includes metadata (version, timestamp, namespace)
Testing
Related Issues
- Part of: Phase 2B endpoint gap fill
Checklist
What
Wire
/exportand/importendpoints so users can export memories to JSONL and import them back (backup, migration, transfer between namespaces).Why
No backup/export path = data lock-in. Users need a way to:
How
Endpoints
GET /export?namespace=X&format=jsonl-> JSONL streamPOST /import{imported, skipped, errors}Implementation
Layer 0-2: Standard pattern. Export returns streaming text, import sends JSONL body.
Layer 3 — Settings or Tools menu:
[Export to JSONL]-> native file save dialog[Import JSONL]-> native file open dialogSafety
Testing
Related Issues
Checklist