Sessions vs memory
Session history and memory solve different problems and can be used together.Identifiers
Pass both on every run.
session_id scopes conversation threads, while user_id scopes memory.
Memory: automatic or agentic
Reading memory back
For a profile screen or a debug view, pull a user’s memories directly.Long conversations
num_history_runs bounds the history that flows into context. It defaults to 3. Session summaries give the agent recall of the earlier thread on top of that bounded history.