export_memories
Export stored agent memories to JSON or Markdown for backup, migration, documentation, or sharing.
Instructions
Export memories to JSON or Markdown format for backup or migration.
OPTIONAL: 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) OPTIONAL: 'format' - output format: "json" (default) or "markdown" OPTIONAL: 'include_metadata' - include metadata in export (default: True) OPTIONAL: 'output_path' - custom file path (default: .mem0/exports/memories_.) OPTIONAL: 'return_content' - if True, returns content instead of writing to file (default: False)
Returns: File path where export was saved, or content if return_content=True.
Use for: Backup, migration between backends, documentation, sharing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | json | |
| user_id | No | ||
| verbose | No | ||
| agent_id | No | ||
| output_path | No | ||
| return_content | No | ||
| include_metadata | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |