█

AI/TLDR

Buy me a coffee
Buy me a coffee

ai-memory

A self-hosted memory server for coding agents that keeps a git-backed markdown wiki, so a handoff survives switching CLI, machine or teammate

Agent MemoryOpen source
Latest
v1.29.0
Updated
19 Aug 2026
Language
Rust
License
MIT
Coverage
1 story

What's new

v1.29.019 Aug 2026

Release v1.29.0 published with prebuilt binaries for Linux, macOS and Windows, an AUR package, a Docker image and packaged hook installers.

Latest news

IN SHORT

What is ai-memory?

ai-memory is a self-hosted memory server for coding agents that keeps a git-backed markdown wiki, so a handoff survives switching CLI, machine or teammate. Quit one agent mid-task, open another in the same directory, and the next one picks up where you left off, what failed, and what is still open. It sits in the Agent Memory category of the Agents & Automation tools and is open-source, written in Rust and licensed MIT.

Updated Markdown version ↗

Overview

Every coding agent now takes its own notes, and every one of those note stores has the same walls: it lives on one machine, belongs to one agent, and disappears the moment you switch tools or hand the work to someone else. ai-memory is what sits on the other side of those walls — a server you run yourself that more than twenty harnesses feed into and read from, including Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Zed, VS Code Copilot and others, via first-party MCP registration, lifecycle hooks, or both. Quit one agent mid-task, open another in the same directory, and the next one picks up where you left off, what failed, and what is still open. Handoffs are a typed protocol here, owned and claimed exactly once, not a convention.

The source of truth is deliberately boring: a git-backed wiki of ordinary markdown files you can grep, open in Obsidian, edit by hand or rsync. The database is a derived index that can always be rebuilt from those files, so there is no vector store to babysit and nothing locked inside a binary blob. Capture happens silently through lifecycle hooks that record prompts, tool calls and session boundaries, sanitized at a typed privacy boundary before storage, and consolidated at session end into readable pages. The default path makes zero LLM calls — capture, search and handoffs all work with no API key at all; LLM-written summaries and vector search are opt-in.

Because the memory lives in a server rather than a dotfile, it follows you across machines and works for a team: point everyone at one instance and what one person's sessions learn, everyone's agents can retrieve, with knowledge shared per project while personal handoffs stay personal. Multi-user auth, per-person attribution and an audit log of every mutation are built in rather than gated behind a paid tier. It ships as a single self-contained Rust binary with purge commands that state exactly what "deleted" means and a measured write ceiling of roughly 700 writes per second, under MIT.

What it does

  • One shared memory across 20+ agent CLIs (Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Devin, Kimi, Kiro and more) via MCP and lifecycle hooks
  • Typed cross-agent handoffs — owned and claimed exactly once, so a baton is passed rather than assumed
  • Plain markdown as the source of truth in a git-backed wiki; the database is a derived index that can be rebuilt from the files
  • Silent capture through lifecycle hooks, sanitized at a typed privacy boundary and consolidated into readable pages at session end
  • Zero LLM calls on the default path — capture, search and handoffs need no API key; LLM summaries and vectors are opt-in
  • Multi-user auth, per-person attribution and an audit log of every mutation, with per-project sharing and private personal handoffs
  • Single self-contained binary; Linux, macOS and WSL2 supported, with Docker images for amd64 and arm64

Getting started

ai-memory is a server plus per-agent integrations. Install the binary (AUR, Docker, or a release archive), initialise a data directory, run the service, then wire up each agent you use.

Install

Native packages exist for Arch; the published Docker image covers linux/amd64 and linux/arm64, and the releases page carries macOS, Linux and Windows archives.

bashbash
yay -S ai-memory-bin      # prebuilt binary
# or
docker pull akitaonrails/ai-memory:1.29.0

Initialise and start the service

A single-user workstation setup keeps data under your home directory and runs the server as a user unit. System-service installs use /var/lib/ai-memory and /etc/ai-memory instead.

bashbash
mkdir -p ~/.config/ai-memory ~/.local/share/ai-memory
ai-memory --data-dir ~/.local/share/ai-memory \
  --config ~/.config/ai-memory/config.toml init
systemctl --user enable --now ai-memory.service

Wire up an agent

Register the MCP server and install the lifecycle hooks for each harness you use. Repeat with --client / --agent set to codex, cursor, opencode and so on; the support matrix lists what each one gets.

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

Work, then hand off

Nothing else is required day to day — hooks capture as you work and session end consolidates observations into wiki pages. Start the next session in any wired-up agent in the same directory and it receives a bounded brief plus searchable history.

bashbash
grep -r "retry" ~/.local/share/ai-memory/wiki/

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Switch between Claude Code, Codex and Cursor mid-project without re-explaining the architecture and the approaches that already failed
  • Resume on a laptop the project you left on a desktop, because memory lives in a server rather than a dotfile
  • Give a team one shared project memory with per-person attribution and an audit log, while personal handoffs stay personal
  • Keep agent memory in files you can read, grep and version — and delete, with commands that say what deletion means

How ai-memory compares

ai-memory alongside other open-source agent memory tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Claude-Mem★ 121kPersistent memory layer for coding agents: it captures what an agent does during a session, compresses it into semantic summaries, and injects the relevant parts back into later sessions.
Mem0★ 69.7kA memory layer that you add to existing LLM agents to extract, store, and recall user facts and preferences across sessions using vector, graph, and key-value backends.
Hindsight★ 64.3kAn agent memory server that stores facts and experiences, consolidates them into observations and mental models, and serves them back through retain, recall, and reflect operations.
MemPalace★ 60.8kLocal-first agent memory that stores conversations verbatim instead of summarising them, with a structured palace index, pluggable vector backends and an MCP server.
OpenViking★ 43.1kA context database that stores an agent's memories, resources, and skills as one browsable viking:// filesystem with three-tier (abstract/overview/details) on-demand loading.
Cognee★ 33.7kA graph-native memory engine that turns raw documents and conversations into a queryable knowledge graph for agents that need to build lasting knowledge.
Graphiti★ 33.2kA library that builds a temporal knowledge graph from an agent's conversations and data so facts can be tracked and queried as they change over time.
ai-memory★ 16.6kA self-hosted memory server for coding agents that keeps a git-backed markdown wiki, so a handoff survives switching CLI, machine or teammate