Memory & Context
What an agent sees on this turn, and what it remembers across them
- Turn
- Context
- Memory
- Retrieval
- Prompt
01
Overview
Context engineering decides what the model sees on each turn. Memory decides what survives between turns and sessions. Both are constrained by the same budget: the context window, and the latency of filling it.
Current turn
Short-term
Conversational context
this session
Long-term
Persistent user context
across sessions
On demand
Retrieved context
relevant knowledge
Context for the model
Conceptual.
02
Design Questions
- What stays in the prompt, and what is stored and retrieved?
- When is memory written — during the turn, or after it?
- How is relevant context chosen for this turn?
- How much context is worth its latency and token cost?