Skip to content

CompactionResult

Defined in: agent/compaction/strategy.ts:35

Result of a compaction operation.

messages: LLMMessage[]

Defined in: agent/compaction/strategy.ts:37

Compacted messages to replace history with


metadata: object

Defined in: agent/compaction/strategy.ts:43

Metadata about the compaction

compactedCount: number

Number of messages after compaction

originalCount: number

Number of messages before compaction

tokensAfter: number

Estimated tokens after compaction

tokensBefore: number

Estimated tokens before compaction


strategyName: string

Defined in: agent/compaction/strategy.ts:41

The name of the strategy that was ultimately executed


optional summary: string

Defined in: agent/compaction/strategy.ts:39

Summary text if summarization was used