示例
以下 Agent 将运行一个 shell 命令,并显示当前目录的内容。请告知 Agent 您的操作系统,以确保它运行正确的命令。
cookbook/tools/shell_tools.py
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
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)
| Function | Description |
|---|---|
run_shell_command | 运行一个 shell 命令并返回输出或错误。 |