AI Mind Tool
The AIMindTool
is designed to query data sources in natural language.
AIMindTool
Description
The AIMindTool
is a wrapper around AI-Minds provided by MindsDB. It allows you to query data sources in natural language by simply configuring their connection parameters. This tool is useful when you need answers to questions from your data stored in various data sources including PostgreSQL, MySQL, MariaDB, ClickHouse, Snowflake, and Google BigQuery.
Minds are AI systems that work similarly to large language models (LLMs) but go beyond by answering any question from any data. This is accomplished by:
- Selecting the most relevant data for an answer using parametric search
- Understanding the meaning and providing responses within the correct context through semantic search
- Delivering precise answers by analyzing data and using machine learning (ML) models
Installation
To incorporate this tool into your project, you need to install the Minds SDK:
Steps to Get Started
To effectively use the AIMindTool
, follow these steps:
- Package Installation: Confirm that the
crewai[tools]
andminds-sdk
packages are installed in your Python environment. - API Key Acquisition: Sign up for a Minds account here, and obtain an API key.
- Environment Configuration: Store your obtained API key in an environment variable named
MINDS_API_KEY
to facilitate its use by the tool.
Example
The following example demonstrates how to initialize the tool and execute a query:
Parameters
The AIMindTool
accepts the following parameters:
- api_key: Optional. Your Minds API key. If not provided, it will be read from the
MINDS_API_KEY
environment variable. - datasources: A list of dictionaries, each containing the following keys:
- description: A description of the data contained in the datasource.
- engine: The engine (or type) of the datasource.
- connection_data: A dictionary containing the connection parameters for the datasource.
- tables: A list of tables that the data source will use. This is optional and can be omitted if all tables in the data source are to be used.
A list of supported data sources and their connection parameters can be found here.
Agent Integration Example
Here’s how to integrate the AIMindTool
with a CrewAI agent:
Conclusion
The AIMindTool
provides a powerful way to query your data sources using natural language, making it easier to extract insights without writing complex SQL queries. By connecting to various data sources and leveraging AI-Minds technology, this tool enables agents to access and analyze data efficiently.
Was this page helpful?