compress

open suspend override fun compress(llmSession: AIAgentLLMWriteSession, memoryMessages: List<Message>)(source)

Compresses the conversation history by retaining the messages from the timestamp, generating a summary, and composing the resulting prompt with the necessary messages.

Parameters

llmSession

The session used for writing and managing the large language model's state.

memoryMessages

The list of memory messages that should be used or referenced during compression.