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
  • Main-session compaction uses persistent model-generated summaries only. It does not truncate message or tool content and does not create context artifacts.
  • The summarizer never receives reasoning_content; reasoning remains in the durable ledger but is discarded from the compaction prompt.

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.