Tools are functions your Agno Agents can use to get things done.
get_weather
function is a tool. When called, the tool result is shown in the output.Then, the Agent will stop after the tool call (without waiting for the model to respond) because we set stop_after_tool_call=True
.Toolkit
class provides a way to manage multiple tools with additional control over their execution.
You can specify which tools should stop the agent after execution and which should have their results shown.
GoogleSearchTools
toolkit is added to the agent. This ToolKit comes pre-configured with the google_search
function.
session_state
allows tools to access and modify persistent data across conversations.
This is useful in cases where a tool result is relevant for the next steps of the conversation.
Add session_state
as a parameter in your tool function to access the agent’s persistent state:
images
, videos
, audio
, and files
allows tools to access and modify the input media to an agent.
send_media_to_model
parameter, you can control whether the media is sent to the model or not and using store_media
parameter, you can control whether the
media is stored in the RunOutput
or not.str
, int
, float
, dict
, and list
:
ToolResult
for Media ContentToolResult
:
Parameter | Type | Default | Description |
---|---|---|---|
content | str | Required | Main text content/output from the tool |
images | Optional[List[Image]] | None | Generated image artifacts |
videos | Optional[List[Video]] | None | Generated video artifacts |
audios | Optional[List[Audio]] | None | Generated audio artifacts |