late-queen-51746
11/15/2025, 1:54 AMchilly-france-44439
11/15/2025, 3:17 AMCondensationRequest to the system
a. To achieve this, we should add .condense method to BaseConversation class - this should just be adding a CondensationRequest to the state.eventsnutritious-balloon-65098
11/15/2025, 3:17 AMnutritious-balloon-65098
11/15/2025, 3:21 AMLLMSummarizingCondenser assumes linear relationship between event count and token length
◦ Breaks down with variable-length events (e.g., PDF parsing adding entire books in one event)
◦ Events stay saturated at max_size cap, limiting user control
2. Proposed Solution:
◦ Decouple condensation from event count: Set unlimited/high event limit, trigger only on:
▪︎ LLM context window exceeded (automatic CondensationRequest)
▪︎ User manual request (new .condense() method)
◦ Add .condense() method to BaseConversation class: Simple method that adds CondensationRequest() to state.events
3. Implementation Tasks:
◦ Add abstract method to BaseConversation
◦ Implement in LocalConversation and RemoteConversation
◦ Add tests for manual condensation
◦ Update documentation and examples
◦ Consider UI integration (future enhancement)
4. Benefits:
◦ Better token management based on actual context usage
◦ User control for manual triggering
◦ More flexible conversation handling with variable-length events
◦ Backward compatible
5. Related Files: Listed all relevant files for implementation
6. Open Questions: Raised design questions about defaults, optional parameters, and sync vs async behavior
The issue has been properly labeled with enhancement, conversation, and context-management tags and is now ready for team review and implementation.
<sub>View full conversation</sub>chilly-france-44439
11/15/2025, 3:35 AM