Expand description
Conversation compaction — keep the working context small enough to fit.
Two levels of compaction are provided:
message_truncation— per-message truncation.history_summary— history-level summarisation.
The runtime applies both during turns started by AgentRuntime.
Re-exports§
pub use history_summary::HistoryCompactionStrategy;pub use history_summary::SummaryHistoryCompaction;pub use message_truncation::ContentCompressor;pub use message_truncation::MessageTruncationConfig;pub use message_truncation::MessageTruncationResult;pub use message_truncation::TruncationCompressor;pub use message_truncation::truncate_message;
Modules§
- history_
summary - History-level compaction: summarises old messages to keep token usage under budget.
- message_
truncation - Message-level truncation: cap oversized text, thinking, and tool-result fields.