Module session

Module session 

Source
Expand description

High-level session management API

This module provides session management APIs for conversation handling:

  • SessionManager - Uses Database directly (existing API, backward compatible)
  • SessionManagerGeneric<B> - Uses StorageBackend trait (works with any backend)

§Features

  • Create and manage conversation sessions
  • Add user and assistant messages
  • Automatic context compilation for user queries
  • Format conversation history for LLM consumption
  • Debug and replay conversations

Structs§

SessionManager
High-level session management
SessionManagerGeneric
Backend-agnostic session manager
SessionReplay
Replay data for debugging
SessionTurn
A conversation turn (user query + optional assistant response)