compress

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

Extracts facts about each configured Concept from the current conversation history and replaces the prompt with a compressed version containing those facts.

Parameters

llmSession

The LLM write session used to issue fact-extraction requests and update the prompt.

memoryMessages

A list of memory messages to be preserved in the compressed prompt.