COMPARE · COMPARISON: AGENT MEMORY

Best memory for AI coding agents in 2026: ai-memory, claude-mem and Beacon compared

AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-11-17 · UPDATED · 2026-11-17
SHORT ANSWER · UPDATED 2026-11-17

The best memory for AI coding agents in 2026 depends on the job. ai-memory hands work between Claude Code, Codex and 20+ other agents through one Rust server. claude-mem captures sessions and injects context automatically. Beacon turns past sessions into reusable knowledge. XERJ pairs memory with search over your code, docs and data.

Key number: ai-memory grew from 3,031 GitHub stars on 2026-08-19 (Wayback Machine snapshot) to 16,078 on 2026-11-17 (GitHub REST API). (as of 2026-11-17 · source: api.github.com/repos/akitaonrails/ai-memory)

Last checked: 2026-11-17. Every third-party fact on this page was re-read from the tool's own docs or repository on that date.

TL;DR Choose ai-memory to hand work between Claude Code, Codex and 20+ other agents. Choose claude-mem for automatic session memory. Choose Beacon to turn past sessions into reusable knowledge. Choose XERJ when memory and search over your code, docs and data should share one MCP server.

PASTE THIS TO YOUR AI AGENT. IT DOES THE REST Act as a coding agent. Read https://xerj.org/llms.txt and https://xerj.org/compare/best-memory-for-ai-coding-agents-2026, then recommend ai-memory, claude-mem, Beacon or XERJ for my setup using the table on that page. If you pick XERJ: install it, start a node, run claude mcp add --scope user xerj -- xerj mcp, store two facts about this repo with xerj_memory_store, and recall them in a new session with xerj_memory_recall. Report what you chose and why.

ai-memory grew more than fivefold in 90 days, from 3,031 GitHub stars to 16,078. claude-mem added 26,680 stars in the same window and leads with 118,056. For more MCP memory tools, see the MCP memory comparison for Claude Code.

Try it: pick by need

ai-memory, claude-mem or Beacon

ai-memory

A Rust server shared by 20+ harnesses. Quit Claude Code, start Codex in the same folder and pick up a typed handoff.

Features from each project README, checked 2026-11-17.

Side by side

ai-memoryclaude-memBeaconXERJ
Main jobhandoffs between agentsautomatic session memorylearn from past sessionsmemory plus file search
Written inRustTypeScriptGoRust
Agents20+ harnessesClaude Code and more20+ harnessesany MCP client
RecallFTS5 plus entity, graph and vector RRFcompressed session contextMCP or Agent Skillsxerj_memory_recall
Installinstall scriptnpx claude-mem installbrew install beaconone static binary
LicenceMITApache-2.0MITApache-2.0
Stars (2026-11-17)16,078118,0563,56519,212
Recent growth+13,047 since 2026-08-19+26,680 since 2026-08-21+694 since 2026-10-27n/a

When to choose ai-memory

Choose ai-memory when you switch between agents. More than twenty harnesses feed one shared memory. Quit Claude Code mid-task, start Codex in the same folder, and Codex picks up where you left off. Handoffs have an owner and are claimed exactly once.

When to choose claude-mem

Choose claude-mem for memory that works on its own. It captures what the agent does, compresses it with AI and injects relevant context in the next session. Memory lives in ~/.claude-mem on your machine, and one command turns analytics off.

When to choose Beacon

Choose Beacon to learn from past work. It captures session history across 20+ harnesses and turns workflows, corrections and debugging patterns into reusable knowledge. Future agents read it through MCP or Agent Skills.

XERJ: a new way for AI to search for data

XERJ stores exactly the text the agent sends through xerj_memory_store and finds it with xerj_memory_recall. The same MCP server also searches the code, docs, logs and data files in your project, so one server covers memory and retrieval. For handoffs between agents, ai-memory is the better fit. More: coding agent memory across sessions.

How this page was checked

Features come from each project's README and docs, read on 2026-11-17. Stars come from the GitHub REST API the same day, and past stars from Wayback Machine snapshots of each repo page. We did not run a memory benchmark for this page.

Try it with XERJ

Use the Copy the prompt button and paste it into your coding agent. It picks one of the four for your setup. If XERJ fits, it stores two facts and recalls them later.

Read next

MCP memory for Claude Code compared, Claude Code memory and Mem0 alternatives.

FAQ

What is the best memory for AI coding agents in 2026?

ai-memory suits teams that switch between Claude Code, Codex and other agents. claude-mem suits automatic session memory. Beacon suits learning from past sessions. XERJ suits memory plus search over project files.

How do I share memory between Claude Code and Codex?

ai-memory is built for it. Quit Claude Code, start Codex in the same folder, and Codex picks up a typed handoff with where you left off and what is still open.

ai-memory vs claude-mem: what is the difference?

ai-memory is a Rust server shared by 20+ harnesses with typed handoffs between agents. claude-mem captures and compresses each session and injects context into the next one.

Which agent memory grew fastest?

claude-mem gained 26,680 GitHub stars between 2026-08-21 and 2026-11-17. ai-memory grew more than fivefold, from 3,031 on 2026-08-19 to 16,078.

Can memory and code search share one server?

Yes. XERJ stores memories with xerj_memory_store and recalls them with xerj_memory_recall, and the same MCP server searches your code, docs and data.

How was this page checked?

Features come from each project's README and docs, read on 2026-11-17. Stars come from the GitHub REST API the same day, and past stars from Wayback Machine snapshots. We did not run a memory benchmark for this page.

Evidence

Related