跳转到内容

工具概览

CrewAI 提供了丰富的预构建工具库,用来增强你的 agents 能力。从文件处理到网页抓取,从数据库查询到 AI 服务,这里应有尽有。

需要某个特定工具?这里列出一些常用选择:

在 CrewAI 项目中使用任意工具:

  1. 导入 该工具到你的 crew 配置中
  2. 添加 到 agent 的 tools 列表
  3. 配置 所需的 API keys 或设置
from crewai_tools import FileReadTool, SerperDevTool
# 将工具添加到你的 agent
agent = Agent(
role="Research Analyst",
tools=[FileReadTool(), SerperDevTool()],
# ... other configuration
)

你可以为工具设置最大使用次数,防止它被使用超过指定的次数。 默认情况下,最大使用次数不受限制。

from crewai_tools import FileReadTool
tool = FileReadTool(max_usage_count=5, ...)

准备好探索了吗?选择上方某个分类,看看适合你用例的工具!