nodeLLMCompressHistory
inline fun <T> AIAgentSubgraphBuilderBase<*, *>.nodeLLMCompressHistory(name: String? = null, strategy: HistoryCompressionStrategy = HistoryCompressionStrategy.WholeHistory, retrievalModel: LLModel? = null, preserveMemory: Boolean = true): AIAgentNodeDelegate<T, T>(source)
A node that compresses the current LLM prompt (message history) into a summary, replacing messages with a TLDR.
Parameters
name
Optional node name.
strategy
Determines which messages to include in compression.
retrievalModel
An optional LLModel that will be used for retrieval of the facts from memory. By default, the same model will be used as the current one in the agent's strategy.
preserveMemory
Specifies whether to retain message memory after compression.