# Agent Memory Architectures

Canonical URL: https://menfem.com/kb/harnesses/concepts/agent-memory-architectures
Knowledge base topic: [Harnesses & Agent Systems](https://menfem.com/kb/harnesses)
Frontier status: active
Tags: memory, agent-infrastructure, retrieval-augmented, knowledge-management

---

Memory systems transform LLM-based agents from stateless text generators into genuinely adaptive systems that persist and recall information across interactions. Du formalizes agent memory as a **write-manage-read loop** tightly coupled with perception and action — a framework that organizes the full design space through a three-dimensional taxonomy spanning temporal scope, representational substrate, and control policy.

Five mechanism families implement this loop:

1. **Context-resident compression** — Summarizing and compressing interaction history to fit within context windows. Progressive distillation of episodic memories into compact representations, trading information fidelity against context budget.

2. **Retrieval-augmented stores** — External memory (vector databases, knowledge graphs) accessed via embedding-based similarity search. Hybrid retrieval combines semantic similarity with temporal recency and importance scoring.

3. **Reflective self-improvement** — Agents generating insights and lessons learned from past experiences. Self-critique mechanisms identify errors and update behavioral policies. Meta-cognitive processes distill episodic memories into strategic knowledge.

4. **Hierarchical virtual context** — Multi-level hierarchies mimicking human short-term and long-term memory. Working memory for active reasoning, episodic memory for experiences, semantic memory for facts, with attention-based access across levels.

5. **Policy-learned management** — Learned policies for deciding what to store, when to consolidate, and how to retrieve. Reinforcement learning optimizes memory management strategies that evolve with agent experience.

## Memory as a Versioned Platform Primitive (Jul 2026)

Agent memory crossed from research architecture into **billable, versioned API surface** during 2026. Anthropic's first-party Claude Platform changelog records a breaking beta-header migration on memory-store endpoints: `agent-memory-2026-07-22` **replaces** `managed-agents-2026-04-01` (sending both returns a 400), and it tightens listing semantics in ways that constrain how a memory store may be read:

- Results return in a **stable server-defined order**; `order_by` / `order` parameters are now ignored.
- `depth` accepts only `0`, `1`, or omission — other values are a 400.
- `path_prefix` must end in `/` and matches **whole path segments, not substrings**.
- Page cursors issued without the header are invalidated under it.
- All major SDKs (Python, TypeScript, Go, Java, Ruby, PHP, C#, CLI) send the new header by default; the prior behaviour retires 2026-07-22.

The design direction is legible from the constraints: hierarchical, path-addressed memory with **shallow** reads (depth 0 or 1) and **segment-exact** prefixes, ordered by the server rather than the caller. That is a store optimized for bounded, predictable retrieval cost — not for arbitrary client-side query. It is a commercial-infrastructure answer to the same write-manage-read problem the surveys formalize, and it constrains which of the five mechanism families a platform customer can actually implement on top.

Read alongside [Agent Harness Evolution](./agent-harness-evolution.md): memory is the harness component with the clearest productization path, shipping ahead of the evidence that automated harness design produces transferable gains.

*This source is authoritative for **what shipped**, not for how well it works — it is procedural API documentation, not a benchmark disclosure.*

## A-MEM and Zettelkasten-Inspired Memory

A-MEM (Xu et al., NeurIPS 2025) offers a concrete implementation of agentic memory inspired by the **Zettelkasten method**. When new information arrives, the agent constructs a structured note with core content, contextual description, keywords/tags, and metadata. It then performs retrospective analysis — scanning existing memories for semantic connections and establishing bidirectional links. The system actively evolves: new information can modify contextual representations of existing memories, contradictory information triggers reconciliation, and frequently accessed memories gain higher retrieval priority.

## Key Claims

- **Write-manage-read loop is the fundamental memory abstraction** — All agent memory systems can be understood as implementations of this three-phase cycle coupled with perception and action. *Evidence: strong* ([Memory for Autonomous LLM Agents](../../raw/agent-memory-mechanisms-survey.md))
- **Five mechanism families cover the design space** — Context-resident compression, retrieval-augmented stores, reflective self-improvement, hierarchical virtual context, and policy-learned management. *Evidence: strong* ([Memory for Autonomous LLM Agents](../../raw/agent-memory-mechanisms-survey.md))
- **Zettelkasten-inspired memory outperforms fixed-structure baselines** — A-MEM with dynamic note construction and linking beats flat, hierarchical, and summary-based memory on multi-session tasks across six foundation models. *Evidence: strong* ([A-MEM: Agentic Memory for LLM Agents](../../raw/a-mem-agentic-memory.md))
- **Evaluation is shifting from static recall to multi-session agentic tests** — Memory benchmarks now measure knowledge integration, temporal reasoning, and inference chains across sessions, not just retrieval accuracy. *Evidence: strong* ([Memory for Autonomous LLM Agents](../../raw/agent-memory-mechanisms-survey.md))
- **Agent memory now ships as a versioned, constrained platform primitive** — Anthropic's `agent-memory-2026-07-22` beta header replaced `managed-agents-2026-04-01` on memory-store endpoints, fixing server-defined ordering, restricting `depth` to 0/1, and requiring segment-exact `path_prefix` matching. *Evidence: strong for what shipped (first-party changelog); silent on efficacy* ([Anthropic Platform Release Notes](../../raw/anthropic-claude-platform-updates-2026-07.md))
- **Sessions can override harness config without touching the base agent** — Managed Agents sessions can override model, system prompt, tools, MCP servers, and skills per-session, making the memory-plus-scaffold bundle a runtime-configurable object. *Evidence: strong (first-party changelog)* ([Anthropic Platform Release Notes](../../raw/anthropic-claude-platform-updates-2026-07.md))

## Open Questions

- How to achieve continual consolidation without catastrophic forgetting?
- Can causally grounded retrieval replace similarity-based retrieval for better relevance?
- How to ensure self-generated reflective insights are reliable and grounded?
- How to extend memory systems to multimodal embodied settings (visual, spatial, proprioceptive)?
- How to secure memory stores against manipulation attacks (a documented agentic threat vector)?
- Do platform-imposed retrieval constraints (shallow depth, server-defined ordering, segment-exact prefixes) rule out whole mechanism families — notably policy-learned management, which needs control over retrieval order?
- Does per-session harness override turn production traffic into an implicit harness search, reintroducing the overfitting risk the harness-evolution audit identified — but with real users as the feedback signal?

## Related Concepts

- [Agentic Reasoning](./agentic-reasoning.md) — Memory is the infrastructure for self-evolving agents (layer 2 of the three-layer framework)
- [Reinforcement Learning for Agents](./reinforcement-learning-for-agents.md) — RL optimizes memory management policies
- [Agent Safety & Alignment](./agent-safety-alignment.md) — Memory manipulation is a documented attack surface
- [Agent Harness Evolution](./agent-harness-evolution.md) — memory is the harness component furthest along the productization path

## Backlinks

*Pages that reference this concept:*
- [Agentic Reasoning](./agentic-reasoning.md)
- [Agent Safety & Alignment](./agent-safety-alignment.md)
- [Agent Harness Evolution](./agent-harness-evolution.md)

## Changelog

- **2026-07-22** — Compiled new source (anthropic-claude-platform-updates-2026-07): added "Memory as a Versioned Platform Primitive" section documenting the agent-memory-2026-07-22 beta-header migration and per-session harness override; two new claims and two open questions on platform-imposed retrieval constraints

## Sources

- agent-memory-mechanisms-survey
- a-mem-agentic-memory
- anthropic-claude-platform-updates-2026-07

---

Cite as: MenFem Knowledge Base — https://menfem.com/kb/harnesses/concepts/agent-memory-architectures