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.
How handoffs workai-memory saves project notes for AI coding tools such as Claude Code and Codex. When you start another session, it supplies saved context and tools to search earlier work, so you spend less time re-explaining your project.
ai-memoryWorks with 32 coding agents, including Claude Code, Codex, Cursor, Gemini CLI, OpenCode, OpenCode 2
This is a tool for people already using AI to work on code. It stores context outside the coding agent so later sessions can retrieve it.
With capture enabled, prompts and limited tool observations are recorded. An empty project can import recent local agent history on first use. In single-user mode, recurring preferences can carry across projects.
These defaults describe ai-memory. Your coding agent has its own provider connections and data settings.
Install, set up, launch. Default memory features need no model-provider 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 contribute153 people have landed code so far.
Start contributingCapture saves observations from a session. A handoff summarizes unfinished work for the next one, while the project wiki holds longer-lived notes. The default path needs no cloud language model.
Capture
Consolidate
Recall
Hand off
A git-backed wiki of plain markdown files
Hooks record prompts and limited tool observations. Recognized credentials are redacted before storage, but filtering can miss sensitive text.
When a session ends, its observations become a readable markdown page in the project’s wiki.
The next session receives a brief and can search saved pages and observations. Retrieved notes can be incomplete or outdated; check important decisions against their sources.
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.
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: downloaded, checksum verified, no root
curl -fsSL https://github.com/akitaonrails/ai-memory/releases/latest/download/install.sh | sh
# 2. Create the data directory, start the service, wire every agent it finds
ai-memory setup
# 3. Launch your agent through it
ai-memory run claude
Start with a non-sensitive project and an operator who will maintain the server, accounts, updates and backups. Check who can read and write the project before inviting teammates.
The software is free. You provide the machine and its administration; optional cloud model providers charge under your own accounts.
Claude Code, Codex, Cursor, Gemini CLI, OpenCode and more share one server. What one learned this morning is there for the next one this afternoon.
Agents and editorsMeasuredhit@5 measures whether any session containing the evidence appears in the first five results. The published harness includes capture. This measures retrieval, not answer accuracy.
What was measuredQuit Claude Code, open Codex in the same directory. It starts with a handoff: what got done, what failed and what is still open.
How handoffs workRun one server and connect both machines to it. Memory is available while that server is reachable. Offline hook events wait locally for delivery; two servers do not replicate.
One server, many machinesConnect your team’s agents to one server. Within projects they can access, new hires can find earlier decisions and their sources before asking teammates.
ai-memory for teamsHooks are small commands triggered by the agent’s session events. They record observations that become markdown pages. Browse the wiki, search it, or edit it by hand.
See what is storedUnused session pages can be removed automatically. You can enable compaction or merging to retain shorter versions without a cloud model. An optional background pass uses your configured language model to merge old pages; compaction and merge rewrites can be restored.
Page read
reinforces
Retention score
Forget-sweep
Cold?
Cold?
Evict
Compact
One survivor
git history
restore-page
Evict
Compact
One survivor
Each project keeps its own memory. The profile carries how you usually work, learned from your projects on their own, and hands it to every new one at session start, below the repository’s rules. Start a new repository and the agent already knows your baseline.
Same project, any agent
Claude Code
ai-memory
Codex
OpenCode
Project A
Project B
Project C
Profile
New project
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.
Page versions support historical queries. ai-memory tracks when it learned or replaced a fact; retention and purge can still remove data.
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.
New here? The contributing page shows where bug reports, pull requests and new agent integrations go.
Free and open source under the MIT license. The default memory features need no model API key; your coding agent may require its own account.