mem0ry4ai

Persistent, local-first memory for coding agents. Your AI assistant finally remembers your projects between sessions.

Python stdlib + PHP 8 · no Docker, no vector DB, no API keys · GPL-2.0

What is mem0ry4ai?

Coding agents like Claude Code forget everything between sessions — every trap you debugged together, every decision you made, every "where was I?" when you return to a project after a month. mem0ry4ai fixes that: it stores durable knowledge (gotchas, decisions, facts, commands, preferences, todos, project status) in plain markdown versioned by git, and injects the relevant slice automatically at the start of every session — scoped to the project you are in.

We surveyed the existing landscape first (claude-mem, basic-memory, mem0, Letta/MemGPT, Graphiti, the official MCP memory server) and designed against the failure modes we found: models that forget to call save tools, fragile vector databases, memory that silently rots, and over-confident auto-extraction.

Features

Measured impact

Real numbers from the author's monorepo (30 sub-projects, 217 active memories) — before and after migrating a monolithic CLAUDE.md into mem0ry4ai:

Honest caveats: tokens estimated at ~4 chars/token; prompt caching makes billed savings smaller than the raw numbers; one user's setup, not a controlled study.

Screenshots

mem0ry4ai dashboard — system status cards, health checks, recent activity with source attribution, and memories grouped by project.

The dashboard: live counters, health checks, recent activity with source attribution, memories grouped by project.

mem0ry4ai project page — status and todos pinned on top, knowledge grouped by type.

The per-project "where was I?" page — status and todo pinned first.

mem0ry4ai review queue — LLM-extracted candidates awaiting human approval, including an over-confident junk candidate.

The review queue. Note the junk candidate at confidence 0.95 — exactly why nothing auto-writes.

mem0ry4ai git history page — the memory timeline with per-commit colored diffs and a commit-from-UI button.

Git history (v0.2.0): the memory timeline — per-commit diffs, supersedes visible in red/green, commit from the UI.

mem0ry4ai 'What Claude sees' page — the exact SessionStart injection with its size in bytes and tokens.

"What Claude sees": the exact SessionStart injection, with its cost in bytes and tokens. All screenshots use demo data.

Install

  1. Clone the repo:
    git clone https://github.com/cremenescu/mem0ry4ai.git && cd mem0ry4ai
  2. The CLI works immediately: ./mem.py add, list, search, supersede.
  3. Start the web UI: ./server_web.shhttp://127.0.0.1:8841/
  4. Wire it into Claude Code:
    python3 hooks/install.py --target user
    then restart Claude Code (or /clear). From now on every session starts with your memories injected.
Your data stays yours. Everything lives in store/*.md on your machine, versioned by your local git. No cloud, no telemetry, no API keys.

What's not yet there

License & credits

mem0ry4ai is released under GPL-2.0-or-later. Built with Python, PHP, SQLite FTS5 — and a healthy distrust of over-confident language models.

Changelog

Mirrors the GitHub releases exactly. Newest first.

v0.3.0 · 2026-06-10

Automatic end-of-session git checkpoint.

  • Auto-checkpoint — the SessionEnd hook now commits store/ by itself; memories written during a session land in git history with no manual action.
  • Health panel: an uncommitted store is an informative gray state, not a red error — it is the normal mid-session condition.
  • The commit button on the git history page remains for mid-session checkpoints with a custom message.
v0.2.0 · 2026-06-10 — Git history page
  • Git history page — the store's timeline in the web UI: every commit touching store/ with a lazy-loaded, colored diff.
  • Commit from the UI — uncommitted store changes are listed, with a button that commits store files only (authored mem0ry4ai web, no signing, never touches code).
  • README: Measured impact section (real before/after numbers) + screenshot gallery with demo data.
v0.1.0 · 2026-06-10 — First public release
  • Markdown + git as the source of truth — auditable, supersede-never-delete; the SQLite FTS5 index is derived and disposable.
  • Claude Code hooks: inject relevant memories at SessionStart (scoped per project, capped multi-project index from a monorepo root), capture transcript pointers at SessionEnd/PreCompact.
  • Trust-gated capture: the in-context agent writes directly; optional offline extraction with a local LLM (Ollama) goes through a human review queue.
  • First-class todo and status types — pinned first in injection and UI.
  • Web UI: dashboard with health checks and live updates, per-project pages, FTS5 ranked search, bulk operations, supersede-chain navigation, "What Claude sees" preview, review queue. Bilingual EN/RO.
  • Standalone server (php -S launcher with PHP_CLI_SERVER_WORKERS), auto-started by the session hook. Binaries resolved from PATH with env overrides.

Feedback

Bugs and feature requests: issue tracker.
Direct contact: razvan@cremenescu.ro.