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

Key Behavior

  • Uses BM25 by default for history retrieval
  • Supports messages and grouped_chat strategies
  • 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.


Sage documentation for the current repository layout. Source available under the MIT license.

This site uses Just the Docs, a documentation theme for Jekyll.