Class SessionMemoryClient

Object
akka.javasdk.impl.agent.SessionMemoryClient
All Implemented Interfaces:
SessionMemory

@InternalApi public final class SessionMemoryClient extends Object implements SessionMemory
INTERNAL USE Not for user extension or instantiation
  • Constructor Details

  • Method Details

    • addInteraction

      public void addInteraction(String sessionId, SessionMessage.UserMessage userMessage, List<SessionMessage> messages)
      Description copied from interface: SessionMemory
      Adds an interaction between a user and an AI model to the session history for the specified session.
      Specified by:
      addInteraction in interface SessionMemory
      Parameters:
      sessionId - The unique identifier for the contextual session
      userMessage - The content of the user message
      messages - All other messages generated during this interaction, typically AiMessage but also Tool Call responses.
    • getHistory

      public SessionHistory getHistory(String sessionId)
      Description copied from interface: SessionMemory
      Retrieves the complete session history for the specified session. For very long sessions, this might return a compacted version of the history.
      Specified by:
      getHistory in interface SessionMemory
      Parameters:
      sessionId - The unique identifier for the contextual session
      Returns:
      The complete session history containing all messages