
agent-memory: A Zero-Dependency Memory System for AI Agents
The Problem AI agents wake up with amnesia every session. They need a simple, reliable way to persist and retrieve context between runs. Most solutions are over-engineered — vector databases, embedding APIs, complex infrastructure. Sometimes you just need a JSONL file and TF-IDF. What I Built agent-memory is a lightweight, file-based memory system for AI agents. Pure Python, zero external dependencies. Key Design Decisions JSONL storage — One JSON object per line. Human-readable, git-friendly, trivially debuggable. No binary formats, no databases. TF-IDF search — Built from scratch in ~60 lines of Python. No numpy, no scikit-learn. For the typical agent memory store (hundreds to low thousands of entries), this is more than sufficient. Zero dependencies — The entire package uses only Python standard library. pip install never breaks because there's nothing to break. Two Interfaces CLI agent-memory init agent-memory add "User prefers dark mode" --tags "preference,ui" agent-memory search
Continue reading on Dev.to Python
Opens in a new tab



