Interface SummarizationStrategy

All Known Implementing Classes:
ModelSummarizationStrategy

public interface SummarizationStrategy
Strategy for the session:compact action.

Receives the current conversation buffer + any prior rolling summary, and returns the new summary text. The caller is responsible for clearing / truncating AgentState.context and persisting the result — this interface only owns the "what should the new summary say" decision.

  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Mono<String>
    summarize(io.agentscope.core.model.Model model, String existingSummary, List<io.agentscope.core.message.Msg> messagesToFold)
    Produce a new rolling summary.
  • Method Details

    • summarize

      reactor.core.publisher.Mono<String> summarize(io.agentscope.core.model.Model model, String existingSummary, List<io.agentscope.core.message.Msg> messagesToFold)
      Produce a new rolling summary.
      Parameters:
      model - the model to use (must not be null)
      existingSummary - the prior summary, or empty string when none
      messagesToFold - the messages currently in the agent context — typically everything except the last keepLastMessages that the caller will retain verbatim
      Returns:
      the new summary text