import_memories
Restore, migrate, or share AI agent memories by importing a JSON export. Provide the file path and optionally override the user/agent or skip existing memories.
Instructions
Import memories from exported JSON file.
REQUIRED: 'file_path' - path to the JSON export file OPTIONAL: 'user_id' OR 'agent_id' - override the user/agent from the export file OPTIONAL: 'skip_existing' - if True, skip memories that already exist (default: True) OPTIONAL: 'infer' - use LLM processing during import (default: False for speed)
Imports memories from a JSON file created by export_memories tool. Useful for backup restoration, migration between backends, or sharing memory sets.
Examples:
Import from backup: {"file_path": ".mem0/exports/memories_john_20250113.json"}
Import to different user: {"file_path": "export.json", "user_id": "jane"}
Force reimport: {"file_path": "export.json", "skip_existing": false}
Returns: Import summary with success/failure counts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| infer | No | ||
| user_id | No | ||
| verbose | No | ||
| agent_id | No | ||
| file_path | Yes | ||
| skip_existing | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |