DiffMem  by Growth-Kinetics

Git-based memory for conversational AI

Created 2 months ago
676 stars

Top 50.0% on SourcePulse

GitHubView on GitHub
Project Summary

DiffMem addresses the challenge of managing evolving memory for conversational AI agents by leveraging Git as a version control system for knowledge storage. It offers a human-readable, durable, and portable memory backend that prioritizes current-state efficiency while enabling deep historical analysis through Git's differential capabilities. This project is ideal for developers building long-horizon AI systems that require auditable and scalable memory management.

How It Works

DiffMem treats AI memory as a versioned repository, storing the current state of knowledge in Markdown files and utilizing Git for tracking temporal changes. This design separates the "surface" (current information) for fast, token-efficient queries from the "depth" (historical data) accessible on demand via Git's commit graph. An in-memory BM25 index facilitates quick, explainable retrieval, while Git diffs allow agents to efficiently query how specific facts have evolved over time.

Quick Start & Requirements

  • Install: pip install -r requirements.txt (after cloning the repository).
  • Prerequisites: Git, Python, alexmrval/DiffMem repository, OPENROUTER_API_KEY environment variable.
  • Setup: Clone the repository and install dependencies. Running examples is straightforward.
  • Links: Examples directory within the repository.

Highlighted Details

  • Leverages Git for efficient, scalable tracking of memory evolution.
  • Reduces query surface by indexing only current-state files for faster, more token-efficient LLM interactions.
  • Enables "differential intelligence" by allowing agents to query specific changes over time using Git diffs.
  • Uses Markdown for human-readable and tool-agnostic memory storage.

Maintenance & Community

This is an R&D project from Growth Kinetics, a boutique data solutions agency. They are open to collaborations, pull requests, and feedback. Contributions are welcomed for Git sync optimizations, advanced search plugins, and real-world integrations.

Licensing & Compatibility

  • License: MIT
  • Compatibility: Permissive for commercial use and integration with closed-source applications.

Limitations & Caveats

This is an early Proof-of-Concept (PoC) and is not production-hardened. It lacks automatic Git synchronization, has basic error handling, rebuilds the index on every initialization (caching is recommended for production), and does not implement multi-user concurrency locks.

Health Check
Last Commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
26 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Wes McKinney Wes McKinney(Author of Pandas), and
6 more.

beads by steveyegge

10.6%
2k
Memory system for AI coding agents
Created 3 weeks ago
Updated 9 hours ago
Feedback? Help us improve.