Context memory

What the LLM literally sees this turn. Bounded by the model's context window (32K, 200K, 2M depending on model). Every token here costs money.

Advertisement

Session memory

The conversation history + any state accumulated during this session. Persists as long as the session is alive. Can be much larger than context — you sample from it.

Advertisement

Long-term memory

Cross-session knowledge about the user or domain. Persists indefinitely. Retrieved by query (semantic search, key lookup).