Skip to main content
Memory examples enact the trade-off between recall, cost, and latency. Sources under examples/memory/.

How to run

Pick a starting point

  • First time? memory_types shows all three variants on the same conversation, side by side.
  • Long sessions? memory_summary_buffer is the right default — buffer keeps recent turns, summary keeps the long-tail facts.
  • Knowledge-graph use cases? memory_knowledge_graph for triple-shaped memory across sessions.

See also

Memory guide

All variants explained, when to reach for each.

Patterns → Stateful chat

Memory + persistence in a real chat backend.