← Knowledge

MemGPT

OS-inspired architecture that lets language-model agents manage a limited context window as one tier in a larger memory hierarchy.

MemGPT is an architecture for giving language-model agents memory beyond a fixed context window. It treats active context as a scarce memory tier and gives the agent tools to move information between that context and external storage. The name refers to the operating-system analogy used by the original research: a model can manage virtual context in a way analogous to how an operating system manages virtual memory.

Architecture

The context window contains the information immediately available to the model. Other information can remain in external memory until the agent searches for or retrieves it. The agent can also revise or evict stored information as the interaction continues. This makes memory management part of the agent's behavior rather than a preprocessing step performed entirely outside the model.

The original paper evaluated MemGPT on multi-session conversation and document analysis. Its results showed how explicit memory operations could support interactions that exceeded the model's immediate context capacity.

Research lineage

MemGPT became the research foundation for Letta. Later Letta Code systems moved from specialized database memory tools toward git-backed context repositories that agents can manipulate through general computer-use tools. The durable question remained the same: how can an agent select and preserve the context that should shape future behavior?

Sources

  1. MemGPT: Towards LLMs as Operating Systems
  2. Letta research

Connections

Related

Linked here

Suggest a correction ↗