Memory for agents that outlives the terminal session
agent-memory persists what an agent learns across sessions as plain Markdown files with local ranked retrieval, so Claude Code, Codex, and any shell-capable host can share one store without API keys.

What it does
agent-memory is a long-term memory runtime for AI agents. It writes what an agent learns during a session to plain Markdown files in a shared store, indexes them locally with SQLite and BM25 (plus optional vector fusion), and answers recall queries with file paths and abstracts so the agent can read as deeply as it needs. A separate sleep-time “Manage” layer consolidates and proposes deletions on its own schedule, while the host agent’s own CLI provides judgement—meaning the library itself contains no LLM client and demands zero API keys.
The interesting bit
Most memory tools force a choice between an opaque retrieval engine and a legible filesystem. This project treats Markdown files as the single source of truth and makes the retrieval index a fully rebuildable cache—destroying .index/ and rebuilding loses zero knowledge, a property enforced by tests rather than documentation promises. It also flips the write responsibility: distillation fires at conversation boundaries automatically, so the agent does not have to remember to remember.
Key highlights
- Markdown files are the source of truth; the SQLite/FTS5 index is a disposable cache.
- Three read tracks—deterministic
MEMORY.mdinjection, BM25/RRF ranked recall, and plain directory grepping—so a miss on one is not a miss. - Sleep-time Manage layer runs consolidation and deletion proposals on its own clock; unattended deletes never happen without confirmation.
- No embedded LLM client: judgement is borrowed from the host agent’s CLI, eliminating API keys and billing surfaces from the library.
- One store shared across Claude Code, Codex CLI, Hermes, or anything that can invoke a shell command.
Caveats
- The LongMemEval-S benchmark numbers are explicitly noted as not comparable to published scores because the haystack was bounded to 12 sessions per episode; treat them as a write-strategy study rather than a claim about corpus-scale performance.
- No PyPI release exists yet; distribution is currently source-only.
- MCP tool coverage is narrower than the CLI surface—
context,sleep, and the proposal ledger lack MCP equivalents for now.
Verdict
Worth a look if you run Claude Code or Codex daily and want session-to-session continuity without surrendering your memory to a hosted vector database. Skip it if you need a managed cloud service or an agent that does not execute shell commands.
Frequently asked
- What is tigerless-labs/agent-memory?
- agent-memory persists what an agent learns across sessions as plain Markdown files with local ranked retrieval, so Claude Code, Codex, and any shell-capable host can share one store without API keys.
- Is agent-memory open source?
- Yes — tigerless-labs/agent-memory is open source, released under the MIT license.
- What language is agent-memory written in?
- tigerless-labs/agent-memory is primarily written in Python.
- How popular is agent-memory?
- tigerless-labs/agent-memory has 863 stars on GitHub.
- Where can I find agent-memory?
- tigerless-labs/agent-memory is on GitHub at https://github.com/tigerless-labs/agent-memory.