HistoryCompressionStrategy

Represents an abstract strategy for compressing the history of messages in a AIAgentLLMWriteSession. Different implementations define specific approaches to reducing the context size while maintaining key information.

Example implementations:

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Companion object for HistoryCompressionStrategy with easy access to default implementations.

Functions

Link copied to clipboard
abstract suspend fun compress(llmSession: AIAgentLLMWriteSession, memoryMessages: List<Message>)

Compresses a given collection of memory messages using a specified strategy.