liveBook · Manning

External memory

As explained in Context Engineering

Non-parametric memory is information outside a model that can be saved, retrieved, and updated at runtime.

External memory, or non-parametric memory, is information stored outside a model that an agent system can save, retrieve, and update at runtime. Relevant entries are injected into the context window when needed, giving otherwise independent model calls continuity across turns and sessions. section 5.1 section 1.5.4

Unlike parametric memory embedded in model weights during training, external memory can accommodate evolving, user-specific, and task-dependent information. The application controls which information is written, retrieved, and expired. section 5.1 section 1.5.4

External memory uses two storage tiers and surfaces selected information in context:

  • Ephemeral storage holds current work, including session objects and scratchpads for intermediate results. A curated view of the session is replayed on each call. section 5.1 section 1.5.4
  • Persistent storage retains useful information across sessions in databases, vector databases, knowledge graphs, or files. The agent queries the store, and matching entries enter the context window. section 5.1 section 1.5.4
  • A load brings persistent information into the running task; promotion writes a value from ephemeral work back for durable use. State, by contrast, represents the current status of an active workflow. section 5.1 section 5.6

Remembering a flight preference

During a session, an agent retains a user's preference for evening flights in short-term memory and applies it several turns later. If the preference is saved to persistent storage, the agent can retrieve it in a later session and use it when proposing flights. section 1.5.4

Memory management requires selective retrieval, compression, controlled writing, and consolidation. Safeguards are also needed against stale, conflicting, or poisoned memories. section 5.6

Figure 5.1 Memory in an AI agent: parametric memory inside the model, and non-parametric memory kept in persistent and ephemeral storage, surfaced in the context window as long-term memory, short-term memory, and state
memory v9

The diagram connects persistent and ephemeral storage to the memory and state blocks surfaced in an agent's context window. section 5.1

How Context Engineering covers it

How deep it goes
Explains storage tiers, context selection, load and promotion, and management practices without specifying an implementation.
Examples
Illustrates session and cross-session recall with a user's evening-flight preference.
What you can do after
Evaluate how external memory supports agent continuity and which information enters the context window.
How it connects
Connects parametric memory, short-term memory, long-term memory, state, and the context window.

Also explained in

Compare how 2 books explain external memory →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Context Engineering. The section links point to the parts of the book it draws on.