Loading...
Loading...
Migrate memory blocks from an existing agent to the current agent. Use when the user wants to copy or share memory from another agent, or during /init when setting up a new agent that should inherit memory from an existing one.
npx skill4agent add letta-ai/letta-code migrating-memoryRequires 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 ablock in your system prompt. If it shows a tree structure starting withmemory_filesystemincluding a/memory/directory, memfs is enabled.system/To enable: Ask the user to run, then reload the CLI./memfs enable
letta memfs export --agent <source-agent-id> --out /tmp/letta-memfs-<source-agent-id>system/cp -r /tmp/letta-memfs-agent-abc123/system/project ~/.letta/agents/$LETTA_AGENT_ID/memory/system/
cp /tmp/letta-memfs-agent-abc123/notes.md ~/.letta/agents/$LETTA_AGENT_ID/memory/letta memfs sync --agent $LETTA_AGENT_IDletta blocks listletta blocks copyletta blocks attachduplicate key value violates unique constraint--labelletta blocks copy --block-id <id> --label project-imported--overrideletta blocks copy --block-id <id> --override
letta blocks attach --block-id <id> --overridememorymemory(agent_state, "delete", path="/memories/<label>")letta blocks attach--labelagent-abc123Skill({ skill: "finding-agents" })agent-abc123letta memfs export --agent agent-abc123 --out /tmp/letta-memfs-agent-abc123cp -r /tmp/letta-memfs-agent-abc123/system/project ~/.letta/agents/$LETTA_AGENT_ID/memory/system/letta memfs sync --agent $LETTA_AGENT_ID