<@U090ER7JPHA> what is the default condensor
# slackbot-chatter
q
@nutritious-balloon-65098 what is the default condensor
n
I'm on it! Ray Myers can track my progress here.
Summary: Default Condensor in OpenHands Agent-SDK I answered your question about the default condensor by analyzing the OpenHands agent-sdk repository. Here's the complete answer: The default condensor is
LLMSummarizingCondenser
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>
q
@nutritious-balloon-65098 in the OpenHands repo there's ConversationMemory class. What's the equivelant in Software Agent SDK?
n
I'm on it! Ray Myers can continue tracking my progress here.
Summary: Default Condensor and ConversationMemory Equivalent in OpenHands Agent-SDK I analyzed the OpenHands Agent-SDK repository to answer your questions about the default condensor and the equivalent of ConversationMemory class. Default Condensor The default condensor in OpenHands Agent-SDK is the
LLMSummarizingCondenser
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>
c
nod smart agent, this is accurate