compress

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

Compresses historical memory and retrieves facts about predefined concepts to construct a prompt containing the relevant information. This method generates fact messages for each concept and appends them to the composed prompt.

Parameters

llmSession

The local LLM write session used to retrieve facts and manage prompts.

memoryMessages

A list of existing memory-related messages to be included in the prompt.