Welcome to crewAI Tools! This repository provides a comprehensive guide for setting up sophisticated tools for crewAI agents, empowering your AI solutions with bespoke tooling.
In the realm of CrewAI agents, tools are pivotal for enhancing functionality. This guide outlines the steps to equip your agents with an arsenal of ready-to-use tools and the methodology to craft your own.
crewAI Tools provides a wide range of pre-built tools, including:
- File operations (FileWriterTool, FileReadTool)
- Web scraping (ScrapeWebsiteTool, SeleniumScrapingTool)
- Database interactions (PGSearchTool, MySQLSearchTool)
- API integrations (SerperApiTool, EXASearchTool)
- AI-powered tools (DallETool, VisionTool)
- And many more!
For a complete list and detailed documentation of each tool, please refer to the individual tool README files in the repository.
Tools are always expect to return strings, as they are meant to be used by the agents to generate responses.
There are three ways to create tools for crewAI agents:
from crewai_tools import BaseTool
class MyCustomTool(BaseTool):
name: str = "Name of my tool"
description: str = "Clear description for what this tool is useful for, you agent will need this information to use it."
def _run(self, argument: str) -> str:
# Implementation goes here
passDefine a new class inheriting from BaseTool, specifying name, description, and the _run method for operational logic.
For a simpler approach, create a Tool object directly with the required attributes and a functional logic.
from crewai_tools import tool
@tool("Name of my tool")
def my_tool(question: str) -> str:
"""Clear description for what this tool is useful for, you agent will need this information to use it."""
# Function logic hereThe tool decorator simplifies the process, transforming functions into tools with minimal overhead.
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please ensure your code adheres to our coding standards and includes appropriate tests.
Installing Dependencies:
uv syncActivating Virtual Environment:
uv venv
source .venv/bin/activateSetting Up Pre-commit Hooks:
pre-commit installRunning Tests:
uv run pytestStatic Type Checking:
uv run pyrightPackaging:
uv buildLocal Installation:
pip install dist/*.tar.gzThank you for your interest in enhancing the capabilities of AI agents through advanced tooling. Your contributions make a significant impact.
For questions or support, please join our Discord community or open an issue in this repository.