Without tools, agents can only use what the model already knows; tools give them fresh data and actions.
A tool is a function an agent can ask to run, using the model's tool calling. The agent reads each tool's name and description, decides whether to call it, and gets the result back as text before continuing.
The crewai-tools package (install with crewai[tools]) has dozens of ready-made tools, for example:
SerperDevTool,BraveSearchTool,TavilySearchTool: web search (each needs that service's API key).ScrapeWebsiteTool: read the text of a web page.FileReadTool,FileWriterTool,DirectoryReadTool: work with local files.- Search tools over one source, such as
PDFSearchToolorWebsiteSearchTool, which do RAG over that source.
Attach tools to an agent (tools=[...]) to make them available for every task, or to a task to limit them to that task. Task tools replace the agent's tools for that task.
Tips:
- Give each agent only the tools it needs. Many overlapping tools confuse tool selection and waste tokens.
- Tool results are cached by default (
cache=Trueon the agent), so identical calls are not repeated in one run. - Agents can also use tools from MCP servers (Model Context Protocol, a standard way for apps to expose tools to AI) through the agent's
mcpssetting. - Treat tool output as untrusted: a scraped web page can contain text that tries to give your agent instructions.
In JSONC projects you list built-in tools by class name, such as "tools": ["SerperDevTool"].
Example
# pip install "crewai[tools]"; SERPER_API_KEY in .env
from crewai import Agent, Crew, Task
from crewai_tools import ScrapeWebsiteTool, SerperDevTool
search = SerperDevTool()
scrape = ScrapeWebsiteTool()
researcher = Agent(
role="Web researcher",
goal="Answer questions with current information from the web",
backstory="You search first, then read the best sources before answering.",
tools=[search, scrape], # available in every task of this agent
)
task = Task(
description="What did the latest Python release add? Cite URLs.",
expected_output="5 bullets, each ending with a source URL.",
agent=researcher,
)
print(Crew(agents=[researcher], tasks=[task]).kickoff().raw)Remember
- Tools are functions the agent may call via tool calling
- Add them per agent, or per task to restrict them
- Fewer, well-chosen tools give better tool selection
Watch out for
- Giving every agent every tool "just in case", which raises cost and makes agents pick the wrong tool.