Free checklist

Memory

11 curated long-term memory and context tools for AI agents: Mem0, Letta, Zep/Graphiti, LangMem, Cognee, Chroma and more.

Best memory and evaluation tools for AI agents →

Agent memory is information an agent keeps beyond a single prompt or session so it can pick up where it left off. Anthropic's engineering team describes context as the set of tokens included when sampling from a language model, and says it is a finite resource: as the number of tokens grows, the model's ability to recall information from it decreases. Memory is one way to deal with that limit, by keeping useful information outside the context window and pulling it back in when it is needed.

The tools below take several different approaches. Some write plain files that the agent reads back later, like Anthropic's memory tool, which stores information in a directory of memory files. Some extract facts about users or agents and retrieve them across sessions, like Mem0 and LangMem. Some build knowledge graphs, like Zep / Graphiti, Cognee and the MCP Memory server. Letta builds stateful agents with self-editing memory, and Chroma is an open-source embedding database commonly used for retrieval memory.

You need memory when an agent should continue work across sessions, remember user preferences or past decisions, or run long tasks where the context window would otherwise fill up. If your agent only handles short, independent requests, you may not need any of it.

Memory layer that extracts and retrieves user/agent facts across sessions.

MemoryOpen sourceSource →

Temporal knowledge graph for agent memory that tracks how facts change over time.

MemoryPricing listedSource →

LangChain library for long-term memory extraction and prompt optimization in agents.

MemoryOpen sourceSource →

Builds knowledge graphs plus vectors from your data as agent memory.

MemoryOpen sourceSource →

Open-source embedding database commonly used for agent retrieval memory.

MemoryOpen sourceSource →

Git forge built for agents: the open-source (MIT) Entire CLI captures Claude Code, Codex, Gemini and other agent sessions alongside each commit, so prompts and decisions stay searchable and a second agent can pick up the work. Hosting, session storage, memory and the CLI are free at sign-up; agent review runs are pay-as-you-go at model rates after a one-time credit.

MemoryOpen sourceopen-source-clisession-capturehandoffgitSource →

Open-source (Apache-2.0) persistent memory for coding agents: captures tool-use observations, compresses them into summaries and injects relevant context into later sessions, with search. Works with Claude Code, Codex, OpenCode, T3 Code and more. Free to self-run with the local observer; the optional hosted observer starts with a 30-day free trial.

MemoryOpen sourceopen-sourceclaude-codesession-memorycontextSource →

How to choose Memory tools

Memory FAQ

How is memory different from a bigger context window?

Anthropic's engineering team says context windows of all sizes are likely to suffer from context pollution and relevance problems, and that context should be treated as a finite resource with diminishing returns. Memory stores information outside the window and reads back only what is relevant, so the active context stays focused.

What is compaction, and is it the same as memory?

No. Compaction means summarizing a conversation that is nearing the context limit and starting a new window with the summary. Anthropic's docs say the two work together: compaction keeps the active context small, while memory preserves the information that must survive summarization.

Can an agent have memory without a special library?

Yes. Anthropic describes structured note-taking, where the agent writes notes to storage outside the context window, for example a to-do list or a NOTES.md file, and reads them back later. Anthropic's memory tool packages the same idea as a file directory the model can view, create, edit and delete.

Is it safe to store sensitive information in agent memory?

Treat it as data you are responsible for. Anthropic's memory tool docs say Claude usually refuses to write sensitive information to memory files, but recommend adding your own validation to strip it, capping file sizes, and restricting every operation to the memory directory.

Further reading: Effective context engineering for AI agents; Anthropic memory tool docs.

Get new agent tools and tips as they're added

Follow @AgentstackDaily on X for new tools and copy-paste tips. Free.