Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Anthropic Engineering 21 min read Research mediumAdept

The components of agent memory

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.

Assumes: LLM agentscontext windows

Related posts

  • Give Your Coding Agents a Memory You Own

    Hugging Face mediumAdept

    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. A deterministic pipeline parses traces into a common turn-and-block shape, chunks and embeds them locally into an append-only Lance dataset, and answers queries with hybrid vector+BM25 search, rank fusion, cross-encoder reranking, recency reweighting and neighbor-chunk expansion. Memories can be published to a private Hugging Face dataset with secret redaction, letting them follow you across machines, agents and teammates. On a handoff-vs-recall benchmark, recall was 4-8x cheaper than a written handoff, while compaction failed on one task because its summary flattened key findings.

  • ReasoningBank: Enabling agents to learn from experience

    Google Research hardMaster

    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. Memory-aware test-time scaling (MaTTS) feeds parallel (self-contrast across k trajectories) or sequential (iterative refinement) exploration back into memory. With Gemini-2.5-Flash and ReAct, it beat a memory-free baseline by 8.3% on WebArena and 4.6% on SWE-Bench-Verified, saved about 3 steps per task on SWE-Bench, and MaTTS (k=5) added another 3% success on WebArena. Learning from failures yields preventative rules, and memories evolve from simple checklists into compositional strategies over time.

  • Managing context in long-run agentic applications

    Slack Engineering mediumAdept

    Slack's multi-agent security investigation service keeps long-running agent teams coherent through three context channels rather than accumulating full message history. The Director's Journal is structured working memory with typed entries (decision, observation, finding, question, action, hypothesis) and is shared with every agent. The Critic's Review uses tools to inspect Experts' cited tool calls and results, then scores findings on a five-level credibility rubric. The Critic's Timeline consolidates credible findings chronologically, de-duplicates them and flags the top three gaps. Across 170,000 reviewed findings, just over a quarter scored below plausible, which is why the system uses a stronger model for the Critic and keeps its review tasks narrowly scoped.

  • How Much Memory Does Your Agent Actually Need?

    Hugging Face mediumAdept

    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. Curated retrieval can be both the most accurate and cheapest option, adding only 5% tokens versus 51–78% for full injection, and prompt caching of a stable guideline prefix keeps the full set affordable in production. ALTK-Evolve distills guidelines from successful and failed trajectories without weight updates or human annotation. Planned next steps include a learned guideline selector to replace cosine-similarity ranking.

  • How to build a retrieval system for agents

    Turso mediumAdept

    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. Each memory carries a weight updated by exponential moving average from the agent's 0-3 usefulness ratings, plus time decay for unused memories, and memories flagged as wrong are deleted immediately. Integration with Claude Code uses an MCP server and lifecycle hooks, and a TypeScript SDK accepts a bring-your-own embedding function for custom agents. The argument is that retrieval beats dumping lessons into .md system prompts, which wastes the finite context window.

The quest for software engineering knowledge.

Look:
Layout: