# pi-mem

A plain-Markdown persistent memory system for the pi coding agent, giving it long-term facts, daily logs, a scratchpad and semantic search across sessions.

pi-mem gives the pi coding agent memory that survives between sessions, stored as plain Markdown files under a memory directory rather than a database. A long-term file holds curated decisions, preferences and durable facts; a scratchpad holds a checklist of things to fix or remember later; and daily append-only logs record what happened each day, with today's and yesterday's logs loaded automatically at session start.

Tools let the agent write to or read the long-term memory, the scratchpad, daily logs or arbitrary notes, and search across all of them by filename or content. Identity and behavioral files such as SOUL.md, AGENTS.md and HEARTBEAT.md can also live in the memory directory and be injected into context. Settings are configured through environment variables or a JSON file in the memory directory, with environment variables taking precedence.

It is written in TypeScript and inspired by OpenClaw's approach to agent memory.

Website: https://github.com/jo-inc/pi-mem
