What it is used for

Tiered memory is used for assistants that must remember over the long term. A personal assistant accompanying someone for weeks needs to remember names, habits, and promises once discussed. A customer service agent needs to remember the complaint history of the same customer. A research agent needs to read documents far longer than its model's context window.

Without memory tiers, all of these fail in the same way: the conversation is cut off, the document cannot be read in full, and the agent answers as if nothing had happened before. With tiered memory, the agent can reopen relevant old notes exactly when needed.

The everyday comparison is human memory: we remember the gist and the important things, then reopen notes or message archives when details are needed. Tiered memory gives an agent the matching ability: core memory always ready, and a searchable archive.

How to use it

Ordinary users do not install MemGPT directly; this pattern lives inside the agent products they use. What users can do is help the agent's memory work well. State important facts clearly, such as names, dates, and decisions, because clear sentences are easier to store and recall correctly.

Check what the system remembers, and correct or delete false memories, because they keep influencing later answers.

For agent builders, the pattern is two layers, a limited main context for what is active and external storage for the archive, with function calls letting the agent write, search, and pull back contents.

Practitioner level

The MemGPT paper calls its technique virtual context management, copying how a computer operating system manages memory. A computer has main memory that is fast but small, and disk storage that is slow but large; the operating system moves data between the two so programs feel as if they have far more memory. MemGPT does the same for a language model.

The first tier is the main context, the text the model is actually reading. Inside it sit the system instructions, a working context holding important facts that the model can edit itself, and the message queue of the conversation. The second tier is the external context, storage outside the context window, holding a complete archive and records that can be searched again.

The model itself manages this movement through function calls. It decides what to write to the archive, what to call back, and what to evict from the main context. The paper also uses interrupts, a mechanism to manage turn taking between the agent and the user, similar to operating system interrupts that pause the processor briefly to serve another event.

Expert level

Inside the main context, MemGPT gives the model control to edit its own memory. The working context can be rewritten by the model when a new, more important fact arrives. The message queue works first in, first out; old messages that are pushed out are not simply thrown away, but summarized in stages so their essence stays alive inside the context.

The system also issues memory pressure warnings when the main context is nearly full, pushing the model to move contents into external context before it is too late. External context distinguishes archival storage for documents and long term records from recall storage for searchable conversation history.

The paper tested this design in two domains. In document analysis, MemGPT could handle documents far beyond the context window of its underlying model, including question answering across many documents. In multi-session chat, an agent with tiered memory could remember, reflect, and evolve through long term interactions with its users, something a fixed context model cannot do unaided.

Limits and risks

Recalled memory can be wrong or incomplete. The agent searches its archive by similarity of words and meaning, so a relevant record can be missed and a less relevant one picked up. Summaries of old messages also discard nuance; a decision once made with long reasoning can survive as one flat sentence.

There is a risk of false memory becoming fact. If the model writes a wrong conclusion into its working context, that conclusion will be read again on every turn and influence all later answers. A good system therefore gives humans a way to see and correct what is stored.

Finally, long term memory means more user data stored for longer. Conversations kept for years are a privacy burden: they must be protected, deletable on request, and not used for other purposes without permission. An agent with a strong memory demands an equally strong keeper.