AI GLOSSARY · AGENTS AND AGENT TOOLING
Agent memory
Definition
Agent memory is information retained for use across turns or sessions. Applications may store files, conversation state or database records and retrieve relevant material into context. This application-managed state is distinct from knowledge learned in model parameters.
Also called: AI agent memory, memory in AI agents, long-term memory AI agent, agent long-term memory, Claude Code memory.
In plain language
An AI agent does not remember yesterday by default. Each session in Claude Code, for example, begins with a fresh context window, which is the amount of text the model can consider at once. In Claude Code's documented file mechanisms, memory can include notes loaded at startup or read when needed, such as a file of project rules you write, or notes the agent writes about your corrections. Think of leaving a sticky note on the door for your future self. Other agent systems can use databases and retrieval-backed memory. A limit of the file-note approach is that notes are context the model reads, so it may not follow them, and long notes crowd out room for the actual work. Never store secrets in them.
Technical definition
Anthropic's Claude Code documentation describes two mechanisms. CLAUDE.md files hold instructions you write and load into every session. Auto memory holds notes Claude writes itself; when it is on, the first 200 lines or 25KB of a MEMORY.md file, whichever comes first, load at session start. Separate topic files are read on demand, not all loaded at startup. The documentation says both are treated as context, not enforced configuration, and recommends a PreToolUse hook to block an action regardless of what Claude decides. Anthropic's Building effective agents post describes memory as one of three augmentations, with retrieval and tools, of the augmented LLM, in which the model can decide what information to retain.
Worked examples in this catalogue
Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.
Skill by Skill Almanac · Illustrative, not executed
session-handoff-notes 63/100 · grade CScored · Method v0.2 · How we score
- What you see
- A handoff note that the next coding-agent session can act on, checked for evidence, paths and vague items.
- Why it exercises the concept
- It is memory written by hand for one purpose: carrying the state of unfinished work from one session to the next.
Skill by Skill Almanac · Illustrative, not executed
agent-instruction-files 46/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- Instruction files where every line is project-specific, verified against the repo, and worth loading on every session.
- Why it exercises the concept
- Instruction files such as CLAUDE.md are the main kind of persistent memory in Claude Code, and this skill addresses what belongs in them.
Skill by Julius Brussee · Illustrative, not executed
caveman-compress 25/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- Rewrites memory and instruction files in compact language to save input tokens.
- Why it exercises the concept
- This pinned skill proposes compact rewrites of natural-language memory files, sends the full file text to its configured model provider and keeps an out-of-tree backup. Review meaning and instructions after compression; token savings and faithful preservation are not guaranteed here. Illustrative, not executed.
Coding tool · Illustrative, not executed
Claude Code
- What to try
/memory- What you see
- Claude Code lets you browse and open memory files from within a session and toggle auto memory.
- Why it exercises the concept
- It is the direct way to see what the agent will carry into its next session.
How it shows up when you use agents
The Claude Code mechanisms described here use files. You write instructions in a CLAUDE.md file, and with auto memory on, Claude also saves notes of its own. Applicable instruction files and the bounded MEMORY.md index can enter the context window at startup; topic files are read on demand. Loading also depends on scope and settings. Retained text competes with the task for space. Anthropic's documentation advises keeping each CLAUDE.md file short and specific, because longer files consume more context and reduce adherence.
What breaks when it is misunderstood:
- Expecting recall. People assume the agent "learned" something permanently, when recall instead depends on supplied context, accessible stores/tools and the model's previously learned parameters. Saving a note does not by itself retrain the model.
- Treating notes as rules. The documentation says these files are context, not enforced configuration. To block an action every time, use a hook or a permission rule.
- Stale notes. An old note about a file layout can mislead the next session.
Next actions: run /memory to see what is loaded, trim lines that are not project-specific, and write a handoff note when you stop mid-task. For the design of what to load and when, see context engineering. Do not put credentials in memory files.
Common confusions
- Agent memory versus the context window. The context window is what the model sees right now. Memory is what is stored so it can be loaded into a later window.
- Agent memory versus retrieval. Memory can itself use retrieval: LangGraph documents stores with semantic search and filtering. File-index loading is one mechanism, while retrieval-augmented generation can fetch relevant external passages, including stored memories.
- CLAUDE.md versus auto memory. You write the first; Claude writes the second.
- Myth. The model is retrained by your corrections. Memory changes what is in the prompt, not the model's weights.
Related terms
Show all 14 related terms
Terms that mention Agent memory
Guides that mention Agent memory
More in Agents and agent tooling
Sources
- How Claude remembers your project, Anthropic (Claude Code Docs) (accessed 2026-11-23)
- Building effective agents, Anthropic (accessed 2026-11-23)
- Memory overview: stores, retrieval and thread state, LangChain documentation (accessed 2026-11-25)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.
Review record
Last verified
Drafted by Claude (original draft); OpenAI Codex (bounded factual repairs); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .
Change log (5)
- : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
- : First version.
- : Verifier pass: used docs wording on hooks.
- : Bounded source repairs: Scoped Claude file mechanisms, exact startup limits and on-demand notes; acknowledged retrieval-backed stores and learned parameters; bounded compression contract. Pending independent re-review.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.