Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mneno.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Mneno provides built-in tools for exporting memories to JSON, importing them back, and creating timestamped backups. This is essential for data migration, persistence, and disaster recovery.

Exporting Memories

You can export your entire memory store to a JSON payload or directly to a file.
# Get a JSON-serializable dictionary
payload = client.export_json()

# Export directly to a file
client.export_json("exports/my_memories.json")
The exported file includes a version field to ensure compatibility with future Mneno versions.

Importing Memories

Importing allows you to load memories from a previous export. Mneno supports several import modes to handle conflicting IDs:
# Import from a file
result = client.import_json("exports/my_memories.json", mode="append")

print(f"Imported: {result.imported_count}")
print(f"Skipped: {result.skipped_count}")

Import Modes

ModeDescription
appendAdd memories; if an ID exists, a new unique ID is generated for the copy.
replaceClear the current store first, then import everything.
skip_existingKeep existing memories; don’t import anything with a conflicting ID.
overwriteReplace existing memories with imported ones if they share the same ID.

Backups

Backups are a specialized form of export that use timestamped filenames by default.
# Create a backup in the 'backups/' directory
backup_path = client.backup()
print(f"Backup created at: {backup_path}")
# Output: backups/mneno-backup-20260524-120000.json

Restore

Restoring is a shortcut for a replace or append import from a backup file.
# Restore from a backup (replaces current memories by default)
client.restore("backups/mneno-backup-20260524-120000.json")

# Append from a backup instead
client.restore("backups/mneno-backup-20260524-120000.json", mode="append")

Validation

Mneno validates the format and version of all incoming JSON payloads during import. If a file is corrupted or uses an unsupported format version, Mneno will raise a clear error to prevent data corruption.