What Is ai-memory?
ai-memory is one of the best AI Coding Agent Memory Tools for developers and platform teams using Claude Code, Codex, Cursor, and other MCP-compatible clients. It is built by akitaonrails and captures prompts, tool calls, and session boundaries into a persistent, shared wiki; the project shows a v0.2 milestone-complete status and supports Rust 1.95+ with MIT licensing. The point is simple: stop re-teaching architecture every time an agent restarts.
ai-memory is not a chat log viewer. It rewrites raw observations into coherent project pages, then prepends the relevant handoff to the next session so the agent starts with context instead of guessing.
Quick Overview
| Attribute | Details |
|---|---|
| Type | AI Coding Agent Memory Tools |
| Best For | Developers and platform teams using Claude Code, Codex, Cursor, Gemini CLI, or other MCP-compatible coding agents |
| Language/Stack | Rust, SQLite/FTS5, axum, MCP, Markdown |
| License | MIT |
| GitHub Stars | N/A as of Feb 2026 |
| Pricing | Open-Source |
| Last Release | v0.2 milestones complete — date not listed on page |
Who Should Use ai-memory?
- Indie hackers shipping across multiple agent UIs who want the same project memory in Claude Code, Codex, and Cursor without copy-pasting context.
- Consultancies and agencies that juggle client work, because ai-memory isolates each workspace and project by stable IDs instead of brittle folder names.
- Platform teams and CTOs running agent workflows on a LAN or homelab, where a shared server with bearer-token auth is easier to govern than per-laptop state.
- Developers inheriting legacy repos who need
git log, README files, and docs condensed into seed pages before the first agent prompt.
Not ideal for:
- Teams that want a hosted SaaS with a browser-first onboarding flow and no local/server setup.
- One-off prompt sessions where long-term memory is unnecessary and a plain clipboard is enough.
- Workflows that require deep semantic retrieval over embeddings only; ai-memory can run in zero-LLM mode, but its design is wiki-first rather than vector-store-first.
Key Features of ai-memory
- Cross-agent session handoff — ai-memory prepends a typed "where you left off" block when a new agent starts in the same directory. That means Claude Code can hand off to Codex hours later without rebuilding the architecture from scratch.
- Git-backed markdown wiki — pages live as plain Markdown in a git repo, so you get
grep,git log, Obsidian compatibility, and normal backup tooling such asrsync. This is the right failure mode for engineers who distrust opaque databases. - Per-project isolation by design — projects are stored under
<wiki_root>/<workspace_id>/<project_id>/...using stable UUIDs, with a.ai-memory.tomlmarker file for overrides. That keeps mono-repos, personal work, and client work from colliding. - MCP plus lifecycle hooks — the tool supports MCP config and lifecycle hooks for Claude Code, Codex, Cursor, Gemini CLI, OpenCode, OpenClaw, and more. The hooks are the automation layer; the server remains the source of truth.
- FTS5 search and
/webUI — the built-in read-only web interface gives you project trees, Markdown rendering, dark mode, and FTS5 search on the same axum server that serves MCP. For auditability, OpenTrace pairs well when you need a separate action trail. - Multi-provider LLM support — ai-memory works with Anthropic, OpenAI, OpenAI OAuth/Codex, GitHub Copilot, Gemini, and OpenAI-compatible endpoints, plus OpenAI, Voyage, and Google Gemini embeddings. You can keep the memory layer stable even if providers change.
- Zero-LLM mode — the system still works with rule-based summarization and FTS5 search when you do not want model calls in the loop. That is useful for air-gapped setups, cost control, or strict vendor policies.
ai-memory vs Alternatives
| Tool | Best For | Key Differentiator | Pricing |
|---|---|---|---|
| ai-memory | Persistent long-term memory for coding agents | Git-backed wiki, cross-agent handoff, per-project isolation, and MCP hooks | Open-Source |
| Claude Context Mode | Claude-centric context management | Better fit if your workflow stays inside Claude rather than spanning multiple agents | Varies |
| Brainstorm MCP | Structured idea generation and planning | Better for brainstorming and prompt shaping than durable project memory | Varies |
| OpenSwarm | Coordinated agent workflows | Better if you need multi-agent orchestration instead of a wiki-based memory layer | Open-Source |
Pick Claude Context Mode when your only runtime is Claude and you want a narrower context-management layer. Pick Brainstorm MCP when the problem is ideation, not long-lived project memory.
Choose OpenSwarm when the main requirement is agent coordination across tasks or roles. Choose ai-memory when the main requirement is durable, inspectable project memory that survives client switches, restarts, and handoffs.
How ai-memory Works
ai-memory uses a server-first architecture with thin CLI clients. The server stores project state, generated wiki pages, and search indexes, while the CLI only sends HTTP requests such as init, bootstrap, search, purge-project, and install-hooks.
The design philosophy is closer to a source-of-truth knowledge base than a raw transcript archive. Session hooks capture observations, the session-end pipeline rewrites them into cleaner pages, and the next agent receives a concise handoff instead of a pile of raw logs; this is why the tool is useful for long-running codebases and multi-agent workflows.
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
ai-memory install-mcp --client claude-code --apply
ai-memory install-hooks --agent claude-code --apply
The commands above initialize the local data directory, start the user service, and wire Claude Code into the memory server. After that, new sessions automatically pick up the handoff block, and the /web UI can inspect the resulting wiki pages.
Pros and Cons of ai-memory
Pros:
- Cross-agent continuity means the next tool can inherit prior decisions without manual copy/paste.
- Plain Markdown storage keeps everything inspectable with standard developer tools.
- FTS5 search gives fast local lookup over the consolidated wiki pages.
- Per-project routing prevents collisions in mono-repos, consultancies, and shared machines.
- Server and client separation makes backups, auth, and multi-machine use easier to reason about.
- Zero-LLM mode reduces cost and still preserves useful memory behavior.
Cons:
- Requires local setup for the server, hooks, or container wrapper; this is not a zero-config SaaS.
- Native Windows is experimental, so Windows users should prefer WSL2 for now.
- Best results depend on hook coverage, which means unsupported clients or misconfigured hooks reduce usefulness.
- The wiki model is opinionated, so teams expecting raw transcript replay may need to adjust their workflow.
- Search is local and repository-shaped, so it is not a replacement for a general enterprise knowledge graph.
Getting Started with ai-memory
The fastest path is to initialize the data directory, start the service, and attach one agent client. If you are on Arch Linux, the native package path is the shortest route; if you are on Docker, the wrapper keeps the host footprint tiny.
# create local state and initialize the server
mkdir -p ~/.config/ai-memory ~/.local/share/ai-memory
ai-memory --data-dir ~/.local/share/ai-memory \
--config ~/.config/ai-memory/config.toml init
# enable the daemon and wire the agent
systemctl --user enable --now ai-memory.service
ai-memory install-mcp --client claude-code --apply
ai-memory install-hooks --agent claude-code --apply
# bootstrap an existing repository
cd /path/to/project
ai-memory bootstrap
After the first run, ai-memory scans the repository, seeds project pages, and starts capturing future prompts and tool calls. If you need to expose the server beyond localhost, add bearer-token auth before opening it to a LAN or homelab network.
Verdict
aio-memory is the strongest option for persistent coding-agent memory when you work across multiple CLIs, restart sessions often, or need a shared audit trail with plain Markdown and git history. Its biggest strength is cross-agent handoff without re-explaining the codebase; its main caveat is the setup cost and the experimental native Windows path. Use it if you want durable context, not just another prompt helper.


