Class CompactionOptions
- Namespace
- Emissary
- Assembly
- Emissary.dll
Client-side context compaction: when a turn's input grows past TriggerInputTokens, Emissary summarizes the older part of the conversation and replaces it with that summary, so long-running agents survive past the context window.
public sealed class CompactionOptions
- Inheritance
-
CompactionOptions
- Inherited Members
Remarks
Compaction is performed by Emissary (one extra model call), not by the server, so it appears in trajectories, replays deterministically, and is visible as an AgentCompactedEvent — the auditability the server-side alternative cannot offer.
Properties
KeepRecentMessages
How many recent messages to preserve verbatim. The real boundary is the nearest older assistant message, so tool-call/result pairs are never split. Default 6.
public int KeepRecentMessages { get; set; }
Property Value
SummaryInstruction
The instruction given to the model when summarizing the older messages.
public string SummaryInstruction { get; set; }
Property Value
TriggerInputTokens
Compact before the next model call once a response reports more input tokens than this. null (the default) disables compaction.
public int? TriggerInputTokens { get; set; }
Property Value
- int?