Tools

Examples for callable tool factories, tool choice, tool call limits, and tools driven by runtime dependencies.

ExampleDescription
Callable Tools FactoryPass a function as tools instead of a list.
Session State ToolsUse session_state as a parameter name in your factory to receive the session state dict directly (no need for run_context).
Team Callable MembersPass a function as members to a Team.
Tool Call LimitUse tool call limit to control the number of tool calls an agent can make.
Tool ChoiceCompare tool_choice values none, auto, and a forced get_weather call across three agents.
Dependencies In ContextResolve a HackerNews fetch function as a runtime dependency and add its output to the agent's context.
Dependencies In ToolsExample showing how tools can access dependencies passed to the agent.
Dynamic ToolsBuild the tool list at runtime from a function that reads session state off the RunContext.
Tools with Literal Type ParametersUse typing.Literal for function parameters in Agno toolkits and standalone tools.