ShellTools enable an Agent to interact with the shell to run commands.

Example

The following agent will run a shell command and show contents of the current directory.

Mention your OS to the agent to make sure it runs the correct command.

cookbook/agent_concepts/tools/shell_tools.py
from agno.agent import Agent
from agno.tools.shell import ShellTools

agent = Agent(tools=[ShellTools()], show_tool_calls=True)
agent.print_response("Show me the contents of the current directory", markdown=True)

Functions in Toolkit

FunctionDescription
run_shell_commandRuns a shell command and returns the output or error.

Developer Resources