Skip to content
yisusvii
Go back

ai-memory: Shared, Git-Backed Long-Term Memory for AI Coding Agents

Suggest Changes

By

Table of Contents

Open Table of Contents

Why This Repo, Why Now

Checking github.com/trending today, the top repository is akitaonrails/ai-memory — described by its README as “long-term memory for AI coding agents. Quit Claude Code mid-task, start OpenAI Codex in the same directory, continue without re-explaining the architecture, the failed approaches, or the open questions.”

The problem it targets is familiar to anyone who switches between coding agents during a workday: each harness (Claude Code, Cursor, Codex, and the rest) keeps its own memory, if it keeps one at all, so context about a project’s architecture, failed approaches, and open questions doesn’t travel with you when you change tools, hand off to a teammate, or switch machines. ai-memory’s pitch is a single shared memory layer, captured automatically from agent lifecycle hooks, stored as a git-backed markdown wiki rather than an opaque database, and retrievable by more than twenty supported agent harnesses through MCP.

Part of why it’s resonating right now is the design choice to make the zero-LLM path the default: capture, search, and cross-agent handoffs all work with no API key, while LLM-backed features (session summaries, semantic search, an opt-in “dream” consolidation pass) stay strictly opt-in. As always, a trending position reflects visibility and momentum at a point in time, not an independent verdict on quality, security, or production-readiness — those are reviewed separately below.


What the Technology Actually Is

Per the project’s README and ARCHITECTURE.md, ai-memory ships as one self-contained Rust binary that runs an MCP/HTTP server and owns a single data directory:

<data_dir>/
├── wiki/    # markdown source of truth, git-versioned
├── raw/     # immutable sanitized managed-workstream transcript segments
├── db/      # SQLite indexes, including FTS5, entities, and embeddings
├── models/  # reserved for local embedding models
└── logs/    # rolling tracing output

Documented architectural pieces:

At a high level, per the README’s own diagram: capture ──▶ consolidate ──▶ recall ──▶ handoff. Hooks observe silently, session-end turns observations into wiki pages, the next session gets a brief plus search, and handoffs pass the baton explicitly between harnesses.


Purpose and Use Cases

Per the README, ai-memory’s primary purpose is giving a coding agent persistent, portable project memory that isn’t tied to one tool, one machine, or one person.

Documented use cases and target users:

Target users per the README and support matrix are developers already using one or more of the 20+ supported harnesses (Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Devin, Kiro, GitHub Copilot CLI, and others listed in docs/support-matrix.md) who want continuity across tool switches without standing up their own memory infrastructure.


Installation

Per the project’s documented Quick start. The maintainer documents the native two-command install as the primary path on Linux and macOS, with separate documented paths for Windows, Arch Linux, Fedora, Docker, and NixOS.

Prerequisites

curl -fsSL https://github.com/akitaonrails/ai-memory/releases/latest/download/install.sh | sh
ai-memory setup

Per the README, install.sh downloads the release build for your OS and CPU, checks it against the release’s published SHA-256 checksum and refuses to install without a match, and links ~/.local/bin/ai-memory. ai-memory setup then creates the data directory (owner-only on Unix), starts a per-user service (systemd --user or a launchd LaunchAgent), and wires MCP, hooks, and Agent Skills for every agent it detects, or the ones named with --agent. It shows its plan first and asks before writing anything; --plan previews with no changes.

Windows

irm https://github.com/akitaonrails/ai-memory/releases/latest/download/install.ps1 | iex
ai-memory setup

Docker (no native binary required on the host)

docker run -d --name ai-memory \
    --restart unless-stopped \
    -p 127.0.0.1:49374:49374 \
    -v ai-memory-data:/data \
    docker.io/akitaonrails/ai-memory:latest

The README notes this quick-start container runs with no authentication (the container never runs init), binds to loopback only by default, and that a CLI wrapper (also checksum-verified against a published SHA-256) is needed on the host to wire agent hooks:

ai-memory install-mcp   --client claude-code --apply
ai-memory install-hooks --agent  claude-code --apply

Minimal getting-started example

After ai-memory setup completes and you restart your agent, the README’s documented smoke test is simply to ask it:

What do you remember about this project?

and confirm it answers through ai-memory rather than its own built-in memory, if any.


Quick Verification

Based on documented commands in the README and docs/install.md:

  1. Version check — ai-memory --version confirms the installed binary and rules out a stale Cargo- or package-manager-installed binary shadowing it earlier in PATH.
  2. Self-check during setup — ai-memory setup itself runs a documented self-check that writes nothing: a GET /healthz call, a memory_status MCP call using the install’s own credential, and ai-memory doctor.
  3. Scoped health check — ai-memory doctor reports the health of every detected agent registration; per the README, its overall healthy field can read false while the one workflow you actually use is fine, so check the specific client/provider you wired.
  4. Service status — ai-memory status (or docker exec ai-memory ai-memory status --json for the container path) reports whether the server is reachable and its current auth state (e.g., auth: none (loopback)).
  5. End-to-end check — asking your agent “What do you remember about this project?” after a restart is the README’s own documented confirmation that hooks, MCP, and recall are working together.

Security Review

Verified from the repository itself (SECURITY.md, DATA_HANDLING.md, and the README’s Security section):

Security considerations to weigh yourself (documented factors, not verified vulnerabilities):

Practical recommendations:


Should You Use It?

Strengths: a published, detailed threat model (SECURITY.md) that states what the project does and does not defend against rather than implying blanket security; a zero-LLM default path for capture, search, and handoffs, with every LLM-backed feature opt-in; a git-backed, human-editable markdown source of truth instead of an opaque database; broad harness coverage (20+ agents) behind one MCP/CLI interface; checksum-verified release artifacts; and a visibly active release cadence (v3.1.1 current, with same-week bug-fix commits).

Limitations: the documented threat model is explicitly single-tenant — no per-user or per-project ACLs, so any authenticated user on a shared server can read the same project memory; no encryption at rest in v1; prompt-injection risk from stored content is acknowledged by the maintainers as unsolved in general, only mitigated; and the optional LLM reranker and “dream” consolidation pass send query or note content to an external provider if enabled.

Good fit for: individual developers and small teams already using one or more supported coding-agent harnesses who want continuity when switching tools or machines; homelab or small-team setups comfortable running and securing their own server; and anyone who specifically wants project memory stored as inspectable, git-versioned markdown rather than a vector database.

Evaluate alternatives if: you need per-user or per-project access control on a shared server (ai-memory’s own SECURITY.md states this is out of scope for v1); your organization requires encryption at rest for stored project context; or your threat model cannot tolerate any current gap in prompt-injection defenses for LLM-consumed stored content.

Primary sources used: GitHub repository · README · SECURITY.md · DATA_HANDLING.md · docs/install.md · docs/ARCHITECTURE.md · docs/support-matrix.md · Repository tags · LICENSE


Suggest Changes
Share this post on:


Next Post
Security Thursdays by yisusvii — 2026-10-15