DiffMem: Git-Based Differential Memory for Smarter AI Agents

2025-08-21
DiffMem: Git-Based Differential Memory for Smarter AI Agents

DiffMem is a lightweight, Git-based memory system designed for AI agents and conversational systems. It leverages Markdown for human-readable storage, Git for version control and tracking memory evolution, and an in-memory BM25 index for fast retrieval. This proof-of-concept demonstrates how version control can create efficient, scalable memory for AI. DiffMem treats memory as a versioned repository, separating the current state from historical changes. This allows for efficient queries on the current knowledge while preserving the full history for deeper analysis. It addresses challenges in traditional AI memory systems like scalability and query efficiency, offering a human-readable, easily portable, and auditable solution. The system is composed of a writer agent, context manager, searcher agent, and an API layer. While currently a prototype, DiffMem showcases a promising approach to long-term AI memory management.

Development