agent-memory is a long-term memory runtime for AI agents that persists knowledge across sessions using plain Markdown files as the authoritative store.
The problem it solves is that agents lose all context when a session ends, forcing them to relearn information repeatedly. agent-memory addresses this by maintaining a local, indexed knowledge base that any agent can access through shell commands. The approach combines two architectural patterns: a retrieval engine that ranks and indexes memories, and a filesystem interface that keeps those memories readable and portable. Markdown files serve as the single source of truth, with an SQLite index acting as a deletable cache. Retrieval returns file paths and abstracts rather than pasted text, allowing agents to open memories at whatever depth a task requires. Writes happen automatically at conversation boundaries, and a separate consolidation pass runs on its own schedule to organize and prune memories by value.
The tool suits teams building multi-session AI agents that need persistent, inspectable knowledge without external dependencies. It works with Claude Code, Codex CLI, Muse Code, and any agent that can execute shell commands. Unlike systems that hand agents opaque text chunks locked into proprietary stores, this project keeps memories as plain files that developers can browse with standard tools like ls and grep. The retrieval mechanism scales beyond simple filesystem listing by ranking results locally, avoiding the need for embeddings APIs or network calls during recall.
Development shows consistent focus on the core design. The project maintains clear architectural invariants documented separately from the runtime itself. Work centers on the retrieval and consolidation mechanisms rather than expanding scope, with attention to the tradeoff between search precision and the cost of each retrieval level. The codebase targets Python 3.12 and above, indicating a preference for modern language features over broad compatibility.