---
title: "MemGPT: Towards LLMs as Operating Systems (2023)"
description: "MemGPT manages limited context through memory tiers and function calls; understand its design, retrieval experiments, and limits."
canonical: "https://research.elamur.ai/free/en/papers/packer-2023-memgpt-towards-llms-operating-systems/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/packer-2023-memgpt-towards-llms-operating-systems/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2023](https://md.research.elamur.ai/free/en/papers/2023/) / MemGPT: Towards LLMs as Operating Systems

# MemGPT: Towards LLMs as Operating Systems

Paper · 2023 · Charles Packer, Sarah Wooders, Kevin Lin et al.

**Authors:** Charles Packer, Sarah Wooders, [Kevin Lin](https://md.research.elamur.ai/free/en/authors/kevin-lin/), Vivian Fang, [Shishir G. Patil](https://md.research.elamur.ai/free/en/authors/shishir-g-patil/), [Ion Stoica](https://md.research.elamur.ai/free/en/authors/ion-gabriel-stoica/) and [Joseph E. Gonzalez](https://md.research.elamur.ai/free/en/authors/joseph-e-gonzalez/) · **Year:** 2023 · **Venue:** arXiv:2310.08560 · **Licence:** [CC BY 4.0 (arXiv)](http://creativecommons.org/licenses/by/4.0/)

[**51** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W4387636003) · [licence](http://creativecommons.org/licenses/by/4.0/)

- [PDF](https://arxiv.org/pdf/2310.08560)
- [arXiv 2310.08560](https://arxiv.org/abs/2310.08560)
- [OpenAlex](https://openalex.org/W4387636003)

## Deep dive: MemGPT: Towards LLMs as Operating Systems

MemGPT manages limited context through memory tiers and function calls; understand its design, retrieval experiments, and limits. · about 35 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

A conversation can outgrow the space available for remembering it. A collection of documents can exceed the amount of text that can be examined at once. MemGPT addresses these problems by treating context as a resource to manage: retain useful material nearby, preserve the rest externally, and retrieve it when needed. Its central proposal, virtual context management, draws on the way operating systems let applications work with more information than physical memory can hold. The aim is to make a bounded input window support tasks whose histories or document collections extend beyond that window.

The architecture separates immediately accessible context from external storage. Inside the context window, MemGPT keeps instructions, a compact area for important facts, and a rolling message history. Outside it, the system preserves conversation records and stores documents or other text. Function calls let the underlying [language model](https://md.research.elamur.ai/free/en/concepts/language-model/) search these stores, revise its working information, and decide whether to continue processing before replying. A queue manager monitors available space, issues warnings, and removes older messages when necessary. Removing a message from immediate view does not erase its stored record. The system can search for it later and bring it back into context.

The authors evaluate this design through long-term conversation tasks and document analysis. For conversation, they test whether an agent can answer questions about earlier exchanges and whether it can use remembered personal information when opening a later session. For documents, they examine questions over retrieved Wikipedia material and introduce a nested key–value task that requires following a chain of references. The reported comparisons favor MemGPT over the corresponding systems without its memory machinery. In the nested task, GPT-3. At a nesting depth of 1, accuracy for 5 drops to 0 percent; GPT-4 and GPT-4 Turbo reach that same accuracy by a depth of 3. MemGPT using GPT-4 remains successful as nesting increases across the tested conditions, although the prose does not assign that performance an exact accuracy.

The findings support a systems approach to extending usable context, with important qualifications. External storage does not make every stored fact immediately available, and repeated retrieval still depends on choosing useful searches and continuing long enough. The authors observe premature stopping during document search and weaker results when function use is unreliable. Nor does the work establish that memory management replaces all benefits of larger context windows: the authors explicitly treat a larger window as a larger immediate workspace within the same hierarchy. MemGPT’s contribution is an architecture for coordinating storage, retrieval, and continued computation. The authors also make their implementation and experimental resources publicly available, including their conversational task extension, nested retrieval data, and Wikipedia embeddings.

### Ideas worth borrowing

Preserve evidence beyond the summary. A running summary is useful because it keeps an account of older material within reach, but it cannot retain every detail that might later matter. MemGPT combines that compressed account with searchable conversation records. This gives the system a way to recover a specific past statement rather than relying completely on what survived compression. The idea applies wherever a future question may concern an incidental detail: an assistant’s earlier discussion, an extended investigation, or a document review. The reusable principle is to treat summaries as aids to access, while maintaining a route back to the underlying evidence.

Separate durable facts from recent activity. MemGPT gives important user information and agent persona information a dedicated working area instead of leaving everything in a rolling transcript. Recent messages and long-lived facts have different roles. A recent exchange helps interpret the immediate request; an enduring preference may matter across many requests after the exchange that introduced it has disappeared. This separation can help any system that must maintain stable task information while its activity history grows. It also makes memory decisions more concrete: the system must choose which information deserves continuing space in the immediate context.

Expose resource pressure before eviction. The queue manager warns about approaching capacity before it removes older messages. That advance notice creates an opportunity to preserve details that would otherwise become harder to access. The broader idea is to make resource limits observable to the component making decisions about content. A system cannot plan around a boundary it cannot see. Similar warnings could help a document-processing agent decide when to consolidate evidence, or help a conversational system preserve an unresolved commitment before its recent history changes.

Make continuation an explicit action. MemGPT’s function calls can request another processing cycle instead of immediately returning control to the user. This matters because a useful answer may require searching, inspecting results, searching again, and only then responding. Explicit continuation separates intermediate progress from task completion. The idea is relevant to any agent that must carry out dependent operations, particularly when the next operation becomes clear only after reading the previous result. It also makes a failure mode visible: an agent may retrieve something useful yet stop before it has enough evidence.

Bound each retrieval result. External storage may be large, but the material returned from a search must still fit into the active context. MemGPT uses pagination so that access to a large collection does not itself overwhelm the workspace. This is a useful design pattern for [information retrieval](https://md.research.elamur.ai/free/en/topics/information-retrieval/), document inspection, and tool interfaces more generally. The interface should expose additional material in manageable portions and let the caller request more. The paper also shows the corresponding responsibility: the caller must recognize when another page is necessary.

Evaluate remembering and using memory separately. The conversational experiments distinguish answering an explicit question about the past from spontaneously incorporating relevant personal information. These abilities overlap, but neither guarantees the other. An agent might retrieve a detail when directly asked yet fail to use it when starting a conversation. Conversely, it might produce a personalized greeting from a compact persona while lacking access to a specific historical event. Separating these tests helps researchers identify what a memory mechanism actually contributes and helps engineers avoid treating a plausible personal reference as evidence of reliable historical recall.

Test a verifiable stopping condition. In nested key–value retrieval, obtaining a value is insufficient if that value might itself be another key. The task requires the system to check whether the chain continues. This offers a reusable way to test multi-step behavior: define completion through a condition that can be checked, rather than through the appearance of a plausible intermediate answer. The same design question arises in other retrieval tasks: what evidence would justify stopping? MemGPT’s results show why this matters, since some configurations fail through insufficient continuation despite having access to the required lookup operations.

### How Mova uses it

For Mova, a small transparent language system implemented in Rust, MemGPT offers a concrete design direction: make the relationship between immediate text, retained records, and retrieved evidence explicit. The available information does not establish that Mova already implements MemGPT’s architecture. The applications discussed here are therefore proposals for how its ideas could be adapted, rather than claims about existing capabilities.

The most direct proposal is a visible memory hierarchy. Mova could distinguish the text currently available for processing from records that remain stored but must be retrieved. This distinction is valuable for transparency because “remembered” can otherwise describe several different situations. A fact might be present in the current working text, represented in a compressed account, or recoverable only through a search. Those states provide different grounds for an answer. Making them explicit would help explain why Mova can respond immediately to some questions while needing further evidence for others.

A second proposal is to preserve original passages alongside any compressed account. MemGPT’s conversation design illustrates why this matters: a summary can maintain continuity while losing the detail later requested by a user. Mova could use a compact account to orient processing and retain references to the underlying passages for verification. This would fit a transparent system particularly well, because a retrieved passage could provide a concrete basis for a claim. The engineering lesson concerns recoverability; it does not depend on assuming that Mova already has the same generation or function-calling abilities as MemGPT.

The working-context idea could also be adapted as an explicit collection of current facts and commitments. Instead of mixing every useful item into a single growing history, Mova could maintain a bounded area for information that must remain available across an ongoing task. A document-reading task might need its current question, unresolved references, and the evidence already located. A conversation might need a user preference that affects later answers. These are possible applications of the architecture, not demonstrated results for Mova. The paper provides the separation of responsibilities; Mova would still need its own rules for selecting and updating the contents.

The control-flow mechanism suggests a further opportunity. A small system can distinguish an intermediate action from a finished response without reproducing every aspect of MemGPT. A retrieval request could return evidence, after which processing either continues or yields. The important property would be that continuation has an explicit reason. In nested retrieval, that reason is especially clear: a value that remains a key requires another lookup. Such a condition could make Mova’s behavior easier to inspect, because the system would expose both what it found and why that finding did or did not complete the task.

Capacity handling is another useful borrowing. MemGPT reports pressure on the active context and preserves records when older material leaves it. An analogous design for Mova could make limits visible and ensure that removing material from immediate processing does not silently destroy access to it. The appropriate thresholds and eviction policy would require separate decisions. The example settings in MemGPT should not be treated as tested settings for a Rust implementation with different representations or processing constraints.

Finally, the evaluation structure offers Mova a way to separate aspirations from evidence. Historical recall, proactive personalization, document-grounded answering, and dependent lookup should be tested as distinct capabilities. Success on one would not establish the others. MemGPT’s weaker configurations are useful here: supplying storage and search operations is not enough if the system chooses an inadequate query or stops too soon. Any adaptation for Mova would need to demonstrate that its access policy works under its own constraints. The paper supplies a vocabulary for designing those tests, while leaving their implementation and outcomes open.

### The problem and its context

#### A bounded input becomes an information bottleneck

The paper starts from a practical mismatch. Applications may accumulate information continuously, while the text available during any particular inference is bounded. A conversation adds exchanges over time. A document collection adds material that may matter to a later question. When those accumulated records exceed the input window, the application needs a policy for what remains visible.

That policy affects capability. If earlier conversation content disappears without another route to it, an agent may lose a preference, contradict a previous statement, or fail to answer a question about an event already discussed. If a document collection is too large to fit, an answering system must either select material, compress it, or omit some of it. Each choice can exclude evidence needed for the current request.

The context window is therefore more than a technical limit on input length. It determines which evidence can participate directly in producing the next output. Material on disk may be retained perfectly yet have no influence on that output unless the system first retrieves it. MemGPT makes this boundary central to its design.

The authors place the problem within the development of [transformer and attention](https://md.research.elamur.ai/free/en/concepts/transformer/) architectures, citing work including [Attention Is All You Need](https://md.research.elamur.ai/free/en/papers/vaswani-2017-attention-all-need/), BERT, and subsequent large-scale conversational systems. Their argument concerns how to use such systems when an application’s information requirements exceed the active window.

#### Why increasing the window is only part of the answer

The paper gives a computational reason for seeking another approach. Under the self-attention mechanism it discusses, extending context increases computation and memory requirements quadratically. Training and deploying systems with larger windows therefore requires substantial resources.

It also gives a behavioral reason. [Lost in the Middle](https://md.research.elamur.ai/free/en/papers/liu-2023-lost-middle-language-models-use/) reports that additional context is not used uniformly: information near the boundaries of an input can be easier to recover than information placed centrally. The MemGPT authors use this result to question whether greater capacity alone solves the application problem. More text can be admitted without all of it becoming equally useful.

The related-work discussion describes several attempts to improve long-context processing. Sparse attention reduces which positions attend to which others, with [Sparse Transformers](https://md.research.elamur.ai/free/en/papers/child-2019-generating-long-sequences-sparse-transformers/) and [Longformer](https://md.research.elamur.ai/free/en/papers/beltagy-2020-longformer-long-document-transformer/) among the cited examples. Other approaches use low-rank approximations, neural memory, or methods for extending usable context beyond the length used during training.

MemGPT treats these developments as compatible with its own proposal. A larger context window increases the capacity of the immediate tier. It does not remove the distinction between information available now and information retained elsewhere. The paper’s architectural question remains relevant whenever a task can accumulate more material than that immediate tier holds.

#### Retrieval already provides a route to external information

MemGPT also builds on [retrieval-augmented generation](https://md.research.elamur.ai/free/en/concepts/retrieval-augmented-generation/). Earlier retrieval work supplies relevant external material to a system before or during answering. The paper cites approaches including [REALM](https://md.research.elamur.ai/free/en/papers/guu-2020-realm-retrieval-augmented-language-model/), [Dense Passage Retrieval](https://md.research.elamur.ai/free/en/papers/karpukhin-2020-dense-passage-retrieval-open-domain/), and [Retrieval-Augmented Generation](https://md.research.elamur.ai/free/en/papers/lewis-2020-retrieval-augmented-generation-knowledge-intensive/).

This background matters because MemGPT does not introduce the general notion of answering from retrieved text. Its external-memory design depends on that earlier line of work. The distinctive contribution is to place retrieval inside a broader arrangement that also handles memory editing, message eviction, and continued processing.

The paper identifies active retrieval as a particularly close connection. [FLARE](https://md.research.elamur.ai/free/en/papers/jiang-2023-active-retrieval-augmented-generation/) lets the generating system choose when retrieval is needed and what to request. The authors also discuss work that alternates retrieval with reasoning for questions requiring several steps. These approaches already move away from a single fixed retrieval pass. MemGPT extends the systems perspective by coordinating such access with persistent conversational records and a managed active context.

#### Tool use makes memory management actionable

The architecture depends on being able to express actions as function calls. Merely instructing an agent to remember more would not create extra capacity or a retrieval interface. Functions give memory decisions an executable form: search a database, update a working block, or request another processing cycle.

The paper connects this capability with agent research and tool use, citing [Toolformer](https://md.research.elamur.ai/free/en/papers/schick-2023-toolformer-language-models-can-teach/). It also discusses WebGPT’s search behavior and its use of paginated access to control the amount of material entering context. Pagination is important here because access to an external collection can otherwise recreate the original capacity problem.

[ReAct](https://md.research.elamur.ai/free/en/papers/yao-2022-react-synergizing-reasoning-acting-language/) provides another connection through the interleaving of reasoning and action. The MemGPT authors describe their processor as able to articulate plans while using functions. They situate this alongside [chain-of-thought prompting](https://md.research.elamur.ai/free/en/papers/wei-2022-chain-thought-prompting-elicits-reasoning/), while concentrating their own contribution on retaining and recovering user information.

The operating-system analogy unifies these threads. External storage supplies capacity, retrieval supplies access, function calls supply actions, and control flow determines when the system continues. MemGPT asks how these components can work together so that an application need not treat every full context window as the end of its usable history.

### The method, step by step

#### Start with what can be accessed immediately

MemGPT calls the prompt presented to the processor its main context. Everything in this prompt is available during the current inference. Everything outside it belongs to external context and must be brought in explicitly before it can be used.

This is the essential distinction behind virtual context management. The architecture does not expand a single inference into an examination of the entire stored collection. Instead, it repeatedly changes the limited text that the processor sees. Over successive cycles, different relevant portions can become available.

The paper describes the architecture through components and execution rules rather than a mathematical objective or a new set of learning equations. Its central notation in the document experiment is K, the number of retrieved documents considered in a condition. The method itself is most precisely understood by following the contents of the active context and the events that change them.

How MemGPT manages context during a task The steps in order.

#### Divide the prompt by responsibility

The main context has distinct regions for instructions, working information, and a message queue. Each region serves a different purpose and has different rules for change.

The instruction region is static. It describes the storage hierarchy, explains how the functions should be used, and establishes the control-flow conventions. Its role is to make the system’s available actions and constraints intelligible to the processor. Without that description, access to a database would not by itself tell the processor when to search, what to preserve, or how to continue after a call.

The working region is a bounded text area that can be changed through functions. In conversation, the intended contents include important facts about the user and the persona being enacted by the agent. This information remains directly accessible without requiring a fresh search of old messages.

The queue contains the recent sequence of interactions. It includes user and agent messages, system notifications, and function requests and results. Its first entry holds a summary of earlier messages that have already left the queue. The result is a combination of immediate detail and compressed historical orientation.

These regions should not be understood as interchangeable stores. Instructions govern behavior. Working information supports continuity. The queue records recent activity. The summary gives an account of older activity, while external records preserve details that the summary may omit.

#### Preserve conversation records outside the prompt

Recall storage is the persistent message database. When an incoming message arrives, the queue manager adds it to the active queue and records it externally. The generated output is also recorded.

This establishes a useful separation between retention and visibility. A message can cease to be visible without ceasing to exist. If a subsequent request requires it, a search function can recover it from recall storage and append the retrieved material to the active queue.

The position of recovered material also matters. A retrieved old message becomes new input to the current processing cycle. It does not require reconstructing the whole historical prompt in its original order. The system only needs to place the relevant evidence within the bounded workspace where the processor can inspect it.

Archival storage serves a broader role. The paper describes it as a read/write database for text objects, including material that need not originate as conversation messages. Document collections can be placed there, and the agent can write information into it when preserving material outside the active context.

Both stores are external from the processor’s perspective. Their different purposes help organize access: recall storage provides historical interaction records, while archival storage holds other retained text and documents.

#### Warn before removing recent detail

The queue manager monitors the size of the assembled prompt. When a warning threshold is crossed, it adds a message describing pressure on the available context. The paper gives 70% of the window as an example warning point.

This warning lets the processor act before eviction. It can copy important information into the working region or write it to archival storage. Such actions preserve the significance of recent material in a form that may be easier to use after the queue changes.

At the flush threshold, the manager removes older messages to free space. The paper gives 100% as an example threshold and 50% of the window as an example amount associated with eviction. These values illustrate the policy; they are not presented as the outcome of a threshold-selection study.

The manager also updates the historical summary. It combines the previous summary with the newly evicted messages to produce another compressed account. This is recursive because each update incorporates an already compressed representation of earlier material.

The evicted records remain in recall storage. That preservation is crucial: the summary offers continuity, while the records provide the possibility of precise recovery. If the summary omits a detail, the system still has a route to it, provided retrieval succeeds.

#### Turn output into validated operations

During a processing cycle, the active context is assembled into the input, and the processor produces an output string. MemGPT interprets that output through its function interface.

The executor checks the proposed call and its arguments before execution. Successful validation permits the operation to run. This gives the architecture an operational boundary between proposing a memory action and changing system state.

The result of a function is then made available to the processor. Errors are returned as well. For example, an attempted addition to an already full working region can produce a capacity error that becomes part of subsequent context.

This feedback supports adjustment within the ongoing task. The processor can see that an action failed and choose another action. It does not establish that the underlying parameters are being trained by each error. The mechanism described is an interaction loop: action, returned result, and another opportunity to decide.

The functions also constrain how memory can change. The working region is writable through these operations, rather than through an unrestricted reinterpretation of previous input. The architecture therefore gives editing a visible execution path.

#### Retrieve in bounded portions

A search can return far more material than the active context can hold. MemGPT addresses this through pagination: only a portion of the results enters the prompt at a time.

Pagination preserves the basic capacity invariant. External memory may contain a large collection, but an individual access should not flood the immediate workspace. The processor can request another page if the current results do not resolve the question.

This mechanism turns retrieval into a sequence of decisions. After each page, the processor must judge whether the answer is supported, whether another page is useful, or whether another query would be better. The experiments later show that these decisions are consequential. The system sometimes stops searching while relevant material remains undiscovered.

The method therefore combines an access capability with a policy problem. Pagination makes continued access possible. It does not ensure that the processor will use that possibility well.

#### Decide whether the task should continue

Events initiate processing. A user message is one kind of event, but the paper also describes system warnings, notifications about user activity, document-upload events, and scheduled triggers.

These events are converted into text that can enter the active context. This allows different external circumstances to use the same processing mechanism. A capacity warning can provoke memory preservation, while an uploaded document can make new material available for a task.

The processor can request immediate continuation by including `request_heartbeat=true` in a function call. After executing that function, MemGPT adds the result to the active context and initiates another cycle.

If continuation is not requested, execution yields. Processing resumes when another external event occurs. This convention is how the agent can perform several dependent operations before handing control back.

The mechanism is especially important for tasks in which the next query depends on the previous result. A search might reveal a document name that becomes the basis of another search. A key–value lookup might return another key. Neither situation can be fully specified through a single initial retrieval request.

#### Prepare the document store

For document question answering, the authors use PostgreSQL as archival storage and enable vector search through pgvector. They compute text embeddings in advance using text-embedding-ada-002 and load those representations into the database.

An HNSW index supports approximate retrieval. The paper describes query times as sub-second. This storage setup supplies the external access mechanism; it does not change the requirement that returned passages must enter the active context before the processor can use them.

MemGPT accesses this collection through archival search functions. The comparison systems use the same retrieval basis, but their documents are fetched independently before answering. This distinction becomes central to interpreting the results: the retrieval technology is shared, while access over time differs.

The document instructions require an answer accompanied by the supporting archival text. They also encourage continued search by stating that the answer is in archival storage. The comparison instructions require reliance on the supplied documents and allow an insufficient-information response when those documents do not contain the answer.

#### Construct tasks without introducing a new training procedure

The paper describes an architecture built around existing systems, instructions, functions, and external storage. It does not present a new end-to-end training procedure for learning the whole memory policy.

Some experimental data are generated specifically for evaluation. For the conversational memory task, a separate generating system receives earlier dialogue and persona information, then produces a question and answer intended to require the old dialogue.

The generation instructions exclude questions answerable from the persona alone. This is important because the experiment aims to test historical recovery. A question about a general interest listed in the persona would not establish that the agent remembered an earlier exchange.

The nested key–value data are synthetic. Their construction makes a returned value potentially act as another key, creating a dependent retrieval chain. This gives the authors a task where successful access can be distinguished from successful completion.

The method’s contribution therefore lies in coordinating existing inference capabilities with a memory environment. Its data procedures build tests of that coordination instead of supplying a new corpus for training the entire architecture.

### Experiments and results

#### What is compared

The experiments cover conversational memory and document analysis, with separate tasks inside those domains. Across the comparisons, the authors vary the underlying processor so that the value of the surrounding architecture can be distinguished from the capabilities of a particular endpoint.

Their implementation specifies GPT-4 as gpt-4-0613, with a context capacity of 8,192 tokens. GPT-4 Turbo denotes gpt-4-1106-preview, with 128,000 tokens. GPT-3.5 Turbo denotes gpt-3.5-turbo-1106, with 16,385 tokens.

Those capacities matter because the architecture is designed to work around a bounded immediate workspace. They also help interpret why a longer nominal window does not automatically produce the strongest MemGPT configuration. The nested retrieval results favor MemGPT with GPT-4 over its GPT-4 Turbo counterpart.

The paper’s conversational result tables are described through their captions and accompanying analysis, without individual score entries in the available numerical account. The document results are likewise discussed qualitatively. Their directions can be reported, but exact conversational scores or document accuracies cannot be assigned from those statements.

The nested retrieval discussion does state exact failure points. These support a numerical comparison of the fixed-context baselines, while the performance of MemGPT itself must be described in the qualitative terms established by the authors.

#### Recovering details from earlier conversations

The conversational experiments use Multi-Session Chat, or MSC. Human contributors created dialogues while maintaining assigned personas across five sessions. A session contains roughly a dozen messages.

For the deep memory retrieval task, the authors add session 6, containing a question and its expected response. The question explicitly asks about earlier interaction and is designed to have a relatively narrow acceptable answer.

The comparison systems receive a compressed account of the previous conversations. MemGPT instead retains access to the complete history through paginated recall searches. This is a comparison between different approaches to carrying history forward: compressed information placed directly in context, and retained records accessed as needed.

The authors evaluate answers with ROUGE-L recall and an automated judge. [ROUGE](https://md.research.elamur.ai/free/en/papers/lin-2004-rouge-package-automatic-evaluation-summaries/) provides a text-overlap measure; recall emphasizes whether the expected answer content appears in a response that may be longer than the reference.

The judge assesses whether the answer agrees with the reference. Its instructions permit generous matching when a longer reply contains the relevant topic. The paper motivates automated judging through prior work on agreement with human evaluators, including [Judging LLM-as-a-Judge](https://md.research.elamur.ai/free/en/papers/zheng-2023-judging-llm-judge-mt-bench/).

The reported outcome favors MemGPT for each corresponding underlying system. Removing its memory arrangement lowers both judged accuracy and ROUGE performance. This supports the claim that searchable historical records can recover information lost through compression.

It does not isolate every component of the architecture. The comparison changes both how history is retained for access and how the agent can interact with it. The result establishes the usefulness of the complete memory arrangement under this task, rather than the independent contribution of every function or queue rule.

#### Opening a conversation with remembered information

The conversation-opener task asks a different question. Rather than responding to a direct memory challenge, the agent must initiate a message that draws on earlier knowledge about the user.

The evaluation compares generated openers with persona information and with a human-written opener. Persona similarity serves as a proxy for whether the message incorporates known personal details. Similarity to the human opener supplies another reference.

The table caption names SIM-1/3 and SIM-H, while the discussion refers to CSIM scores. The prose does not supply enough metric detail to reconstruct additional scoring equations. The appropriate interpretation is therefore limited to the reported similarity-based comparisons.

MemGPT’s generated openers are described as comparable to the human openers and sometimes stronger on these measures. The authors observe that generated messages tend to be longer and mention more persona attributes.

That observation helps explain both the result and its limits. Including more personal facts can improve similarity to persona descriptions. It does not, on its own, demonstrate that users would prefer the message or find it more natural.

The authors also identify information retained in working context as important for opener quality. This connects the task to a specific architectural role: proactive personalization benefits from having relevant facts continuously accessible, without waiting for an explicit historical query.

#### Answering questions over Wikipedia documents

The document experiment follows a retriever–reader setup drawn from Lost in the Middle. Questions come from NaturalQuestions-Open, and the external evidence comes from a Wikipedia snapshot from late 2018.

The evaluation uses 50 sampled questions. The authors make those questions and the embedded passages publicly available. They also report releasing an embedding collection covering 20M Wikipedia articles.

Both MemGPT and its comparison systems use the same embedding-based retrieval mechanism. The experimental variable K denotes how many retrieved documents are considered in a condition. Increasing K makes more potential evidence available, but also increases the amount of material that must be handled.

For a fixed-context reader, retrieval happens before inference and the resulting documents are inserted into the prompt. If the correct article is absent from that selection, the reader has no permitted route to it. Its answer must be supported by what it receives.

MemGPT can issue additional archival searches and move through result pages. Its accessible collection therefore extends beyond the documents that fit into the current prompt. It can change what evidence it examines during the task.

An automated judge evaluates the answers and their supporting document text. An answer without the required evidence does not count as correct. This helps distinguish document-grounded success from a correct response that might arise without using the retrieved material.

The authors report that MemGPT’s performance remains stable as the effective context grows. They describe GPT-4 and GPT-4 Turbo versions as equivalent on this task. GPT-3.5 performs substantially worse within MemGPT, which they attribute to weaker function use.

The comparison systems are also tested beyond their ordinary capacity by shortening retrieved documents so more of them fit. As that shortening becomes more severe, accuracy declines because the answer-bearing passage may be removed.

This is an informative comparison, though it combines different access strategies. MemGPT can inspect further material over time; a truncated fixed prompt permanently excludes the removed text for that response. The result demonstrates the value of continued evidence access under the tested setup.

#### Retrieval remains a source of failure

The authors find that the correct Wikipedia article frequently appears after the first dozen search results, sometimes farther down. This makes the task difficult even when the answering component can interpret a relevant passage.

For a fixed-context system, adding documents can improve results because it increases the chance that the necessary article enters the prompt. The retrieval ranking places a practical ceiling on what the supplied set can support.

MemGPT can, in principle, continue through the ranking. However, the authors observe that it often stops before exhausting the available results. External access therefore loosens the initial retrieval boundary without eliminating retrieval failure.

This distinction is central to the evidence. The architecture supplies a path to additional information, while the agent still has to take it. A relevant document remaining somewhere in storage does not make the answer successful unless the search policy reaches it.

#### Following nested key–value references

The nested key–value task isolates dependent lookup. Because every key and every value is a 128-bit UUID, the system must track their associations rather than depending on the identifiers’ ordinary meanings.

The authors use 140 pairs, occupying roughly 8k tokens. They vary nesting from 0 to 4 and sample 30 ordering configurations, changing the positions of both the initial key and keys encountered later.

At 0 nesting, the first value is already terminal. With nesting, a returned value may also identify another entry. The task is complete only when the retrieved value is no longer a key.

The prose associates the upper setting with 4 lookups, while the conceptual distinction is clear throughout: the system must follow references until the continuation condition fails. The results are most safely reported using the authors’ nesting labels instead of imposing an additional interpretation of chain length.

GPT-3.5 reaches 0 percent accuracy at 1 nesting level. The authors identify a common failure: returning the first associated value instead of following the chain.

GPT-4 and GPT-4 Turbo handle more nesting but reach 0 percent accuracy by 3 nesting levels. The chart shows that stated failure point. The star identifies GPT-4 Turbo as the baseline the authors otherwise describe as stronger; the displayed condition is a tie.

Nested key–value retrieval, baseline accuracy at 3 nesting levels Both fixed-context baselines reach the reported failure point despite their different context capacities.

**The numbers**

| System or setting | accuracy percent |
| --- | --- |
| GPT-4 baseline | 0 |
| GPT-4 Turbo baseline (this paper) | 0 |

MemGPT using GPT-4 does not show the same deterioration as nesting increases across the tested range. The authors describe it as repeatedly using function-based queries to complete the lookup chain. They do not state an exact accuracy in the prose, so no numerical MemGPT bar is justified.

MemGPT with GPT-4 Turbo and GPT-3.5 improves over the corresponding baselines, but performance begins to decline at 2 nesting levels. The stated cause is inadequate continuation: these configurations fail to carry out enough searches.

The synthetic task therefore tests more than information access. The relevant associations are deliberately compact enough to form a bounded collection, yet direct answering still fails with increasing dependency. The result supports the importance of externalized operations and explicit continuation, especially when the system must verify that an intermediate result is final.

### What the ablations show

The paper does not present a comprehensive component-by-component ablation study; it instead offers controlled comparisons and behavioral analyses of processor choice, memory access, working-context information, truncation, and nesting depth.

#### The underlying processor changes the value of the architecture

Using the same overall MemGPT design with different underlying systems reveals that memory functions are not equally useful in every configuration. The GPT-3.5 version performs poorly on document analysis, and the authors connect this to unreliable function calling.

The nested task adds a less obvious finding. GPT-4 Turbo is described as a stronger direct baseline, yet its MemGPT configuration performs worse than MemGPT with GPT-4. This cautions against predicting the best agent configuration from direct-answer performance or context capacity alone.

The architecture places particular demands on the processor. It must formulate valid calls, interpret returned evidence, preserve useful information, and decide whether to continue. A system can be capable at reading a supplied input while being less reliable at managing that sequence of actions.

This comparison does not identify a single internal cause for every difference. It shows that compatibility between the processor and the control interface matters. The storage hierarchy creates opportunities that the processor must successfully use.

#### Searchable history improves on the tested summary baseline

The deep memory retrieval comparison supports retaining access to detailed records. MemGPT can search the complete history, whereas the baseline relies on a compressed account already present in context.

The improvement is consistent with the task construction. Questions are intended to require details from previous exchanges, rather than general persona facts. Compression can remove precisely those details.

However, this is a system-level comparison. It does not compare every possible summarization method, nor does it hold the information representation constant while changing only the retrieval function. The evidence supports searchable history as implemented here, relative to the particular compressed-history baseline.

The recursive summary inside MemGPT also means the paper is not arguing against summaries altogether. Its architecture uses a summary for continuity and retained records for recoverability. The useful distinction is between depending exclusively on compression and supplementing compression with further access.

#### Working context supports proactive use of personal facts

The conversation-opener analysis identifies working-context information as important for generating personalized openings. This is coherent with the region’s intended role: durable user facts stay immediately available even as the recent message queue changes.

The result suggests that the best location for information depends on how it will be used. A rare historical detail can remain searchable externally. A frequently relevant personal fact may deserve active space.

The paper does not supply a full policy study for deciding which facts enter working context or when they should be replaced. It establishes the usefulness of that region in the reported opener comparisons, while leaving selection and maintenance policies open.

#### Truncation exposes the cost of fitting everything at once

The document comparison shortens passages to fit more retrieved documents into a fixed input. This creates a controlled tradeoff between the number of documents represented and the amount of text retained from each.

Performance worsens as the necessary shortening increases. The authors explain the mechanism directly: the answer-bearing passage may be among the discarded text.

This analysis supports preserving the ability to inspect additional material in full enough detail. It does not establish that every compression strategy would behave identically. The tested procedure is truncation, and its failure follows from potentially removing evidence without a later recovery step.

#### Nesting depth reveals premature completion

Changing nesting depth keeps the basic lookup format while increasing the need for dependent operations. This makes the task useful for studying whether an agent follows through.

The observed failures often concern stopping rather than the absence of a database entry. Returning the first value satisfies an ordinary lookup but fails the nested version. Likewise, requesting some additional information remains insufficient if another link still exists.

The GPT-4 MemGPT configuration handles this demand better across the tested settings. Other configurations improve with the architecture yet still stop too early. The analysis therefore supports explicit function chaining while showing that the continuation decision remains a learned behavioral capability rather than a guaranteed consequence of the interface.

### Limitations

#### The authors observe retrieval and continuation failures

A limitation directly reported by the authors is premature termination during document search. MemGPT may stop paging even though it has not exhausted the retrieval results.

This limits the practical meaning of extended context. The architecture can make a large collection accessible, but the agent may inspect only part of it. Its effective reach depends on search decisions as well as storage capacity.

The authors also report difficulties with embedding-based retrieval. Relevant Wikipedia evidence can appear well below the earliest results. Continued access helps only if the system keeps searching or produces a better query.

Function use is another stated limitation. The GPT-3.5 configuration performs substantially worse in document analysis, and some MemGPT configurations fail nested retrieval because they do not perform enough lookups. These observations make clear that memory management is an ability the underlying processor must exercise successfully.

#### Unlimited storage is not unlimited simultaneous understanding

A careful interpretation of the architecture distinguishes an unbounded external record from an unbounded active input. At every processing cycle, the processor still sees a finite prompt.

As a consequence, MemGPT cannot be assumed to consider all stored evidence at once. It must select, retrieve, and sometimes summarize. A task requiring many interacting details may place demands on how those details are assembled in the active workspace.

The paper demonstrates useful behavior in its chosen tasks. It does not establish that arbitrary reasoning over arbitrarily large histories becomes reliable merely by adding storage.

The operating-system analogy is productive because it highlights tiers and movement. It should not be read as a guarantee that language-based retrieval automatically identifies every missing dependency. In the implemented system, the processor still has to recognize what information it needs.

#### The conversational tests measure specific proxies

The authors describe consistency and engagement as broad goals for long-term interaction. Their experiments operationalize those goals through historical questions and similarity-based opener evaluation.

A careful reader should keep the distinction between the goal and the metric. Correctly answering a memory challenge is evidence of recoverable historical information. It is not a complete test of coherence throughout an extended relationship.

Similarly, an opener that mentions more persona attributes may score well without establishing that users find it preferable. The reported tendency toward longer messages and broader persona coverage is relevant to this interpretation.

The MSC histories are also finite and organized around maintained personas. They provide a controlled setting for memory evaluation, but they do not demonstrate behavior across the full duration of the weeks-to-years interactions discussed as motivation.

#### Automated judgments introduce evaluation assumptions

The memory-task judge is instructed to accept answers generously when they contain the relevant topic. This accommodates natural variation and longer replies, but it also defines a relatively permissive notion of correctness.

ROUGE-L recall similarly emphasizes the presence of reference content. It does not provide a full assessment of whether additional statements in a verbose answer are supported.

The document judge requires both an answer and supporting text, which is a useful grounding constraint. Nonetheless, the evaluation still relies on automated interpretation of those outputs.

The authors cite prior evidence supporting automated judging, but the paper’s reported outcomes should be understood within the supplied scoring procedures. They do not remove all uncertainty about response quality, conversational preference, or the correctness of every added detail.

#### The comparison changes access as well as capacity

In the conversation experiment, MemGPT can recover complete records while the baseline receives a compressed history. In document analysis, MemGPT can continue searching while the baseline answers from a preselected set.

These differences are central to the proposed system, so they are legitimate parts of the comparison. A careful reader should nonetheless avoid interpreting them as a pure test of memory capacity with every other capability held constant.

The document prompts also establish different immediate circumstances. MemGPT is encouraged to keep searching because the answer exists in archival storage. The baseline must rely on its supplied documents and report insufficient information when appropriate.

The results therefore concern complete access arrangements. They do not show that the same gains would necessarily arise under every alternative retrieval policy, prompt, or summarization strategy.

#### Scale, cost, and policy remain open questions

The document evaluation uses 50 questions. That is evidence for the tested setting, but it leaves uncertainty about how broadly the observed behavior generalizes across question types and document collections.

The nested task uses 140 pairs and a limited range of nesting conditions. Its controlled structure is valuable for diagnosing continuation, but it does not reproduce the ambiguity of ordinary documents, where references and completion conditions may be harder to identify.

The paper does not provide a comprehensive comparison of total inference cost, end-to-end latency, or resource use for the full systems. Repeated processing is part of the method, so its practical cost cannot be inferred solely from database query speed.

Memory policies also remain incompletely explored. The threshold examples are not accompanied by a systematic optimization study. The work does not establish the best eviction rule, the best working-context selection policy, or the best stopping policy.

The authors themselves identify improved control flow, alternative storage technologies, and better management policies as future directions. The strongest supported conclusion is that this architecture is useful in the evaluated tasks, with substantial room to improve how its available memory is used.

### What came after

#### Memory became a continuing research topic

MemGPT’s later citation record spans agent memory, retrieval, personalization, interfaces, serving systems, and evaluation. That breadth is informative, but a citation alone does not establish that a later work adopted its storage hierarchy or reproduced its results.

The later titles establish the subjects being pursued. They do not supply detailed methods, numerical comparisons, or accounts of precisely how each work uses MemGPT. The relationships below therefore distinguish a clear research connection from an undocumented implementation claim.

[A-MEM](https://md.research.elamur.ai/free/en/papers/xu-2025-mem-agentic-memory-llm-agents/), listed for 2025, explicitly frames its subject as agentic memory. It belongs to the continuing question MemGPT makes concrete: how an agent can do more than passively retain a transcript. The citation connects it to that discussion, while the available description does not establish which MemGPT mechanisms it keeps or changes.

[Mem0](https://md.research.elamur.ai/free/en/papers/chhikara-2025-mem0-building-production-ready-ai/), also listed for 2025, places scalable long-term memory within the goal of production-ready agents. This extends the application-facing importance of the problem. MemGPT demonstrates a memory-management architecture; the later title foregrounds the demands of making persistent memory useful in deployed agents. Its specific solution and results cannot be inferred from that title.

[Memory OS](https://md.research.elamur.ai/free/en/papers/kang-2025-memory-os-ai-agent/) makes the operating-system connection explicit in its title. It is a particularly close conceptual neighbor because MemGPT organizes context through storage tiers and control operations. The relationship establishes continuity of the systems framing, without proving that the later work implements the same queue, functions, or storage split.

#### Later titles distinguish structure, time, and memory decisions

[Zep](https://md.research.elamur.ai/free/en/papers/rasmussen-2025-zep-temporal-knowledge-graph-architecture/) identifies a temporal [knowledge-graph](https://md.research.elamur.ai/free/en/concepts/knowledge-graph/) architecture for agent memory. The title places time and structured relationships at the center of its memory design. MemGPT’s account, by comparison, concentrates on tiered access to text and interaction records. The citation situates Zep within the same broader memory problem, but does not establish an experimental comparison.

[Memory-R1](https://md.research.elamur.ai/free/en/papers/yan-2026-memory-r1-enhancing-large-language/), listed for 2026, explicitly connects memory management and use with reinforcement learning. That topic addresses an open issue visible in MemGPT: access operations can exist while the agent still chooses poorly or stops too soon. The later title signals learning as the direction of investigation. It does not provide enough evidence to state which policy is learned or how much it improves.

[Memory as Action](https://md.research.elamur.ai/free/en/papers/zhang-2026-memory-as-action-autonomous-context/) frames context curation as something an agent does during extended tasks. This is closely related to MemGPT’s decision to make memory edits and retrieval executable operations. The conceptual connection is strong: context is treated as a changing workspace under agent control. The exact action representation and evaluation remain unspecified by the citation information.

[MemInsight](https://md.research.elamur.ai/free/en/papers/salama-2025-meminsight-autonomous-memory-augmentation-llm/) similarly names autonomous memory augmentation as its subject. It belongs to the line of inquiry in which memory content is actively maintained rather than simply accumulated. MemGPT provides an earlier concrete example of self-directed updates, while the later title alone does not reveal how the augmentation process differs.

#### Personalization keeps memory connected to interaction

[In Prospect and Retrospect](https://md.research.elamur.ai/free/en/papers/tan-2025-prospect-retrospect-reflective-memory-management/) focuses on reflective memory management for personalized dialogue over time. Its subject connects naturally with MemGPT’s separation between recalling an event and using personal information in conversation.

The later title also highlights reflection, while MemGPT’s evaluation concentrates on retrieval questions and openers. That is a useful distinction in research emphasis. It should not be expanded into a claim about a particular reflection mechanism without further evidence.

[Preference-Aware Memory Update](https://md.research.elamur.ai/free/en/papers/sun-2026-preference-aware-memory-update-long/) identifies updating preferences as a specific long-term memory problem. MemGPT already gives preferences a role in working context, but does not comprehensively study how a memory should respond when those preferences change. The later work’s title marks that maintenance question as an explicit focus.

[Semantic XPath](https://md.research.elamur.ai/free/en/papers/liu-2026-semantic-xpath-structured-agentic-memory/) names structured memory access for conversational systems. Its relevance lies in the access problem: storing information is useful only if a system can locate what matters. The citation record supports that thematic connection, while leaving the access language and its performance unspecified.

#### The surrounding systems questions also continued

[SWE-agent](https://md.research.elamur.ai/free/en/papers/yang-2024-swe-agent-agent-computer-interfaces/) places agent–computer interfaces at the center of automated software engineering. Its subject connects to MemGPT’s use of a carefully defined function interface: an agent’s environment determines which actions it can express and which feedback it receives. The citation does not show that SWE-agent adopts MemGPT’s memory hierarchy.

[LLMLingua-2](https://md.research.elamur.ai/free/en/papers/pan-2024-llmlingua-2-data-distillation-efficient/) studies efficient and faithful prompt compression through data distillation. Compression is an adjacent response to limited input space. MemGPT combines compressed historical orientation with access to original records, so the later work belongs to the broader question of what information should occupy a scarce prompt. The citation information supplies no direct performance comparison between these approaches.

[Mooncake](https://md.research.elamur.ai/free/en/papers/qin-2024-mooncake-kvcache-centric-disaggregated-architecture/) concerns a KVCache-centered serving architecture. Its systems setting differs from MemGPT’s management of application information. The shared citation context should not collapse those meanings of memory: serving infrastructure and persistent conversational evidence address different parts of a running system.

Finally, [A Survey on Evaluation of LLM-based Agents](https://md.research.elamur.ai/free/en/papers/yehudai-2026-survey-evaluation-llm-based-agents/) places agent assessment itself in focus. MemGPT’s experiments illustrate why that topic matters. Historical recall, proactive personalization, document grounding, and dependent lookup expose different behaviors. The later citation record shows those questions continuing across a broader research landscape, while the detailed conclusions of each citing work require evidence beyond its title.

## Cite

Cite as Charles Packer, Sarah Wooders, Kevin Lin, Vivian Fang, Shishir G. Patil, Ion Stoica and Joseph E. Gonzalez. 2023. MemGPT: Towards LLMs as Operating Systems. arXiv:2310.08560.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2310.08560](https://doi.org/10.48550/arxiv.2310.08560) · [arXiv 2310.08560](https://arxiv.org/abs/2310.08560)

```bibtex
@misc{packer2023memgpt,
  title = {{MemGPT: Towards LLMs as Operating Systems}},
  author = {Charles Packer, Sarah Wooders, Kevin Lin, Vivian Fang, Shishir G. Patil, Ion Stoica and Joseph E. Gonzalez},
  year = {2023},
  doi = {10.48550/arxiv.2310.08560},
  eprint = {2310.08560},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2310.08560}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
