CompactionSettings
Determines how an agent compacts its conversation history.
Shape: object
| Property | Required | Type | Description | Rules |
|---|---|---|---|---|
strategy |
no | CompactionStrategyKind |
Gets the strategy to apply. | — |
triggerTokens |
no | integer (int32) |
Gets the token count above which compaction is triggered. | pattern `^-?(?:0\ |
triggerMessages |
no | integer (int32) |
Gets the message count above which compaction is triggered. | pattern `^-?(?:0\ |
triggerTurns |
no | integer (int32) |
Gets the turn count above which compaction is triggered. | pattern `^-?(?:0\ |
minimumPreservedTurns |
no | integer (int32) |
Gets the minimum number of turns kept for CompactionStrategyKind.SlidingWindow. 2 is used when it is not given. | pattern `^-?(?:0\ |
minimumPreservedGroups |
no | integer (int32) |
Gets the minimum number of groups kept for CompactionStrategyKind.Truncation, CompactionStrategyKind.ToolResult and CompactionStrategyKind.Summarization. 4 is used when it is not given. | pattern `^-?(?:0\ |
maxContextWindowTokens |
no | integer (int32) |
Gets the context window size. It is required for CompactionStrategyKind.ContextWindow and ignored by the other strategies. | pattern `^-?(?:0\ |
maxOutputTokens |
no | integer (int32) |
Gets the upper output token limit for CompactionStrategyKind.ContextWindow. When it is not given, ModelBinding.MaxOutputTokens from the agent’s own model binding is used, and 4096 when that is missing too. |
pattern `^-?(?:0\ |
summarizationPrompt |
no | string |
Gets the extra instruction added to the summarization prompt for CompactionStrategyKind.Summarization and CompactionStrategyKind.Pipeline. When null the default prompt of MAF is used. |
— |
summarizationModel |
no | null oneOf ModelBinding |
— | — |