

MindsDB
21.3k 2.7kWhat is Minds DB ?
MindsDB’s AI SQL Server enables developers to build AI tools that need access to real-time data to perform their tasks.
Minds DB Features
🎯 Features | ⚙️ SQL Query Examples |
---|---|
🤖 Fine-Tuning | FINETUNE mindsdb.hf_model FROM postgresql.table; |
📚 Knowledge Base | CREATE KNOWLEDGE_BASE my_knowledge FROM (SELECT contents FROM drive.files); |
🔍 Semantic Search | SELECT * FROM rag_model WHERE question=‘What product is best for treating a cold?‘; |
⏱️ Real-Time Forecasting | SELECT * FROM binance.trade_data WHERE symbol = ‘BTCUSDT’; |
🕵️ Agents | CREATE AGENT my_agent USING model=‘chatbot_agent’, skills = [‘knowledge_base’]; |
💬 Chatbots | CREATE CHATBOT slack_bot USING database=‘slack’, agent=‘customer_support’; |
⏲️ Time Driven Automation | CREATE JOB twitter_bot ( <sql_query1>, <sql_query2> ) START ‘2023-04-01 00:00:00’; |
🔔 Event Driven Automation | CREATE TRIGGER data_updated ON mysql.customers_data (sql_code) |
⚡️ Quick Example
Enrich datastores by passing new data thorugh an AI-model and writing results back in the database, this can be solved in a few lines of AI-SQL. Here is a reference architecture:
Let’s look at automating shopify orders analysis:
---This query creates a job in MindsDB to analyze Shopify orders.
---It predicts customer engagement scores based on recent completed orders
---and inserts these insights into a customer_engagement table.
---The job runs every minute, providing ongoing updates to the engagement scores.
CREATE JOB mindsdb.shopify_customer_engagement_job AS (
-- Insert into a table insights about customer engagement based on recent Shopify orders
INSERT INTO shopify_insights.customer_engagement (customer_id, predicted_engagement_score)
SELECT
o.customer_id AS customer_id,
r.predicted_engagement_score AS predicted_engagement_score
FROM shopify_data.orders o
JOIN mindsdb.customer_engagement_model r
WHERE
o.order_date > LAST
AND o.status = 'completed'
LIMIT 100
)
EVERY minute;
Installation Minds DB
To install locally or on-premise, pull the latest Docker image:
docker pull mindsdb/mindsdb
or, use pip:
pip install mindsdb
🔗 Data Integrations
MindsDB allows querying hundreds of data sources, such as databases (both relational and non-relational), data warehouses, streams, and SaaS application data, using standard SQL. This capability stems from MindsDB’s unique ability to translate SQL into real-time data requests. You can find the list of all supported integrations here.