compress
open suspend override fun compress(llmSession: AIAgentLLMWriteSession, preserveMemory: Boolean, memoryMessages: List<Message>)(source)
Compresses the conversation history into a summarized form (TLDR) using chunked processing.
Parameters
llmSession
The session used to interact with the LLM, which maintains the prompt and tool states.
preserveMemory
A flag indicating whether to retain memory messages in the final prompt.
memoryMessages
A list of memory messages to be retained if preserveMemory is true.