nodeLLMCompressHistory

fun <T> AIAgentSubgraphBuilderBase<*, *>.nodeLLMCompressHistory(name: String? = null, strategy: HistoryCompressionStrategy = HistoryCompressionStrategy.WholeHistory, preserveMemory: Boolean = true): AIAgentNodeDelegateBase<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.

preserveMemory

Specifies whether to retain message memory after compression.