A context compactor that prunes thought parts from older events in the session history. Preserves the causal history (actions and observations) while reducing token usage.
Compacts the context in place.
The current invocation context.
Determines whether the context should be compacted.
A boolean or a promise resolving to a boolean indicating if compaction should occur.
A context compactor that prunes thought parts from older events in the session history. Preserves the causal history (actions and observations) while reducing token usage.