Skip to main content

Long-term Memory (Agent Memory)

Long-term Memory (Agent Memory)

  • Agents
  • Stage 3 · Going Deeper
  • refs checked 2026-11-19
What problem it solves

Let an agent remember user preferences, task state and key facts across sessions instead of starting from zero each time.

What it is
It usually has three layers: working memory (current context), episodic memory (past events) and semantic memory (distilled facts and preferences). Writes need policy: what is worth remembering, when to distil, how to expire and delete; otherwise memory becomes noise. Unlike a context window, long-term memory is external storage and retrieval, not limited by a single context length. Recall also needs a threshold: similarity is not relevance, and a wrong memory is harder to debug than no memory.
Why it matters

Agents in 2026 sell remembering you; without understanding how memory is written and recalled, you cannot tell real memory from a temporary stitch-up.

Chinese aliases

Sources
  • Anthropic · Building effective agents ↗
  • LangGraph · Memory concepts ↗
  • Learn AI · Memory ↗
Use this term in a task

Don’t stop at the definition: use the task handbook for the order and checks, or filter three tool candidates for the job at hand.

Task handbooks → · Filter three candidates →