SlidingWindowConversationManagerConfig
type SlidingWindowConversationManagerConfig = { windowSize?: number; shouldTruncateResults?: boolean; proactiveCompression?: boolean | ProactiveCompressionConfig; pinFirst?: number;};Defined in: src/conversation-manager/sliding-window-conversation-manager.ts:86
Configuration for the sliding window conversation manager.
Properties
Section titled “Properties”windowSize?
Section titled “windowSize?”optional windowSize?: number;Defined in: src/conversation-manager/sliding-window-conversation-manager.ts:91
Maximum number of messages to keep in the conversation history. Defaults to 40 messages.
shouldTruncateResults?
Section titled “shouldTruncateResults?”optional shouldTruncateResults?: boolean;Defined in: src/conversation-manager/sliding-window-conversation-manager.ts:97
Whether to truncate tool results when a message is too large for the model’s context window. Defaults to true.
proactiveCompression?
Section titled “proactiveCompression?”optional proactiveCompression?: boolean | ProactiveCompressionConfig;Defined in: src/conversation-manager/sliding-window-conversation-manager.ts:106
Enable proactive context compression before the model call.
true: compress when 70% of the context window is used (default threshold).{ compressionThreshold: number }: compress at the specified ratio (0, 1].falseor omitted: disabled, only reactive overflow recovery is used.
pinFirst?
Section titled “pinFirst?”optional pinFirst?: number;Defined in: src/conversation-manager/sliding-window-conversation-manager.ts:112
Number of messages at the start of the conversation to permanently pin. Pinned messages are protected from eviction during context reduction.