Skip to the workspace
Pebellslearn by building
Agent Memory  ›  Lesson

What Is Agent Memory?

What is Agent Memory? 12 minBecause a model remembers nothing between calls, agent memory is a system around it that writes, stores and retrieves information, split into short-term memory for the current task and long-term memory across sessions.

ai agents / What Is Agent Memory?

Explore each scene at your own pace.

01 · The rule

The rule

What Is Agent Memory?

Asha opens Tripmate a month after her Jaipur trip and types, "Same as last time, but to Udaipur." For a good assistant that is a complete request: same dates pattern, same class, window seats, vegetarian meals. For a bare model it is meaningless — it has never "met" Asha. Agent memory is what closes that gap.

The rule

A model remembers nothing; memory is what your app writes, stores and puts back.

Every model call starts from zero. So "memory" in an agent is not inside the model. It is a system around it with three moves:

  • Write — decide what is worth keeping ("Asha prefers window seats").
  • Store — save it somewhere: the running message list, a database, a file, a search index.
  • Retrieve — at the right moment, find the relevant pieces and put them into the context.

Memory is usually split by how long it lasts:

  • Short-term memory — the current conversation and task: recent messages, tool results, the plan so far. It lives in the context window and ends with the session.
  • Long-term memory — facts and history kept across sessions: preferences, past trips, what worked before. It lives in storage and is brought back only when relevant.
session starts → retrieve relevant long-term notes → add to context
during the task → short-term history grows in the context
session ends   → write the notes worth keeping to long-term storage
Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.