v2.2.1

October 23, 2025

Optimize performance and control costs in long-running conversations

Keep context relevant and token usage low by limiting tool calls from history. The max_tool_calls_from_history parameter helps optimize performance for long-running conversations by keeping only the most recent tool interactions in context while maintaining complete history in your database.

from agno import Agent

agent = Agent(
    max_tool_calls_from_history=3,  # Only load last 3 tool calls
    add_history_to_context=True
)

This is essential for production deployments where managing context windows and controlling costs are critical.

View docs on managing tool calls.