Persistent memory for AI coding agents that captures sessions automatically and injects relevant context into later sessions across Claude Code, Cursor, Codex and other MCP clients.
akitaonrails/ai-memory
Long-term memory for AI coding agents that carries project context and handoffs across Claude Code, Codex, Cursor and other agent CLIs.
- Stars
- 10,811
- Forks
- 765
- Open issues
- 11
- Last commit
- 2 days ago
What is it?
ai-memory is a long-term memory layer for AI coding agents. When you stop working in one agent, such as Claude Code, and open another, such as OpenAI Codex, in the same project, the new agent receives a handoff describing where the work left off, what failed, and what is still open, so you do not have to re-explain the architecture each time.
Lifecycle hooks capture prompts, tool calls and session boundaries, sanitize them before storage, and consolidate each session into markdown pages in a git-backed wiki. The wiki is the source of truth; the SQLite index used for search can be rebuilt from those files. Retrieval combines full-text search, entity and graph matching, and optional vector search. The default path makes no LLM calls, while an LLM provider can be configured for better summaries and semantic search.
The server runs on your own machine, a homelab host or a LAN server, and can be shared by a team with per-person authentication and an audit log. It ships as a single Rust binary and installs through scripts, Docker, a NixOS module, or packages for Arch and Fedora.
Key features
- 01Shared handoffs between more than twenty agent CLIs, including Claude Code, Codex, Cursor and Gemini CLI.
- 02Memory stored as plain markdown files in a git-backed wiki that can be edited by hand.
- 03Automatic capture through lifecycle hooks, with sanitization before anything is stored.
- 04Works with zero LLM calls by default; LLM and embedding providers are optional.
- 05Multi-user authentication, per-person attribution and an audit log for team use.
Use cases
- Switching between Claude Code and Codex on the same repository without losing context.
- Keeping one shared project memory on a homelab server and resuming work from a laptop.
- Giving a team a common, audited knowledge base that every developer's agents can search.
- Continuing a task after an agent hits quota limits or exits before writing a handoff.
Quick start
- 1
Install the binary on Linux or macOS
Install with the official instructions in the README - 2
Set up the data directory, service, and agent wiring
ai-memory setup - 3
Restart your agents and ask one what it remembers about the project
Things to know
- Native Windows support is experimental; WSL2 is the supported route.
- Some agents are only partially integrated, as MCP-only, hooks-only, or managed-only.
- Sharing memory across machines or a team requires running your own server.
Topics
FAQ
- What is ai-memory?
- Long-term memory for AI coding agents that carries project context and handoffs across Claude Code, Codex, Cursor and other agent CLIs. ai-memory is a long-term memory layer for AI coding agents. When you stop working in one agent, such as Claude Code, and open another, such as OpenAI Codex, in the same project, the new agent receives a handoff describing where the work left off, what failed, and what is still open, so you do not have to re-explain the architecture each time.
- Is ai-memory free to use? What license does it have?
- ai-memory is open source under the MIT license. Check the license terms before using it in commercial products.
- Is ai-memory still maintained?
- Actively maintained. The last commit to ai-memory was on Oct 19, 2026.
- What can I use ai-memory for?
- Switching between Claude Code and Codex on the same repository without losing context. Keeping one shared project memory on a homelab server and resuming work from a laptop. Giving a team a common, audited knowledge base that every developer's agents can search. Continuing a task after an agent hits quota limits or exits before writing a handoff.
- How do I install ai-memory?
- Install the binary on Linux or macOS Set up the data directory, service, and agent wiring: ai-memory setup Restart your agents and ask one what it remembers about the project
- Where can I get ai-memory?
- The source code and installation instructions are on GitHub: https://github.com/akitaonrails/ai-memory
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
MCP server and CLI letting AI agents reverse engineer native binaries, Electron apps, .NET assemblies and websites.
A native macOS desktop app that collects coding-agent sessions from Claude Code, Codex and many other tools into one searchable, resumable place.
An open source, general-purpose AI agent that runs on your machine as a desktop app, CLI, or embeddable API, for code and non-code tasks.
Open-source desktop agent app and Rust library for running many AI agents with lower token use, memory and resource cost.
A local-first Markdown memory workspace that lets AI agents store, search, and consolidate long-term knowledge as editable files.