What is agent memory?

Agent memory is the mechanism that lets an AI agent retain and retrieve information across turns in one conversation or across separate sessions over time. Short-term memory keeps recent messages inside the active context window, while long-term memory stores structured notes or preferences externally and retrieves only what is relevant to the current task.

By Sacha Arbonel, Founder and CTOLast updated
  • Also called
  • Memory
  • Long-term memory

Why does agent memory matter?

Without memory, users must repeat preferences, account context, and past decisions in every session. Without clear boundaries on memory, however, agents can repeat outdated mistakes or leak personal data across users.

Short-term memory is the conversation so far, kept in the agent’s context. Long-term memory carries facts and preferences across separate conversations, usually by storing notes and retrieving the relevant ones later.

Long-term memory is powerful and risky: a remembered mistake repeats, and remembered personal data needs the same care as any stored data. Good systems let people see, correct and remove what an agent remembers.

Key characteristics of agent memory

  • Short-term memory lives in the active session context and resets when a new conversation starts.
  • Long-term memory persists facts, preferences, or summaries in storage scoped to a user, tenant, or agent.
  • Inspectable memory lets operators or end users audit, edit, and delete stored facts.
  • Strict tenant isolation prevents one customer’s remembered data from appearing in another customer’s run.

How agent memory works step by step

  1. 1. New requestIdentify customer space and session
  2. 2. Retrieve notesPull relevant scoped memories
  3. 3. Assemble contextMerge with current turn history
  4. 4. Update storeSave or edit explicit facts
How an agent retrieves and updates long-term memory across sessions.

Short-term vs. long-term agent memory

DimensionShort-term memoryLong-term memory
ScopeSingle active conversationMultiple sessions over days or months
StorageModel context windowExternal store retrieved on demand
LifespanEnds or truncates with the sessionPersists until updated or deleted
Primary riskExceeding token limits or losing early turnsStale facts or cross-tenant data leaks

Example in practice

How Norilu handles agent memory

Frequently asked questions

Is agent memory the same as the context window?
No. The context window holds everything passed to one model call, whereas agent memory is the broader system that decides which past facts are saved and loaded back into that window.
What should never be stored in long-term agent memory?
Never store secrets, passwords, payment credentials, or unverified temporary statuses like an invoice balance that should always be fetched fresh from a tool.

Go deeper