v2.2.4
October 29, 2025
Granular history message control now available
Keep your agent conversations efficient and relevant by controlling how much history is loaded. With num_history_messages, you can now fine-tune exactly how many messages from previous sessions are included in context.
from agno.agent import Agent
agent = Agent(
num_history_messages=10, # Only load last 10 messages from history
add_history_to_context=True
)
This helps manage context window size and optimize token usage in long-running conversations.
Learn more in the sessions documentation.
