Markdown Edit

Letta

Letta (formerly MemGPT) is an open-source framework and runtime for building stateful AI agents with persistent, self-editing memory. Drawing inspiration from traditional operating system memory hierarchies, Letta enables LLMs to function as operating systems that manage their own context windows through virtual memory paging, tool calls, and archival search.

graph TD
    subgraph "In-Context Working Memory"
        SystemPrompt[System Instructions & Persona]
        CoreMemory[Core Memory Block<br/>Persona & Human Profile]
        ConversationQueue[Active FIFO Context Queue]
    end

    subgraph "External Persistent Storage (Out-of-Context)"
        RecallStorage[(Recall Storage<br/>Full conversation history database)]
        ArchivalStorage[(Archival Storage<br/>Vector-indexed factual database)]
    end

    CoreMemory <-->|core_memory_append / replace| Agent[LLM Agent Loop]
    Agent <-->|conversation_search| RecallStorage
    Agent <-->|archival_memory_insert / search| ArchivalStorage

The OS Memory Paradigm

Standard LLMs face a fundamental tradeoff: they are limited by context window sizes and forget everything once a session closes. Letta resolves this via a multi-tiered memory architecture:

  1. Core Memory (In-Context):
  2. Recall Storage (Out-of-Context):
  3. Archival Storage (Out-of-Context):

Key Characteristics

CLI Quickstart

Install the Letta CLI:

npm i -g @letta-ai/letta-code

Start the Letta server and run a persistent agent:

letta run