Replies: 1 comment
|
I am not a maintainer, but from the current OSS code/docs I would separate two cases:
import json
from mem0 import Memory
m = Memory()
result = m.get_all(
filters={"user_id": "alex"}, # or agent_id/run_id depending how you stored memories
top_k=1000,
show_expired=True,
)
with open("mem0-export.json", "w", encoding="utf-8") as f:
json.dump(result["results"], f, ensure_ascii=False, indent=2)One important caveat: current If you need a full raw backup, the most reliable approach is usually to back up the configured stores directly:
So short answer: there is no one-click OSS export equivalent to Platform export, but local export is possible without a Mem0 Platform API key if you query your local |
Uh oh!
There was an error while loading. Please reload this page.
I was looking at Mem0 for a project and wanted to understand the backup story — specifically, local offline export without an API key.
I found
create_memory_export()in the docs, but it requires an API key, uses an LLM to restructure the data, and the export link expires after 7 days. That's not quite what I need for a simple local backup.get_all()works but returns raw JSON — not easy to browse or edit by hand.I ended up building a small converter that reads Mem0's
get_all()JSON and writes each memory as a plain Markdown file:No API key, no expiry, just files on disk. Also shows a compatibility report so you know which fields transfer cleanly.
Repo: https://github.com/velnori/memlink
Curious if others have run into this — is there an official offline export I missed?
All reactions