SDKv2.2.1
Cap historical tool calls to control context size and spend
Agno Team
October 24, 20251 min read
A new parameter, max_tool_calls_from_history, lets you cap how many historical tool call pairs are loaded into context. This keeps token usage predictable, reduces costs, and lowers the risk of hitting context limits — especially for long-running sessions and tool-heavy agents.
Details
- Configurable at the agent, team, and workflow level
- Improves latency and reliability by preventing context bloat
- Backward compatible: defaults remain unchanged unless you set it
Who this is for: Platform owners and engineering teams running multi-turn or high-volume automations who need tighter cost and performance control.