![]() |
VOOZH | about |
CrewAI provides agents with specialized tools to perform specific tasks like web scraping, file management, database interaction and image generation. These tools enable agents to collect and process data from websites, manage files efficiently, interact with databases and generate visual content. By integrating these tools, CrewAI agents can perform task-specific actions autonomously while maintaining context within collaborative workflows.
To begin, we need to install the crewai_tools package by running the following command:
pip install crewai_tools
We can list all the tools available in crewai_tools by running the following code:
Output:
AIMindTool
ApifyActorsTool
ArxivPaperTool
BraveSearchTool
BrightDataDatasetTool
BrightDataSearchTool
BrightDataWebUnlockerTool
...............
Each tool in CrewAI has detailed documentation. To explore the usage of any specific tool, such as ScrapeWebsiteTool, we can use the help() function in Python to view the tool’s description and available parameters. Here's an example of how to use it:
Output:
Help on class ScrapeWebsiteTool in module crewai_tools.tools.scrape_website_tool.scrape_website_tool:
class ScrapeWebsiteTool(crewai.tools.base_tool.BaseTool)
| ScrapeWebsiteTool(website_url: Optional[str] = None, cookies: Optional[dir......
Below are some popular tools in CrewAI, commonly used for tasks like web scraping, file management, database interaction and more.
is designed to combine retrieval and generation models. It first retrieves relevant documents from external sources and then generates meaningful responses by combining the retrieved data with the agent's built-in knowledge. This is useful when we need the agent to provide responses based on both prior knowledge and new data retrieved dynamically.
Output:
Using Tool: Knowledge base
Relevant Content:
Recent advancements in AI have focused on several key areas..........
Allows agents to extract and scrape content from websites. It works by scraping the raw HTML content of a page, extracting meaningful data from it.
Output:
Using Tool: Read website content
GeeksforGeeks | Your All-in-One Learning Portal Tutorials Courses Go Premium Data......
Helps agents retrieve relevant search results from the web. Unlike traditional scraping, it interacts directly with search engines (like Google) to pull search results in a structured format
Output:
Using Tool: Web Search Tool
Search Results:
{'searchParameters': {'q': 'What are the latest AI advancements?', 'type': 'sear...........
The File Read Tool allow agents to read files which is useful when dealing with persistent storage or managing local files. These tools help agents interact with file systems for data extraction and creation.
Output:
Using Tool: Read a file's content
Hello Geeks!
The DaLLE Tool is used to generate images based on textual descriptions. It integrates with OpenAI’s DALL-E model, allowing the agent to create unique and high-quality images from user-provided prompts.
Output:
Using Tool: Dall-E Tool
{"image_url": "https://oaidalleapiprodscus.blob.core.windows.net/priv..................