
Description
Exports all project memories to a portable Markdown file for backup or migration. Use when backing up memories, migrating to another project, sharing memory state with teammates, or archiving before cleanup.
SKILL.md
Mem0 Export
Export all memories for the current project to a portable Markdown file.
Execution
Step 1: Resolve identity
Determine the active identity:
user_idfromMEM0_USER_IDenv var, else$USER, else"default"project_id(used asapp_id) fromMEM0_PROJECT_IDenv var, or via the project resolver
Step 2: Fetch all memories
Call get_memories with:
filters={"AND": [{"user_id": "<active_user_id>"}, {"app_id": "<active_project_id>"}]}page_size=200
If the response is paginated (i.e. the result contains a next cursor or the count equals page_size), continue fetching pages until all memories are retrieved.
Step 3: Format each memory as a YAML-frontmatter block
For each memory record, produce a block in this exact format:
---
id: <memory.id>
created_at: <memory.created_at>
type: <memory.metadata.type or "">
confidence: <memory.metadata.confidence or "">
branch: <memory.metadata.branch or "">
files: <memory.metadata.files joined with ", " or "">
categories: <memory.categories joined with ", " or "">
---
<memory.memory or memory content string>
Notes:
- The
---delimiters must be on their own lines with no extra whitespace. filesandcategoriesare written as comma-separated values on a single line.- Leave a blank line after the content before the next
---(for readability). - If a field is missing or null, write an empty string (not "null").
Step 4: Write the export file
Determine the output filename:
mem0-export-<project_id>-<YYYY-MM-DD>.md
Where <YYYY-MM-DD> is today's date in UTC.
Write all formatted blocks to this file using the Write tool (or equivalent). The file is written to the current working directory.
Step 5: Print summary
Exported <N> memories to <filename>
Where <N> is the total number of memory blocks written.
Error Handling
- If
get_memoriesreturns an error or zero memories, print:No memories found for project <project_id>. Nothing exported. - If the write fails, report the error to the user.
More skills from the mem0 repository
View all 23 skillscontext-loader
load project context from Mem0
Jul 13AgentsContextMemorydream
consolidate and prune stored memories
Jul 13AgentsData CleaningMemoryforget
delete outdated or incorrect memories
Jul 13MaintenanceMemoryPrivacyhealth
diagnose Mem0 connectivity and health
Jul 13DebuggingMemoryMonitoringimport
import project memories from Markdown files
Jul 13MarkdownMemoryMigrationlist-projects
list projects with stored memories
Jul 13AgentsMemory
More from Mem0
View publishermem0
add persistent memory to AI applications
mem0
Jul 13AgentsAI InfrastructureMemorymem0-cli
manage Mem0 memory via command line
mem0
Jul 13AutomationCLIMemorymem0-integrate
integrate Mem0 into repositories
mem0
Jul 13AgentsAPI DevelopmentMemorymem0-oss-to-platform
migrate Mem0 projects to platform
mem0
Jul 13AgentsMemoryMigrationmem0-test-integration
verify Mem0 integration tests
mem0
Jul 13AgentsMemoryQATesting