Your AI Agent Forgets Everything When the Session Ends. Agent-Memory Fixes That — Locally, for Free
Close a session and your agent forgets everything it learned. Every workaround — pasting context back in, hand-written summary files — is manual and fragile. agent-memory (4,250 stars, open source, pushed daily) is a runtime that gives any agent real long-term memory, with zero API keys and zero network calls on the read path.
The amnesia problem
If you run agents across sessions — coding agents, research agents, content pipelines — you know the pain. Every new session starts from zero. You re-explain the project, re-paste the decisions, re-teach the preferences. Summary files help until someone forgets to update them, which is always.
agent-memory treats memory as infrastructure, not as a prompt trick. It works with Claude Code, Codex CLI, Muse Code, and anything that can run a shell command.
What it actually is
- Plain Markdown is the source of truth. One store of markdown files the agent can also just read with
lsandgrep. Fully legible, fully migratable, costs nothing. If the tool ever dies, your memories are still just files. - The SQLite index is a disposable cache. Delete it any time; it rebuilds from the markdown. No lock-in, no migration anxiety.
- Local ranked retrieval. When the agent needs something, search runs locally and returns paths — not pasted text. The agent opens each hit only as deep as the task needs, keeping context tight instead of flooding it.
- Writes fire at conversation boundaries — not when the agent happens to "remember" to save. Memory capture is structural, not voluntary.
- Sleep-time consolidation. On its own clock, a pass consolidates memories and forgets by value. The store gets curated instead of bloating forever.
The architecture insight — worth stealing even if you never install it
There are roughly two schools of agent memory. The retrieval engine school (embeddings, knowledge graphs) finds the right thing but hands back an opaque chunk you can't inspect. The filesystem school (plain markdown notes) is legible but doesn't rank and stops scaling.
This project is both in one store: a retrieval engine indexing a filesystem the agent can also just read. Relations live as links inside the memories; the local index ranks them; the read path calls no model and crosses no network. Legibility and ranking, without choosing.
Honest caveats
Repo: github.com/tigerless-labs/agent-memory · 4,250 stars · open source · actively maintained. Information current as of October 2026; verify install steps against the repo README before running.