Open to career opportunities and collaborations. Learn more .

DiffMem

A git-based differential memory backend that keeps current-state files and preserves evolution in git history for temporal, auditable agent memory.

Detailed Introduction

DiffMem introduces a git-based differential memory approach for AI agents: current-state knowledge is stored as human-readable Markdown files while historical evolution is preserved in Git commits. Agents can load a compact “now” view for fast responses or selectively pull diffs and logs for temporal reasoning. The design emphasizes auditability, portability and token-efficient retrieval for long-horizon memory scenarios.

Main Features

  • Differential view: separate surface (current files) from depth (git history) to keep active contexts lean.
  • Human-readable storage: Markdown-based memory units that are easy to inspect and edit.
  • Temporal queries: use git diffs and logs for time-aware retrieval and evolution analysis.
  • Lightweight prototype: runs in-process with minimal dependencies (e.g., gitpython, rank-bm25) for fast experimentation.

Use Cases

  • Long-lived agents: maintain auditable, reconstructable memory for agents that evolve over years.
  • Research & prototyping: explore pruning, smart forgetting and temporal reasoning strategies.
  • Collaborative memories: shared repos for multi-agent or multi-user memory workflows with git-based merges.

Technical Features

  • Retrieval strategies: BM25 + semantic hybrid retrieval with multi-depth context assembly (core/wide/deep/temporal).
  • No server required: modular library design for local in-process use.
  • Extensible: combine with vector stores or external retrieval layers for enhanced semantic capabilities.
  • Open-source license: MIT, suitable for research and engineering reuse.
DiffMem
Resource Info
🦾 Agents 🧏 Memory 🌱 Open Source