ShellTools enable an Assistant to interact with the shell.


The following assistant will run a shell command and show contents of the current directory. Note: Mention your OS to the assistant to make sure it runs the correct command.

from phi.assistant import Assistant
from import ShellTools

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

Functions in Toolkit


Runs a shell command and returns the output or error.