Skip to main content

memanto migrate

Import your memories from another provider into a Memanto agent. Each subcommand pulls (or loads) the provider’s export, maps the source records onto Memanto memory types, and bulk-writes them into the target agent.
Providers:
  • mem0 - Migrate a Mem0 account
  • letta - Migrate Letta archival passages
  • supermemory - Migrate a Supermemory account
  • zep - Migrate the knowledge-graph facts of every user in a Zep Cloud project
  • hindsight - Migrate every memory bank on Hindsight Cloud or a self-hosted server
  • okf - Import an Open Knowledge Format bundle from disk (see OKF import below)
  • langfuse - Sync Langfuse errors, failed evals, and latency/cost anomalies (see Langfuse sync below)
Options:
  • --api-key TEXT - Provider API key (saved to ~/.memanto/.env). Can also be supplied via the provider’s environment variable.
  • -f, --file PATH - Use an existing provider export JSON instead of pulling a live export.
  • -a, --agent TEXT - Target Memanto agent ID (defaults to the active agent).
  • --dry-run - Preview the mapping and savings report without writing anything.
  • --report - Also write the token/latency/storage savings report on a real run. Only mem0, letta, and supermemory have this option.
  • --base-url TEXT - hindsight only: server URL (HINDSIGHT_BASE_URL). Defaults to Hindsight Cloud; set it for a self-hosted server. Remembered once passed with a live export.
The API key for each provider is read from these environment variables when --api-key is not passed: If no key is found, you are prompted for one and it is saved to ~/.memanto/.env.

How it works

  1. Load the provider export — either from disk (--file) or by pulling a live export with your API key.
  2. Map the source records onto Memanto memory types.
  3. Import the mapped memories into the target agent in batches of up to 100.
  4. Report (optional) — render a token/storage/latency savings report.
Empty source records are skipped, as are records the source itself has retired: Zep facts that were superseded or are no longer true, and Hindsight units curated out as invalidated. On a real run the target agent must be resolvable (pass --agent or activate one first); a dry run does not need a target agent.

Examples

Preview a Mem0 migration without writing anything (also renders the savings report):
Migrate a previously exported file into the active agent:
Migrate Letta into a specific agent and write the savings report:
Migrate Supermemory, providing the API key inline:
Migrate Zep from a previously saved export:
Migrate from a self-hosted Hindsight server:

OKF import

The okf subcommand imports an Open Knowledge Format bundle — a local directory of markdown files (or a single .md file) — rather than a hosted provider account. It takes a path instead of an API key, and does not produce a savings report.
Options:
  • -a, --agent TEXT - Target Memanto agent ID (defaults to the active agent).
  • --dry-run - Preview the mapping without writing anything.
Behavior:
  • Fields that don’t map onto a Memanto column are preserved in a bounded [Supporting data] footer, so nothing is lost.
  • OKF’s free-form type is auto-classified when it isn’t one of Memanto’s 13 types (the original value is kept in the footer).
  • When the bundle has a memories/ folder, import is scoped to it — the daily-summaries/, sessions/, and metrics/ context sections are ignored, so they are never re-ingested as memories.
Examples:
See the OKF integration guide for the bundle layout, the field-mapping table, and round-trip behavior.

Langfuse sync

The langfuse subcommand is different from the others: it is a repeatable sync, not a one-shot import. Observability signal — errored spans, failed evaluations, latency and cost anomalies — is grouped into one memory per error signature rather than one per occurrence, and a ledger makes re-running safe.
Options:
  • --discover - Report this project’s score names, latency/cost spread, and error labels. Writes nothing.
  • --save - Store the supplied capture settings for this Langfuse project.
  • -c, --capture TEXT - What to capture; repeatable or comma-separated: errors, low-score, slow, costly, success. Default errors.
  • --score-fail TEXT - Rule marking a score as a failure; repeatable. e.g. 'correctness<0.7'.
  • --score-pass TEXT - Rule marking a score as a success; repeatable.
  • --latency-ms FLOAT - Fixed latency budget in ms.
  • --latency-percentile FLOAT - Latency budget as a percentile of each operation’s own traffic (e.g. 95).
  • --cost-usd FLOAT - Fixed cost budget in USD.
  • --cost-percentile FLOAT - Cost budget as a percentile of each operation’s own traffic.
  • --group-by TEXT - Group on a stable field instead of the error message, e.g. metadata.error_code.
  • --since-days INTEGER - Look back this many days. Defaults to the last sync time, or 7 days on a first run.
  • --host TEXT - Langfuse base URL (LANGFUSE_HOST). Default https://cloud.langfuse.com.
  • --api-key TEXT - Langfuse keys as 'public_key:secret_key' (LANGFUSE_API_KEY). The vendor-native LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY pair is also accepted.
  • -a, --agent TEXT - Target Memanto agent ID (defaults to the active agent).
  • -f, --file PATH - Replay an existing Langfuse export JSON.
  • --dry-run - Preview the grouping and the write/update plan without writing.
Langfuse Cloud is regional and keys are not valid across regions. If your project is on US, pass --host https://us.cloud.langfuse.com once (it is remembered) or set LANGFUSE_HOST. A region mismatch appears as 401 Invalid credentials.
Only errors works with no configuration — level is the one field every Langfuse project populates the same way. Score names, their value ranges, and what counts as slow or expensive are project-specific, so those modes stay inert until you supply a rule or a budget, and the run tells you so:
Start with discovery:
Then configure and sync:
Running the sync again reports New: 0 · Unchanged: N — nothing is duplicated. A recurring failure is updated in place with its new occurrence count. Settings and state:
  • ~/.memanto/migrate/langfuse/config.json — capture settings, per Langfuse project (written by --save or the UI tile).
  • ~/.memanto/migrate/langfuse/state.json — the sync ledger, scoped by Langfuse project and destination agent.
The langfuse-memanto SDK shares both files, so live capture from your app and this sync compose without duplicating. See the Langfuse integration guide for capture modes, score-rule syntax, and the live SDK handler.

Output

Results are written to a timestamped run directory under ~/.memanto/migrate/<provider>/<timestamp>/, containing:
  • mapped_preview.json - the mapped Memanto payloads (always written, so a dry run is fully inspectable).
  • migrate-report.md - the savings report (written on a dry run, or on a real run with --report).
The command also prints a summary panel with the source record count, the number of mapped memories, a per-type breakdown, and — on a real run — the imported / failed / batch counts and the target agent. Notes:
  • The savings report includes a short LLM-written narrative generated through the active agent. If no agent is active, the narrative is skipped (the rest of the report is still produced).
  • Migrating into Memanto uses the same batch import as memanto remember --batch.
  • okf, langfuse, zep, and hindsight produce no savings report. okf is a local file format and langfuse an observability backend, so neither is a memory store to benchmark against; zep and hindsight have no savings baseline yet. langfuse additionally writes config.json and state.json beside its run directories, and its summary panel reports new / changed / unchanged rather than imported / skipped.