---
title: "The components of agent memory"
description: "Agent memory works best as a layered hierarchy: transcripts as an event log, notes Claude writes in-session, richer representations such as wikis, and context injected into every session, with an offline \"dreaming\" pass that reflects on transcripts to correct and reorganize memory."
url: "https://swe.quest/articles/the-components-of-agent-memory-6ad54605491f6c6e"
canonical: "https://www.anthropic.com/research/components-of-agent-memory"
source: "Anthropic Engineering"
published: "2026-11-06"
difficulty: "medium"
kind: "Research"
reading_minutes: 21
tags: ["ai-agents","llms","evals"]
---

# The components of agent memory

A post on [Anthropic Engineering](https://swe.quest/sources/anthropic.md), published 2026-11-06, 21 min read, Research. Original: [https://www.anthropic.com/research/components-of-agent-memory](https://www.anthropic.com/research/components-of-agent-memory)

## Summary

Agent memory works best as a layered hierarchy: transcripts as an event log, notes Claude writes in-session, richer representations such as wikis, and context injected into every session, with an offline "dreaming" pass that reflects on transcripts to correct and reorganize memory. On a CL-Bench database task, newer Claude models closed the learning loop by recording validated rules, raising mean reward from about 0.56–0.66 to about 0.83. In Pokémon Red, a model that kept 10 focused files earned four badges, while one that logged everything into 413 files earned one. Stronger models do better when told what memory is for rather than given fixed rules, and dreaming caught a wrong navigation note that otherwise trapped the agent in a loop.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)

## Prerequisites

- LLM agents ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- context windows

## Keywords

Claude, CL-Bench, Claude Managed Agents, sleep-time compute, Pokémon Red, dreaming

## Related posts

- [Give Your Coding Agents a Memory You Own](https://swe.quest/articles/give-your-coding-agents-a-memory-you-own-a4b8ff1b9b62d4a5.md): Hugging Face · 2026-09-03 · Medium · 9 min read · AI agents, AI for coding, RAG & retrieval, Search, Developer tools
  funes is an open-source, single-binary memory layer that indexes the session traces of coding agents (Claude Code, Codex, pi, Hermes) so any agent can recall past decisions and rationale with exact provenance.
- [ReasoningBank: Enabling agents to learn from experience](https://swe.quest/articles/reasoningbank-enabling-agents-to-learn-from-experience-c24d005f6ce31b05.md): Google Research · 2026-04-21 · Hard · 5 min read · AI agents, LLMs, Evaluation
  ReasoningBank is an agent memory framework that distills generalizable reasoning strategies from both successful and failed trajectories, stored as structured items (title, description, content) in a closed loop of retrieval, LLM-as-a-judge self-assessment, extraction and append-only consolidation.
- [Managing context in long-run agentic applications](https://swe.quest/articles/managing-context-in-long-run-agentic-applications-295891442705f8fe.md): Slack Engineering · 2026-04-13 · Medium · 13 min read · AI agents, LLMs, Threat detection, System design
  Slack's multi-agent security investigation service keeps long-running agent teams coherent through three context channels rather than accumulating full message history.
- [How Much Memory Does Your Agent Actually Need?](https://swe.quest/articles/how-much-memory-does-your-agent-actually-need-90fd1750802569c1.md): Hugging Face · 2026-08-18 · Medium · 9 min read · AI agents, Evaluation, LLMs, RAG & retrieval
  The right amount of self-distilled agent memory depends on model capability: on AppWorld across eight models, strong models with headroom gain most from injecting the full guideline set (DeepSeek-V3.2 +9.5pp TGC, +16.1pp SGC), weaker models do best with a compact high-confidence core plus per-task retrieved guidelines (gpt-oss-120b +16.1pp TGC), and saturated models like GLM-5 show no gain.
- [How to build a retrieval system for agents](https://swe.quest/articles/how-to-build-a-retrieval-system-for-agents-08b9b297721895b1.md): Turso · 2026-02-20 · Medium · 5 min read · AI agents, Vector search, SQLite, AI for coding, RAG & retrieval
  Memelord is a fully local memory system for coding agents that keeps a per-project SQLite database (via Turso) of corrections, insights and user-requested memories, embedded with all-MiniLM-L6-v2 and retrieved by cosine vector search at task start.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
