agent-memory
App : A product you use directly
A long-term memory for agents, made of plain Markdown files, with local ranked search and automatic sorting during idle time.
The soundest approach to agent memory right now: the files are the truth, the index is only a cache you can delete, and search returns file paths rather than text pasted into the context. Claude Code and Codex share the same store. No package is published yet: installation is done from the repository.
Security reflects where data goes, requested permissions and incidents on record at the verification date. It is not a guarantee of zero risk: check the deployment mode and the connections you enable.
What it does, concretely
An AI agent that closes its session forgets everything it learned in it. agent-memory fixes this by giving it long-term memory stored as plain Markdown files in a single folder. Those files are the source of truth: the search index beside them is only a cache that you can delete and rebuild without losing anything.
In practice, hooks run at conversation boundaries: the full trace is copied into the store first, then memories are extracted from it without holding up the current task. Search is local and ranked. It returns file paths rather than text pasted into the context, and the agent opens each result at the depth it needs (index line, abstract, outline, full file). A consolidation pass, run during idle time, tidies the memories. It may add and update, but any deletion arrives as a proposal that you confirm.
The tool works with Claude Code, Codex CLI and Muse Code, which share the same store, as well as any agent that can run a shell command. An MCP server is available as an option. No API key is requested: reasoning is borrowed from the host agent's own CLI, and every write stays visible in your transcript.
agent-memory is for people comfortable with a terminal, Python and git who want a memory that is readable, versionable and portable across several agents. It is less suited if you want a turnkey app: there is no published package yet, installation is done from the repository, and the memory folder will contain what you said to your agents.
What it offers
- ·Memory stored as Markdown files, one file per memory, readable with ls and grep and compatible with git.
- ·Local ranked search (BM25 over a SQLite FTS5 index, with an optional vector plugin) that returns file paths rather than text pasted into the context.
- ·Level-based reading with mem read: outline only, abstract or full file, and mem context to get the list and the top results expanded in a single call.
- ·Automatic writing through hooks at conversation boundaries, with the full trace copied first so that a missed extraction does not mean lost data.
- ·Idle-time consolidation: an unattended pass may add and update, but any deletion goes through a proposal that you confirm.
- ·History is preserved: replacing a memory leaves the chain intact, and recall --as-of answers as of a given date.
- ·Store shared between Claude Code, Codex CLI and Muse Code, with an optional MCP server (mem-mcp) for agents that speak MCP.
- ·Diagnostics with mem doctor, which tells you at which layer (host, configuration, store, hooks, reasoner) an installation fails.
In practice
- Price
- Free
- Commercial use
- Commercial use: yes
- Available on
- cli, mcp, claude-code, codex
- Licence
- MIT
- FR interface
- No
Security and data
- Rating
- Security: one caveat, see the card
- Your data
- Data stays local
- Maintenance
- Active
Links and repository checked on 29 November 2026 · added on 29 November 2026
How to install agent-memory
git clone https://github.com/tigerless-labs/agent-memory.git && cd agent-memory && uv sync --all-packages