Your pi sessions remember everything. No more re-explaining.
Persistent cross-session memory via agentmemory — shared with Claude Code, Codex CLI, Gemini CLI, Hermes, OpenClaw, and more.
Start the agentmemory server in a separate terminal:
npx @agentmemory/agentmemoryCopy this folder into pi's global extensions directory:
mkdir -p ~/.pi/agent/extensions/agentmemory
cp integrations/pi/index.ts ~/.pi/agent/extensions/agentmemory/index.tsThen enable it in ~/.pi/agent/settings.json if you prefer explicit loading:
{
"extensions": ["~/.pi/agent/extensions/agentmemory"]
}If you place it under ~/.pi/agent/extensions/agentmemory/, pi will also auto-discover it and /reload can hot-reload it.
memory_health— confirm the shared memory server is reachablememory_search— search prior decisions, bugs, workflows, and preferencesmemory_save— write durable facts back to long-term memory/agentmemory-status— check health from inside pibefore_agent_startrecall — injects relevant memories into the promptagent_endcapture — saves completed conversation turns back to agentmemory
| Variable | Default | Description |
|---|---|---|
AGENTMEMORY_URL |
http://localhost:3111 |
agentmemory server URL |
AGENTMEMORY_SECRET |
(none) | Bearer token for protected instances |
Run pi and ask it to use the memory_health tool, or call the command directly:
/agentmemory-status
You should see agentmemory healthy and a footer status like 🧠 agentmemory.
- This extension uses pi's extension API, not MCP, so it can hook directly into the agent lifecycle.
- One local agentmemory server can be shared across pi, pi2, Hermes, OpenClaw, Claude Code, Codex CLI, and Gemini CLI.
