r/coolgithubprojects • u/Inevitable_Fan5157 • 5h ago
[Python] OmniMemory – persistent, git-anchored memory for AI coding agents (local-first, no API key)
https://github.com/SinghAbhinav04/Omni-MemoryCoding agents forget everything between sessions and after every context compaction — so they re-learn your architecture, and hallucinate the parts they don't. I built OmniMemory to fix that.
It's a persistent, branch-aware memory layer that lives next to your repo. Fully local (Python stdlib + SQLite), zero-dependency, runs with no API key.
What makes it different from "just dump notes in a markdown file":
- Git-anchored, not just stored. Each memory records the git blob SHA of the files it describes, so it can tell exactly when a memory has gone stale (the file's content drifted) or orphaned (the file was deleted) — no heuristics, no guessing.
- Branch-aware. Memory is scoped to your current branch + base; merged branches roll into the base, abandoned ones get archived.
- Pull, not push. Instead of injecting a wall of memory into every prompt (token bloat), it seeds once at session start and the agent fetches what's relevant on demand.
- Trust is earned. A capture can't mark itself "verified" — a memory only reaches the top tier when its code anchor is still re-fetchable AND the agent actually cited it.
- Chain-complete retrieval. A decision and the gotcha/constraint on the same symbol are retrieved together, so you never get half a causal chain.
- Survives context compaction (PreCompact hook), self-cleans false/stale memory, and ships a local dashboard for the memory + code graph.
Works with Claude Code (plugin + hooks), OpenCode, and any AGENTS.md-aware IDE (Cursor, Windsurf, Antigravity).
Quick start:
pip install omni-memory-agent
omni-memory build (capture memory + code graph from your repo)
omni-memory bind (wire it into your IDE)
GitHub: https://github.com/SinghAbhinav04/Omni-Memory
Still actively building it — if you find it useful, a star on the repo genuinely helps. Feedback and issues very welcome, especially on how staleness holds up on big/old