Working versus long-term memory

  • Industry term
4 steps

Working memory is what an AI system holds while doing the current task. Long-term memory is what it saves for possible use in later tasks or chats.

The conversation sits in the model's context window, the text it reads before each reply, along with what the agent's actions brought back, such as files it opened. The window has a size limit and starts empty each session. Long-term memory sits outside it, in notes, files, or a database, and the app running the agent copies some back in when a later task begins.

Where you’ll meet it

You spend an afternoon with an AI agent cleaning up your team's shared contact spreadsheet, deciding together which duplicate entries to merge. The next morning you open a new session to finish, and it asks the same questions again, with no record of the choices you made.

What to do

Before you end a long session, ask the agent to write the decisions so far into a place it will read next time, such as a notes tab in the spreadsheet or a file in the project. Start the next session by pointing it there.

Easy to mix up

What decides how much it holds?
Working versus long-term memoryContext window
The app, by what it loads, trims, and savesThe model, up to the maximum it was built for

Check yourself

Partway through a task, your agent saved a client's draft contract to a scratch folder on your computer so it could reread it while working. The task ended weeks ago, and the file is still there. Which kind of memory is that file now?

Go deeperWorking memory can shrink before a session ends

The split borrows loosely from cognitive science, where working memory holds what a person is using right now. Applied to AI systems, it makes no claim that they work like brains.

When a conversation nears the model's limit, many apps summarize older messages to make room. Details left out of the summary are gone for the rest of the session, even though the session never ended.

For long-term memory, the design question is what to keep. Saving everything fills later requests with stale detail, while saving little makes people repeat themselves.

Practice Second Brain

Or take the learning quiz on a mix of every set