MemGPT: Towards LLMs as Operating Systems
By Charles Packer, Vivian Fang, Shishir G. Patil, Kevin Lin, Sarah Wooders, Joseph E. Gonzalez. arXiv.org, 2023
960 citations recorded by the source corpus.
Large language models (LLMs) have revolutionized AI, but are constrained by limited context windows, hindering their utility in tasks like extended conversations and document analysis. To enable using context beyond limited context windows, we propose virtual context management, a technique drawing inspiration from hierarchical memory systems in traditional operating systems that provide the appearance of large memory resources through data movement between fast and slow memory. Using this technique, we introduce MemGPT (Memory-GPT), a system that intelligently manages different memory tiers in order to effectively provide extended context within the LLM's limited context window, and utilizes interrupts to manage control flow between itself and the user. We evaluate our OS-inspired design in two domains where the limited context windows of modern LLMs severely handicaps their performance: document analysis, where MemGPT is able to analyze large documents that far exceed the underlying LLM's context window, and multi-session chat, where MemGPT can create conversational agents that remember, reflect, and evolve dynamically through long-term interactions with their users. We release MemGPT code and data for our experiments at https://memgpt.ai.
Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Information Systems and Management
View Paper: https://www.semanticscholar.org/paper/908dad62c0e43d80e3e3cb3c0402f7c71c70499c
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Vineet Kosaraju
- Matei A. Zaharia
- Kurt Keutzer
- Defu Lian
- Ahmed Hassan Awadallah
- Jerry Tworek
- Xingmei Wang
- Xiaolong Chen
In Computer Vision and Pattern Recognition
- Matei A. Zaharia
- Vineet Kosaraju
- Kurt Keutzer
- Defu Lian
- Ahmed Hassan Awadallah
- Jerry Tworek
- Rishabh Tiwari
- Enhong Chen
In Information Systems and Management
Citations in the corpus
- Retrieval-Augmented Generation for Large Language Models: A Survey (2023, background): “With ongoing efforts to expand LLM context windows to virtually unlimited sizes, the adaptation of RAG to these changes presents a significant research question [Xu et al. , 2023c, Packer et al. , 2023, Xiao et al. , 2023].”
- A Survey on the Memory Mechanism of Large Language Model-based Agents (2024, neutral): “Zhao et al. [225] and Chen et al. [16] empower domain knowledge by fine-tuning in Chemistry and structured materials, respectively.”
- Understanding the planning of LLM agents: A survey (2024, methodology): “MemGPT [Packer et al. , 2023 ] leverages the concept of multiple levels of storage in computer architecture, abstracting the context of LLM into RAM and treating the additional storage structure as a disk.”
- AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation (2023, positive): “With AutoGen , we enabled two essential features: (1) Natural, flexible, and engaging game dynamics, enabled by the customizable agent design in AutoGen .”
- Why Do Multi-Agent LLM Systems Fail? (2025, positive): “MemGPT (Packer et al., 2023) introduces OS-inspired context management for an extended context window, while TapeAgents (Chakraborty & Purkayastha, 2023) use a structured, replayable log (“tape”) to iteratively document and refine agent actions, facilitating dynamic task decomposition and…”
- A-MEM: Agentic Memory for LLM Agents (2025, neutral): “The system’s design emphasizes atomic note-taking, flexible linking mechanisms, and continuous evolution of knowledge structures.”
- LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compression (2024, methodology): “Summarization-based methods are also leveraged for task-agnostic compression (Chen et al., 2023; Packer et al., 2023).”
- Constrained Dominant Sets for Multimodal Document Question Answering (2026, unknown): “The candidate set is constructed following the approach of agentic memory systems, such as MemGPT [39], MemoryBank [40], and A-MEM [26], where each document element is transformed into a memory note enriched with summaries, keywords, tags, and explicit links.”
- ER-MIA: Black-Box Adversarial Memory Injection Attacks on Long-Term Memory-Augmented Large Language Models (2026, unknown): “Researchers have equipped LLMs with long-term or persistent memory systems to overcome the finite context window of LLMs (Packer et al., 2023; Maharana et al., 2024).”
- Retrieval And Structuring Augmented Generation with Large Language Models (2025, unknown): “Despite increasing context windows in modern LLMs, RAG maintains importance through efficiency, transparency, and domain adaptability [194, 262].”