Short-term vs long-term agent memory

Short-term memory holds the current task and is discarded when it ends. Long-term memory persists across sessions. The two solve different problems, and most useful agents combine them.

Short-term memory

Short-term, or working, memory is the context of the task in progress: the conversation so far, intermediate results, the plan. It usually lives in the model’s context window or a scratchpad, and it is thrown away when the task ends. Its limit is size, since a long task can outgrow the window.

Long-term memory

Long-term memory outlives the session. It stores what should carry over: a user’s preferences, decisions already made, facts established once. It lives in a store the agent reads from and writes to, and the challenge is retrieval: pulling back the few relevant items without flooding the context.

Using both

A capable agent uses short-term memory to stay coherent now and long-term memory to stay useful later. They are not interchangeable. Treating the context window as long-term memory loses everything at session end; treating a long-term store as working memory uses it for a job the context window already handles. For a customer-facing agent there is a third input neither covers: what the customer is doing in your product right now, read fresh before each reply.

See it on your own traffic

Add the SDK, define one attribute, and see an attribute updating against your own traffic in the first session. The free tier runs on the real engine: no card, no sales call.