Session Memory
Session memory is Sage’s short-term memory layer. It manages message history organization, compression, and retrieval within a single session.
Scope
- Unit: one session
- Contents: historical messages, turns, compression results
- Lifecycle: lives with the session; not persisted as long-term memory
Runtime Components
- SessionMemoryManager
MessageManagerContextBudgetManager
Key Behavior
- Uses BM25 by default for history retrieval
- Supports
messagesandgrouped_chatstrategies - Selectively stitches history into prompts before LLM calls
Why It Is Memory
Session memory is the short-term context the Agent actively uses. It decides what to keep, what to compress, and what to recall during the current conversation.