compress
open suspend override fun compress(llmSession: AIAgentLLMWriteSession, preserveMemory: Boolean, memoryMessages: List<Message>)(source)
Compresses and adjusts the prompt for the local agent's write session by summarizing and incorporating memory messages optionally.
Parameters
llmSession
The current session of the local agent which allows prompt manipulation and sending requests.
preserveMemory
A flag indicating whether memory messages should be preserved during compression.
memoryMessages
A list of memory messages to be optionally preserved and included in the prompt.