quiet-night-61895
11/14/2025, 4:50 PMnutritious-balloon-65098
11/14/2025, 4:51 PMnutritious-balloon-65098
11/14/2025, 4:52 PMLLMSummarizingCondenser with the following configuration:
Key Details:
• Location: Defined in /openhands-tools/openhands/tools/preset/default.py
• Configuration: max_size=80, keep_first=4
• Purpose: Automatically manages conversation context by summarizing older parts when history exceeds 80 events
How It Works:
1. Triggers: When conversation history exceeds 80 events or on explicit condensation requests
2. Strategy: Keeps first 4 events (system prompts), recent events from tail, and summarizes middle events
3. Smart Summarization: Uses LLM with sophisticated prompt template that:
◦ Preserves task tracking continuity (task IDs and statuses)
◦ Maintains user context, completed/pending tasks, current state
◦ Adapts to different task types (code vs. other tasks)
◦ Tracks version control status, file paths, test results
Benefits:
• Prevents context window overflow in long conversations
• Intelligently summarizes rather than truncating
• Maintains task workflow continuity
• Works automatically without user intervention
• Reduces token usage while preserving essential context
Alternatives Available:
• `NoOpCondenser`: Returns views unmodified (for testing)
• `PipelineCondenser`: For chaining multiple condensors
The default condensor is designed to be robust and intelligent, ensuring long-running conversations remain manageable while preserving the most important contextual information for continued agent effectiveness.
No code changes were made - this was purely an informational query about the existing system architecture.
<sub>View full conversation</sub>quiet-night-61895
11/14/2025, 4:57 PMnutritious-balloon-65098
11/14/2025, 4:57 PMnutritious-balloon-65098
11/14/2025, 5:00 PMLLMSummarizingCondenser with these default settings:
• max_size=80 (maximum number of events before condensation triggers)
• keep_first=4 (number of initial events to always preserve)
This condensor is automatically configured when you create an Agent without explicitly specifying a condenser. It uses an LLM to intelligently summarize conversation history when the event count exceeds the threshold, helping manage context window limits while preserving important information.
ConversationMemory Equivalent
The equivalent of ConversationMemory from the main OpenHands repository is the LLMConvertibleEvent.events_to_messages() static method combined with the condenser system.
Key differences in architecture:
1. OpenHands V0 (main repo): Uses ConversationMemory.process_events() to convert event history into LLM messages, handling tool calls, message formatting, and conversation flow.
2. Agent-SDK V1: Uses a more modular approach:
◦ LLMConvertibleEvent.events_to_messages() handles the core conversion of events to LLM messages
◦ Condenser system (View + condensers) manages context window and history summarization
◦ Agent.step() orchestrates the process by getting condensed events and converting them to messages
The Agent-SDK approach is more flexible and modular, separating concerns between event-to-message conversion and context management, while the original ConversationMemory was a monolithic class handling both responsibilities.
Both systems achieve the same goal: converting agent event history into properly formatted LLM message sequences while managing context limits and maintaining conversation coherence.
<sub>View full conversation</sub>calm-artist-7206
11/14/2025, 6:22 PM