What is Agent memory?
Agent memory is stored information that an agent writes during one session and reads back in later sessions, so it can continue earlier work without holding everything in its context window.
Also written: AI agent memory, long-term agent memory, memory tool
Explained
There is no single standard for agent memory, so this entry describes one concrete design: Anthropic's memory tool for the Claude API.
Anthropic's memory tool gives Claude a directory of files it can write to and read from, so what it learns in one conversation can be picked up in a later one. Claude can create, view, edit, and delete those files. The docs describe this as just-in-time retrieval: instead of loading everything up front, the agent notes what it learns in files and reads them when needed, so the context window stays on the task at hand.
The tool runs client-side. Claude only requests file operations under a /memories path, and the developer's application carries them out against storage it controls, such as a per-user directory or database keys. The commands are view, create, str_replace, insert, delete and rename. When the tool is enabled, the API adds instructions telling Claude to check its memory directory first and to assume its context may be reset at any moment.
The page puts safety work on the developer. Handlers must reject paths outside /memories to prevent directory traversal. It also advises capping file sizes, expiring old files and stripping sensitive data before anything is written.
Primary source
Memory tool (platform.claude.com), read Oct 26, 2026
This entry paraphrases the page above. Sources change; check it for the current wording.
Listings that use this
The 5 top-ranked listings tagged for Agent memory. Rank weighs adoption, freshness, documentation and publisher identity; how we rank and grade. Money never changes the order.
- 0.888score
caveman-compress
JuliusBrussee
Compress a memory file such as CLAUDE.md or a todo list into caveman format to save input tokens, keeping a readable backup.
SkillAFreshness: A★ 114.8KClaude Code +9 - 0.879score
mem-search
thedotmack
Use this when the user asks to search memory, "did we already solve this?", "how did we do X last time?", or wants work from previous sessions.
SkillAFreshness: A★ 102.8KClaude Code +9 - 0.879score
how-it-works
thedotmack
Explain how claude-mem captures observations, when memory injection kicks in, and where data lives.
SkillAFreshness: A★ 102.8KClaude Code +9 - 0.869score
coding-prefs
langchain-aiOfficial
Read the user's coding preferences from /memory/coding-prefs.md before making non-trivial style decisions, and append new preferences when the user gives…
SkillAFreshness: A★ 30.6KClaude Code +9 - 0.869score
remember
langchain-aiOfficial
Review the current conversation and capture valuable knowledge — best practices, coding conventions, architecture decisions, workflows, and user feedback —…
SkillAFreshness: A★ 30.6KClaude Code +9
Related
Cite this page
What is Agent memory?. Agent Mart. https://agentmart.dev/glossary/agent-memory (last updated 2026-10-26)
Written Oct 26, 2026, updated Oct 26, 2026. All glossary terms