Switch agents mid-task.
Quit Claude Code, open Codex in the same directory. It starts with a handoff: what got done, what failed and what is still open.
ai-memory is long-term memory for AI coding agents. Quit Claude Code mid-task, open Codex in the same directory, and carry on without re-explaining the architecture, the failed approaches or the open questions.
Your coding agent already takes notes. They live on one machine and belong to one agent. Switch tools and they are gone, and your teammates never see them at all. ai-memory is what is on the other side of those walls.
Quit Claude Code, open Codex in the same directory. It starts with a handoff: what got done, what failed and what is still open.
Memory lives in a small server you run: on your laptop, a homelab box, wherever. The project you left on the desktop is the project you resume on the notebook.
Point everyone at one server. What one person’s sessions learn, everyone’s agents can find. New hires ask the project instead of interrupting you.
Hooks capture the work silently. Sessions become plain markdown pages, filed and cross-linked in a git-backed wiki. Grep it, open it in Obsidian, edit it by hand.
Three commands to install. You need no account and no API key.
ai-memory for individualsI run a small teamOnboard people by letting them ask the project.
ai-memory for teamsI already use a memory toolMem0, Zep, cognee, OpenViking, Claude’s own memory.
Compare and migrateI want to contribute101 people have landed code so far.
Start contributingAll four steps run in the background, and the default path makes zero LLM calls.

Lifecycle hooks record prompts, tool calls and session boundaries. Secrets are stripped before anything is stored.
When a session ends, its observations become a readable markdown page in the project’s wiki.
The next session gets a short brief and can search everything: full text, entities, links and vectors, fused into one ranking.
The next session picks up the baton, and only one session can claim it. It works across agents and across every machine that reaches the server.
Session pages pile up for months. ai-memory scores them, keeps the ones you still read, and can compact or merge the rest with no LLM. An optional dream pass has your LLM merge cold pages while you are away, and every rewrite can be restored.

Most memory tools need an LLM, a vector store or a graph database before they remember anything. ai-memory needs one binary and a folder.
Full comparison, including where they winPer-laptop MEMORY.md. It needs: Claude Code, One machine.
The "remember my project" convenience, in markdown.
Fact extractors. It needs: An LLM on every turn, A vector store.
Automatic capture, no “remember this” ceremony.
Temporal knowledge graph. It needs: Neo4j, FalkorDB or Neptune, An LLM.
Facts are superseded, never deleted. You can ask what was true at a point in time.
Graph, vector and relational pipeline. It needs: Three stores in sync, An LLM call per chunk, Python.
Provenance, feedback-weighted ranking and a Claude Code plugin.
Living document memory, LLM required. It needs: An LLM or VLM, Embeddings, Postgres or a hosted service.
Memory compiled into living pages by a background consolidation loop. ai-memory has an opt-in dream pass and a confidence score per page.
There is no sign-up. The default install listens on your machine only, so nothing else can reach it. You can add it to a project that is already under way: the first session imports the agent history you have on disk.
# 1. Install the binary (or grab it from the downloads page)
mise use -g github:akitaonrails/ai-memory
# 2. Start the server. It listens on this machine only.
ai-memory init
ai-memory serve --transport http --bind 127.0.0.1:49374
# 3. Launch your agent through it. Hooks and MCP wire themselves.
ai-memory run claude
# On the server: a homelab box or any LAN host
TOKEN=$(ai-memory generate-auth-token)
docker run -d --name ai-memory --restart unless-stopped \
-p 0.0.0.0:49374:49374 -v ai-memory-data:/data \
-e AI_MEMORY_AUTH_TOKEN="$TOKEN" \
-e AI_MEMORY_ALLOWED_HOSTS="<server-ip>,localhost" \
akitaonrails/ai-memory:latest
# On every machine, for every teammate
export AI_MEMORY_SERVER_URL="http://<server-ip>:49374"
export AI_MEMORY_AUTH_TOKEN="<their key>"
ai-memory run claude
New here? The contributing page shows where bug reports, pull requests and new agent integrations go.
Free and open source under the MIT license. You need no account and no API key.