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/tools/shell_tools.py
Copy
Ask AI
from phi.agent import Agentfrom phi.tools.shell import ShellToolsagent = Agent(tools=[ShellTools()], show_tool_calls=True)agent.print_response("Show me the contents of the current directory", markdown=True)