migrating-memory

migrating-memory is a skill for Claude Code, Codex from letta-ai/letta-code. It costs 51 tokens per session (819 once invoked), scanned A, original, Apache-2.0.

A guide for copying memory blocks from one AI agent to another using MemFS, a file-based memory system. It describes exporting the source memory, copying selected files, and syncing the destination.

In plain words
What is it for?
Migrating an agent’s system, reference, or skill memory during setup, replacement, or memory sharing.
Why use it?
It helps a new or replacement agent inherit useful context without relying on older memory-management commands that can conflict with MemFS.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/letta-ai/letta-code/migrating-memory
Any agent
npx skills add letta-ai/letta-code --skill migrating-memory
Clone the repo
git clone --depth 1 https://github.com/letta-ai/letta-code

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for migrating-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/letta-ai/letta-code/migrating-memory.svg)](https://agentmods.dev/skills/letta-ai/letta-code/migrating-memory)
Your own site
<a href="https://agentmods.dev/skills/letta-ai/letta-code/migrating-memory"><img src="https://agentmods.dev/badge/skills/letta-ai/letta-code/migrating-memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 819 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00051 $0.00819
Opus 5 $0.00026 $0.00409
Sonnet 5 $0.00010 $0.00164
Haiku 4.5 $0.00005 $0.00082

Measured 4d ago against content hash 4ace52eca2fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

migrating-memory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/skills/builtin/migrating-memory/SKILL.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Migrating Memory

This skill helps migrate memory blocks from an existing agent to a new agent, similar to macOS Migration Assistant for AI agents.

Requires Memory Filesystem (memfs)

This workflow is memfs-first. If memfs is enabled, do not use the legacy block commands — they can conflict with file-based edits.

To check: Look for a memory_filesystem block in your system prompt. If it shows a tree structure starting with /memory/ including a system/ directory, memfs is enabled.

To enable: Ask the user to run /memfs enable, then reload the CLI.

When to Use This Skill

  • User is setting up a new agent that should inherit memory from an existing one
  • User wants to share memory blocks across multiple agents
  • User is replacing an old agent with a new one
  • User mentions they have an existing agent with useful memory

Migration Method (memfs-first)

Export → Copy → Sync

This is the recommended flow:

  1. Export the source agent's memfs to a temp directory

    letta memory export --agent <source-agent-id> --out /tmp/letta-memory-<source-agent-id>
    
  2. Copy the files you want into your own memfs

    • system/ = attached blocks (always loaded)
    • root = detached blocks

    Example:

    cp -r /tmp/letta-memory-agent-abc123/system/project ~/.letta/agents/$LETTA_AGENT_ID/memory/system/
    cp /tmp/letta-memory-agent-abc123/notes.md ~/.letta/agents/$LETTA_AGENT_ID/memory/
    
  3. Commit and push the memory repo

    cd ~/.letta/agents/$LETTA_AGENT_ID/memory
    git add system/project notes.md
    git commit -m "Import memory from source agent"
    git push
    

This gives you full control over what you bring across and keeps everything consistent with memfs.

If MemFS Is Disabled

The legacy block-level CLI commands have been removed. Enable MemFS first, then use the export → copy → sync workflow above.

If you run into duplicate filenames while copying memory files, rename the incoming file or merge its contents manually before committing.

Read the full file on GitHub · 99 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 99 lines · 51 tokens per session scan A 4ace52eca2fc

Subscribe to this mod's changes

migrating-memory is a skill published in the GitHub repository letta-ai/letta-code (3,193 stars, last pushed today), licensed Apache-2.0. It adds 51 tokens to every session and 819 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

memanto-companion

Inspect and manage the cross-session engineering memory that Memanto maintains for your Claude Code skills. Use when the user asks what Memanto remembers, wants to see their engineering profile, manually recall context for a skill, or store a decision. The automatic lifecycle hooks handle capture/injection on their…

moorcheh-ai/memanto · 72 tokens

memory-recall

Search and recall relevant memories from past sessions via memsearch. Use when the user's question could benefit from historical context, past decisions, debugging notes, previous conversations, or project knowledge -- especially questions like 'what did I decide about X', 'why did we do Y', or 'have I seen this…

zilliztech/memsearch · 149 tokens

mnemon

Persistent memory CLI for LLM agents. Store facts, recall past knowledge, link related memories, manage lifecycle.

mnemon-dev/mnemon · 25 tokens

mnemon

Persistent memory for MiniMax Code. Recall durable context, store important facts and decisions, and link related memories with the mnemon CLI.

mnemon-dev/mnemon · 30 tokens

prolong

Recover and use durable coding-session history from PRO-LONG's local append-only log. Use on long-running coding tasks, after context compaction or session resume, when reconstructing prior decisions or tool results, or before repeating work that may already have been attempted.

alexisfox7/PRO-LONG · 55 tokens

prep

Session wrap-up. Update memories, check plans, review git state, check inbox, flag loose ends. Use before closing a session or compacting context.

AIOSAI/AIPass · 33 tokens