# CompactionStrategyKind

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.compactionstrategykind/
> Summary: CompactionStrategyKind: The kind of context compaction strategy that can be bound to an agent definition.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

The kind of context compaction strategy that can be bound to an agent definition.

```csharp
[JsonConverter(typeof(JsonStringEnumConverter<CompactionStrategyKind>))]
public enum CompactionStrategyKind
```

## Fields

`ContextWindow = 5` 

Evicts or truncates automatically against the model context window limit.

`None = 0` 

No compaction. The default.

`Pipeline = 6` 

Applies a fixed chain: ToolResult, then SlidingWindow, then Summarization.

`SlidingWindow = 1` 

Drops the oldest turns while keeping their count above a lower bound.

`Summarization = 4` 

Summarizes the excluded groups with a model.

`ToolResult = 3` 

Shortens only the tool call and tool result groups.

`Truncation = 2` 

Truncates the excluded groups down to a fixed lower bound.
