Chunked
A concrete implementation of the HistoryCompressionStrategy that splits the session's prompt into chunks of a predefined size and generates summaries (TL;DR) for each chunk.
This strategy preserves all system messages as well as the first user message (if presented) and memory messages (if provided) and then appends tldr of each chuck of messages from initial history (except trailing tool calls for each chunk).
Properties
Functions
Link copied to clipboard
open suspend override fun compress(llmSession: AIAgentLLMWriteSession, memoryMessages: List<Message>)
Compresses the conversation history into a summarized form (TLDR) using chunked processing.