agent-memory
Long-term memory runtime for AI agents — plain Markdown as the source of truth, local ranked retrieval, and an independent sleep-time Manage layer. Claude Code
What is agent-memory?
Long-term memory runtime for AI agents — plain Markdown as the source of truth, local ranked retrieval, and an independent sleep-time Manage layer. Claude Code and Codex share one store. No API key.
Overview of agent-memory
What it is
agent-memory is a long-term memory runtime for AI agents. It uses plain Markdown files as the single source of truth, with a local SQLite index that is a rebuildable cache. Retrieval is local and ranked, returning file paths instead of pasted text. Writes are triggered at conversation boundaries, and a sleep-time pass consolidates and forgets by value. The store is shared by Claude Code, Codex CLI, Muse Code, and any agent that can run a shell command. No API key is required.
Key features
- Markdown files as the single source of truth; the SQLite index is a cache that can be deleted and rebuilt without data loss.
- Local ranked retrieval using BM25 over an FTS5 index, with an optional vector plugin fused by RRF.
- Three read tracks: deterministic MEMORY.md injection at session start, BM25/vector recall, and the plain directory tree.
- Write coverage at conversation boundaries; the full trace is copied first so nothing is lost.
- A sleep-time Manage layer with authority tiers: unattended consolidation may add and update, deletion only arrives as a proposal.
- No LLM client inside the library; zero API keys to install.
- Files are portable, greppable, git-able; the index is fully rebuildable with
rm -rf .index/ && mem rebuild.
Use cases
- Long-term memory for AI coding agents like Claude Code, Codex CLI, and Muse Code.
- Cross-session knowledge sharing among multiple agents using the same store.
- Local, offline memory retrieval without external API dependencies.
- Managing and consolidating agent memories with automatic sleep-time processing.
Getting started
See the repository README for installation and quick-start instructions.
License and pricing
MIT license, open source.
Based on the project's public README and repository metadata.