compress
abstract suspend fun compress(llmSession: AIAgentLLMWriteSession, preserveMemory: Boolean, memoryMessages: List<Message>)(source)
Compresses a given collection of memory messages using a specified strategy.
Parameters
llmSession
The current LLM session used for processing during compression.
preserveMemory
A flag indicating whether parts of the memory should be preserved during compression.
memoryMessages
A list of messages representing the memory to be compressed.