Skip to content
Menu

Product

Solutions

Integrations

Developers

Language

v2.4.0 is outSee what changed

Switch agents. Keep the context.

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.

  • Open source, MIT
  • One binary, plain markdown
  • Works with no API key

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.

Change everything. Keep what you know.

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.

claude
> move refresh into middleware● Edit auth/middleware.rs● cargo test: 2 failed> /exit
codex
Handoff from Claude Code✓ Refresh moved to middleware✗ Cookie-only broke mobile? Rate limit on /refresh> fix the two failing tests
How handoffs work

Switch machines.

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.

desktop, office
~/app $ ai-memory run claude● 41 observations captured● session saved to the wiki
notebook, on the train
~/app $ ai-memory run claude> where did we leave off?You were rate limiting /refresh.Two tests in auth_spec still fail.
One server, many machines

Share it with your team.

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.

this week
A
Ana fixed the flaky CI cache
R
Ravi chose advisory locks over a queue
M
Mei wrote the deploy runbook
Lia, first day
> catch me up on this project3 decisions, 1 runbook and 2 openquestions from the last two weeks.Start at decisions/advisory-locks
ai-memory for teams

It writes its own wiki.

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.

captured
promptEdit auth.rscargo test failedgit rebase mainRead schema.sqlpromptBash: curl /refreshsession end
wiki/
├─ decisions/session-tokens.md├─ gotchas/mobile-cookie-jar.md├─ procedures/deploy.md├─ sessions/2026-09-18-auth.md└─ index.md
See what is stored

What happens while you work.

All four steps run in the background, and the default path makes zero LLM calls.

Diagram: terminals emit observations that are consolidated into markdown pages, searched through fused ranking, and handed off to the next agent. Underneath it all sits a git-backed wiki of plain markdown files.
  1. 1

    Capture

    Lifecycle hooks record prompts, tool calls and session boundaries. Secrets are stripped before anything is stored.

  2. 2

    Consolidate

    When a session ends, its observations become a readable markdown page in the project’s wiki.

  3. 3

    Recall

    The next session gets a short brief and can search everything: full text, entities, links and vectors, fused into one ranking.

  4. 4

    Hand off

    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.

Read the architecture

Old memory shrinks, and what you use stays.

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.

Diagram: reading a page reinforces its retention score. The forget-sweep finds cold pages, which are evicted by default or, when enabled, compacted or merged into one survivor. Compacted and merged pages can be restored from git history.

How memory ages

Coming from another tool?

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 win

Per-laptop MEMORY.md. It needs: Claude Code, One machine.

What stays the same

The "remember my project" convenience, in markdown.

What you gain

  • The same memory in Codex, Cursor, Gemini CLI and 20 more
  • Synced across your machines
  • Shared with your team
  • Real search, and capture of what the tools actually did

Up and running in three commands.

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.

one machine
# 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

Built in the open, by a lot of people.

  • akitaonrails
  • djalmajr
  • samirhvbr
  • lucasliet
  • wblech
  • rthiago
  • matheus-rodrigues00
  • lhzapata
  • gabrielscharb
  • pablowinck
  • aguirreSL
  • evanmaranzano
  • kevin9327
  • gb

New here? The contributing page shows where bug reports, pull requests and new agent integrations go.

Give your agents a memory today.

Free and open source under the MIT license. You need no account and no API key.