Skip to main content

Set of tools for the cropioAI framework

Project description

Logo of cropioAI, two people rowing on a boat

cropioAI Tools

Welcome to cropioAI Tools! This repository provides a comprehensive guide for setting up sophisticated tools for cropioAI agents, empowering your AI solutions with bespoke tooling.

In the realm of CropioAI 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 | Discourse

Table of contents

Available Tools

cropioAI 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.

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 cropioAI agents:

Subclassing BaseTool

from cropioai.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
        pass

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

Utilizing the tool Decorator

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

from cropioai.tools import BaseTool
@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 welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please ensure your code adheres to our coding standards and includes appropriate tests.

Development Setup

Installing Dependencies:

uv sync

Activating Virtual Environment:

uv venv
source .venv/bin/activate

Setting Up Pre-commit Hooks:

pre-commit install

Running Tests:

uv run pytest

Static Type Checking:

uv run pyright

Packaging:

uv 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.

Contact

For questions or support, please join our Discord community, Discourse or open an issue in this repository.

Project details


Download files

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

Source Distribution

cropioai_tools-0.0.16.tar.gz (704.5 kB view details)

Uploaded Source

Built Distribution

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

cropioai_tools-0.0.16-py3-none-any.whl (543.6 kB view details)

Uploaded Python 3

File details

Details for the file cropioai_tools-0.0.16.tar.gz.

File metadata

  • Download URL: cropioai_tools-0.0.16.tar.gz
  • Upload date:
  • Size: 704.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for cropioai_tools-0.0.16.tar.gz
Algorithm Hash digest
SHA256 509882bd6e76b6bfe625ea9eac67489baa640e375c3b7938493b3045347fc3ab
MD5 6d02dfe3926c2cc7a4e35b37690e69cb
BLAKE2b-256 4d052c207c6c5ae7e2eed5c86230edd4cace1862e744f9ca05d2a51e83b72492

See more details on using hashes here.

File details

Details for the file cropioai_tools-0.0.16-py3-none-any.whl.

File metadata

File hashes

Hashes for cropioai_tools-0.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 2cbba84b6f641cc5a0d6b19dfab24fd8fedc23d8238461bfa76a5ad05d373f72
MD5 04ebd710b69267c289e6b5c4a966d890
BLAKE2b-256 c357a01eaa8145918421f05a5aa1479898b6d00a8e72c74cd5afebbf161b410d

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