r/PiCodingAgent • u/Snoo-56267 • 21m ago
Resource GitHub - seandavi/commonplace: Shared, durable memory for coding agents (Claude Code, Codex, pi, omp and any MCP client) across projects and machines
I use pi, Claude Code and Codex on several machines, across several projects, and whatever one agent learned stayed with that agent on that machine. commonplace is my very simple but (at least for me) effective solution. It's one small server that holds short facts about you, your machines, your infrastructure, and your repos, and every agent on every machine can read and write them. It's simply a SQLite database with full-text search, served over MCP, plus a CLI. In pi it's a single extension file. When a session starts, the extension adds a one-line-per-memory index to the system prompt and gives the agent tools to recall, read, write, update and forget memories. When an agent needs the full text of one, it fetches it. Memories are scoped: global for facts about you, host for facts that are only true on one machine, and project for facts about one repo. The project scope comes from the git remote, so a repo maps to the same scope on every machine.
Most of the design is about keeping it from turning into a dumping ground. Memory bodies are capped at 4,000 characters by default and each scope also has a configurable limit to avoid memory becoming an infinite set of minutiae. When an agent writes a memory, the server warns about similar ones already in the same scope, and it flags any scope whose index is getting too long. A memory can carry an expiry date, after which it drops out of the index and out of search. Updates are versioned and forgets are soft deletes, so you can see which agent wrote what. There's also a stats command that shows which memories get read and which never do, so you know what to prune. Every agent is told that memories are data written by other agents, never instructions.
It isn't an agent OS, a knowledge base or a place for notes, plans or status logs. It's a commonplace book: a small set of facts worth knowing at the start of any session, like "use just, not make" or "this machine's temp dir isn't /tmp." Agents don't capture memories into commonplace automatically; they write them on purpose. It has no authentication, so run it on a tailnet or another private network and keep secrets out of it.
uv tool install commonplace-agent-memory, MIT licensed: