MindsDB is a platform for building AI solutions that can learn from and answer questions over federated data.
MindsDB is a powerful federated AI query engine that allows developers to connect agents and AI applications to a wide variety of data sources.
- Install MindsDB using Docker or Docker Desktop.
- Connect Your Data — Connect and query hundreds of different data sources.
- Prepare Your Data — Prepare, organize, and automate data transformations using AI and ML to fit your needs.
After connecting and preparing your data, you can leverage MindsDB to implement the following use cases:
🎯 Use Case | ⚙️ Description | Python SDK | SQL |
---|---|---|---|
RAG | Comprehensive RAG that can be populated from numerous data sources | (Python) | (SQL) |
Agents | Equip agents to answer questions over structured and unstructured data in MindsDB | (Python) | (SQL) |
Automation | Automate AI-data workflows using Jobs | (Python) | (SQL) |
Create AI systems composed of multiple connected components and expose them via APIs.
A common use case involves connecting agents to data. The following example shows how to create an AI agent capable of searching over structured data:
-- Step 1: Connect a data source to MindsDB
CREATE DATABASE data_source
WITH ENGINE = "postgres",
PARAMETERS = {
"user": "demo_user",
"password": "demo_password",
"host": "samples.mindsdb.com",
"port": "5432",
"database": "demo",
"schema": "demo_data"
};
SELECT * FROM data_source.car_sales;
-- Step 2: Create a skill
CREATE SKILL my_skill
USING
type = 'text2sql',
database = 'data_source',
tables = ['car_sales'],
description = 'car sales data of different car types';
SHOW SKILLS;
-- Step 3: Deploy a conversational model
CREATE ML_ENGINE langchain_engine
FROM langchain
USING
openai_api_key = 'your openai-api-key';
CREATE MODEL my_conv_model
PREDICT answer
USING
engine = 'langchain_engine',
model_name = 'gpt-4',
mode = 'conversational',
user_column = 'question',
assistant_column = 'answer',
max_tokens = 100,
temperature = 0,
verbose = True,
prompt_template = 'Answer the user input in a helpful way';
DESCRIBE my_conv_model;
-- Step 4: Create an agent
CREATE AGENT my_agent
USING
model = 'my_conv_model',
skills = ['my_skill'];
SHOW AGENTS;
-- Step 5: Query an agent
SELECT * FROM my_agent WHERE question = 'What is the average price of cars from 2018?';
Agents are also accessible via API endpoints.
Interested in contributing to MindsDB? Follow our installation guide for development.
You can find our contribution guide here.
We welcome suggestions! Feel free to open new issues with your ideas, and we’ll guide you.
This project adheres to a Contributor Code of Conduct. By participating, you agree to follow its terms.
Also, check out our community rewards and programs.
If you find a bug, please submit an issue on GitHub.
Here’s how you can get community support:
- Ask a question in our Slack Community.
- Join our GitHub Discussions.
- Post on Stack Overflow with the MindsDB tag.
For commercial support, please contact the MindsDB team.
Generated with contributors-img.
Join our [Slack community](https://mindsdb.com/j