JustujuAI, layer by layer.Open in the interactive map

Memory

How an AI application remembers beyond one call: short-term memory in the context window, long-term memory in stores it saves to and searches.

Layer 7 · Orchestration & Tooling · Run time · Draft, awaiting expert review, reviewed 2026-10-02

Read first: Context engineering.

D1 · StoryFor young children and total beginners

Guess first: does the model itself remember yesterday's chat?

The AI forgets everything when a chat ends. To remember you, the app writes notes in a notebook.

Next time, it reads the useful notes back to the AI before you start talking.

Like: A notebook the helper reads before each visit.

D2 · PictureFor curious beginners

The model's weights do not change while you chat, so all memory lives in the application.

Short-term memory is the conversation inside the context window. When it gets too long, older turns are dropped or summarised.

Long-term memory is a store outside the model: facts, preferences and past summaries saved to a file or database, then searched and loaded back into the context when relevant.

A memory loop across sessions

  1. Recall: search the store
  2. Load: into context
  3. Chat: short-term memory
  4. Summarise: what mattered
  5. Save: to long-term store

Like: A notebook the helper reads before each visit.
Where it breaks: A person decides what is worth writing down and notices when a note is out of date. An AI memory system can save wrong or stale facts, or even planted instructions, and then trust them later.

D5 · FrontierFor experts

Hard parts: deciding what to save and what to forget, keeping memories correct as facts change, and stopping injected text from becoming a lasting memory.

Summaries lose detail, and there is no agreed way yet to test whether long-term memory makes an assistant better or just more confident.

Sources

  1. MemGPT: Towards LLMs as Operating Systems (2023)
  2. Generative Agents: Interactive Simulacra of Human Behavior (2023)
  3. Cognitive Architectures for Language Agents (CoALA) (2023)