Skip to content

< CollectionsPaper

MemGPT.

MemGPT: Towards LLMs as Operating Systems

Packer et al. · 2023 · arXiv 2310.08560

Read the paper (opens in a new tab)

Treat the context window like main memory, and page what does not fit out to storage the agent manages itself.

4 sections · 7 problems

0 of 7 done

Start Next: 01 Stay Under the Token Budget

Fig. 1. Messages fill a context window of five. Each new one pages the oldest out to archival storage, and when the agent needs an old one, it searches and pages it back in.

Section 01

A window that fills

0 of 2

The paper: The context window is fixed, so a long conversation has to be managed or it overflows.

  1. 01Stay Under the Token Budgetoptimize · medium
  2. 02Trim the Conversation, Keep the System Promptimplement · medium

Section 02

Summarise on eviction

0 of 1

The paper: When the window is nearly full, the oldest messages are evicted and folded into a running summary.

  1. 03Compact a Long Conversation Without Losing the Decisionimplement · medium

Section 03

Memory the agent edits

0 of 2

The paper: The agent writes facts to its own memory with function calls, and searches them back when it needs them.

  1. 04Remember What Mattersimplement · medium
  2. 05Hand Retrieval to the Model as a Toolimplement · medium

Section 04

Larger than the window

0 of 2

The paper: A document bigger than the context is read by paging through it.

  1. 06Answer Over a Context That Does Not Fitimplement · hard
  2. 07Answer From a Repo That Does Not Fitimplement · hard
All collections