Agent Memory

Move memory between harnesses

Convert existing memory to Agent Memory, then use it in a supporting harness.

Agent Memory defines a directory format and a contract for how harnesses load it. Supporting harnesses can use memory in that format without restructuring it. For partially supporting harnesses, the migration tool adapts their existing layouts.

Where is your memory now?

From an AI chat

Paste this into the AI that already knows you:

I'm moving to another AI and want to bring the durable context you have
learned about me. Return what a new AI should know so I do not have to
start over: my preferences, recurring work, important context, standing
instructions, and current goals.

Only include things you know from our conversations or saved memory.
Preserve uncertainty or conflicting information instead of guessing.
Output plain Markdown and nothing else.

Save its response as human.md in a new directory. Add a root MEMORY.md that explains what human.md contains. Both files are core memory and will be loaded by a supporting harness.

If you import from several products, keep the raw responses separate under imports/, add imports/MEMORY.md, then review and merge them into human.md. This makes conflicting memories visible instead of silently choosing one.

From an agent harness

Paste this into your current agent:

Help me move your existing memory to another harness using the open Agent
Memory format: https://github.com/agent-memory-spec/agent-memory

Find the memory directory used by your current harness. Use the repository's
memory-ref migration tool to create a separate Agent Memory directory and
show me the dry-run plan before changing anything. The result must contain a
root MEMORY.md and a MEMORY.md in every nested memory directory. Keep the
source untouched, do not overwrite or merge an existing destination, and
explain any memory the destination harness will not load. If I have not said
which harness I am moving to, ask me. After I approve the plan, apply it,
validate the result, and connect the destination harness to the new directory.

The agent can locate its own memory, install or run memory-ref, and handle harness-specific paths. The dry-run gives you a chance to review every file operation before approving it.

Agent Skills remain under skills/ during migration. The converter preserves them without generating MEMORY.md indexes inside them. The destination harness continues to discover and load those files through its Agent Skills system rather than through Agent Memory.

Run the commands yourself

Export the current harness's memory:

uv run memory-ref migrate-from <source> <current-memory-directory> \
  --output ~/agent-memory/my-agent

Then connect another harness:

uv run memory-ref migrate-to <harness> ~/agent-memory/my-agent \
  --target <new-harness-memory-directory>

Both commands are dry-runs until you add --apply. Supported names are letta-code, claude-code, codex, openclaw, hermes, pi-memory, and dcode.

Install the tool from this repository:

git clone https://github.com/agent-memory-spec/agent-memory.git
cd agent-memory/memory-ref
uv sync

Already in Agent Memory

There is nothing to convert. Ask the destination agent to connect to the directory, or run:

uv run memory-ref migrate-to <harness> <memory-directory> \
  --target <new-harness-memory-directory>

The command reports what the destination harness can load before changing anything. See Supported Harnesses for current support and loading differences.