Skip to main content

Set of tools for the crewAI framework

Project description

Logo of crewAI, two people rowing on a boat

crewAI Tools

This document provides a comprehensive guide for setting up sophisticated tools for crewAI agents, facilitating the creation of bespoke tooling to empower your AI solutions.

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.

Homepage | Documentation | Chat with Docs | Examples | Discord

Table of contents

Creating Your Tools

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:

Subclassing 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:
        # Implementation goes here
        pass

Define a new class inheriting from BaseTool, specifying name, description, and the _run method for operational logic.

Functional Tool Creation

my_tool = Tool(
    name="Name of my tool"
    description="Clear description for what this tool is useful for, you agent will need this information to use it.",
    func=lambda argument: # Your function logic here
)

For a simpler approach, create a Tool object directly with the required attributes and a functional logic.

Utilizing the tool Decorator

@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 here

The tool decorator simplifies the process, transforming functions into tools with minimal overhead.

Contribution Guidelines

We eagerly welcome contributions to enrich this toolset. To contribute:

  1. Fork the Repository: Begin with forking the repository to your GitHub account.
  2. Feature Branch: Create a new branch in your fork for the feature or improvement.
  3. Implement Your Feature: Add your contribution to the new branch.
  4. Pull Request: Submit a pull request from your feature branch to the main repository.

Your contributions are greatly appreciated and will help enhance this project.

Development Setup

Installing Dependencies:

poetry install

Activating Virtual Environment:

poetry shell

Setting Up Pre-commit Hooks:

pre-commit install

Running Tests:

poetry run pytest

Static Type Checking:

poetry run pyright

Packaging:

poetry build

Local Installation:

pip install dist/*.tar.gz

Thank you for your interest in enhancing the capabilities of AI agents through advanced tooling. Your contributions make a significant impact.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crewai_tools-0.0.3.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crewai_tools-0.0.3-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file crewai_tools-0.0.3.tar.gz.

File metadata

  • Download URL: crewai_tools-0.0.3.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for crewai_tools-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5a0b8f72378fcd829c41efcaa53f4192b729a0f6ce62702539b3321e3bae9da2
MD5 28a567615af76e0fa28bb7d26b6afca3
BLAKE2b-256 25004bc1cc5950c7791f561f31bac95e6d87ca74c5d0437071a22a40f67f5771

See more details on using hashes here.

File details

Details for the file crewai_tools-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: crewai_tools-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for crewai_tools-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7f96d1313fffec0f69bc39a246abe802f3572f08db1b115d5d1de6188d1b1d07
MD5 48195947dccaa3604e6d04a7d98f5207
BLAKE2b-256 840f22c51de4712e1d20852be35cfe9f0e0c1e1ebadff07d741aaa2ca1c8ed42

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page