https://github.com/mindsdb/mindsdb
AI's query engine - Platform for building AI that can learn and answer questions over large scale federated data.
https://github.com/mindsdb/mindsdb
agi ai artificial-inteligence databases llms rag
Last synced: 1 day ago
JSON representation
AI's query engine - Platform for building AI that can learn and answer questions over large scale federated data.
- Host: GitHub
- URL: https://github.com/mindsdb/mindsdb
- Owner: mindsdb
- License: other
- Created: 2018-08-02T17:56:45.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-04-22T14:19:14.000Z (2 days ago)
- Last Synced: 2025-04-22T14:42:23.270Z (2 days ago)
- Topics: agi, ai, artificial-inteligence, databases, llms, rag
- Language: Python
- Homepage: https://mindsdb.com
- Size: 245 MB
- Stars: 27,783
- Watchers: 397
- Forks: 4,957
- Open Issues: 150
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
- awesome - mindsdb/mindsdb - AI's query engine - Platform for building AI that can learn and answer questions over large scale federated data. (Python)
- awesome-fullstack - MindsDB
- awesome-python-machine-learning-resources - GitHub - 11% open · ⏱️ 25.08.2022): (机器学习框架)
- awesome-python-machine-learning - mindsdb - MindsDB's goal is to make it very simple for developers to use the power of artificial neural networks in their projects. (Uncategorized / Uncategorized)
- Awesome-Earth-Artificial-Intelligence - MindsDB - MindsDB is an Explainable AutoML framework for developers built on top of Pytorch. It enables you to build, train and test state of the art ML models in as simple as one line of code. (Tools)
- awesome-mlops - MindsDB - AI layer for databases that allows you to effortlessly develop, train and deploy ML models. (AutoML)
- awesome-production-machine-learning - MindsDB - MindsDB is the platform to create, serve, and fine-tune models in real-time from your database, vector store, and application data. (Deployment and Serving)
- StarryDivineSky - mindsdb/mindsdb
- awesome-AutoML-and-Lightweight-Models - MindsDB
- awesome-google-colab - Mindsdb - Framework to streamline use of neural networks (Technologies)
- fucking-awesome-for-beginners - MindsDB
- awesome-rainmana - mindsdb/mindsdb - AI's query engine - Platform for building AI that can learn and answer questions over large scale federated data. (Python)
- AiTreasureBox - mindsdb/mindsdb - 04-24_27802_1](https://img.shields.io/github/stars/mindsdb/mindsdb.svg)|The platform for customizing AI from enterprise data| (Repos)
- stars - mindsdb - Platform for building AI that can learn and answer questions over large scale federated data. | mindsdb | 27721 | (Python)
- my-awesome - mindsdb/mindsdb - inteligence,databases,llms,rag pushed_at:2025-04 star:27.7k fork:5.0k AI's query engine - Platform for building AI that can learn and answer questions over large scale federated data. (Python)
- awesome-homelab - MindsDB - Platform for building AI that can learn and answer questions over large scale federated data. | (Apps / AI)
README
----------------------------------------
MindsDB is an AI data solution that enables humans, AI, agents, and applications to query data in natural language and SQL, and get highly accurate answers across disparate data sources and types.

A federated query engine that tidies up your data-sprawl chaos while meticulously answering every single question you throw at it.
[MindsDB has an MCP server built in](https://docs.mindsdb.com/mcp/overview) that enables your MCP applications to connect, unify and respond to questions over large-scale federated data—spanning databases, data warehouses, and SaaS applications.
## Minds [Demo](https://mdb.ai/register)
Play with [Minds demo](https://mdb.ai/register), and see the power of MindsDB at answering questions from structured to unstructured data, whether it's scattered across SaaS applications, databases, or... hibernating in data warehouses like that $100 bill in your tuxedo pocket from prom night, lost, waiting to be discovered.
## Install MindsDB ServerMindsDB is an open-source server that can be deployed anywhere - from your laptop to the cloud, and everywhere in between. And yes, you can customize it to your heart's content.
* [Using Docker Desktop](https://docs.mindsdb.com/setup/self-hosted/docker-desktop). This is the fastest and recommended way to get started and have it all running.
* [Using Docker](https://docs.mindsdb.com/setup/self-hosted/docker). This is also simple, but gives you more flexibility on how to further customize your server.
* [Using PyPI](https://docs.mindsdb.com/contribute/install). This option enables you to contribute to MindsDB.## Connect Your Data
You can connect to hundreds of [data sources (learn more)](https://docs.mindsdb.com/integrations/data-overview). This is just an example of a Postgres database.
```sql
-- Connect to demo postgres DB
CREATE DATABASE demo_postgres_db
WITH ENGINE = "postgres",
PARAMETERS = {
"user": "demo_user",
"password": "demo_password",
"host": "samples.mindsdb.com",
"port": "5432",
"database": "demo",
"schema": "demo_data"
};
```Once you've connected your data sources, you can [combine](https://docs.mindsdb.com/mindsdb_sql/sql/api/join-on), [slice it, dice it](https://docs.mindsdb.com/mindsdb_sql/sql/api/select), and [transform](https://docs.mindsdb.com/use-cases/data_enrichment/overview) it however your heart desires using good ol' standard SQL [(learn more)](https://docs.mindsdb.com/mindsdb_sql/overview).
After you've whipped your data into shape, it's time to build AI that actually learns!
## Build AI Knowledge
Our Knowledge Bases are state-of-the-art autonomous RAG systems that can digest data from any source MindsDB supports. Whether your data is structured and neater than a Swiss watch factory or unstructured and messy as a teenager's bedroom, our Knowledge Base engine will figure out how to find the relevant information.
**In this example** we will create a knowledge base that knows everything about amazon reviews.
```sql
-- first create a knowledge base
CREATE KNOWLEDGE_BASE mindsdb.reviews_kb;-- now insert everything from the amazon reviews table into it, so it can learn it
INSERT INTO mindsdb.reviews_kb (
SELECT review as content FROM demo_pg_db.amazon_reviews
);-- check the status of your loads here
SELECT * FROM information_schema.knowledge_bases;-- query the content of the knowledge base
SELECT * FROM mindsdb.reviews_kb;
```For the tinkerers and optimization enthusiasts out there, you can dive as deep as you want. [(Learn more about knowledge Bases)](https://docs.mindsdb.com/mindsdb_sql/agents/knowledge-bases)
+ Want to [hand-pick your embedding model? Go for it](https://docs.mindsdb.com/mindsdb_sql/agents/knowledge-bases#knowledge-base-with-openai-embedding-model)!
+ Have strong [opinions about vector databases? We're here for it!](https://docs.mindsdb.com/mindsdb_sql/agents/knowledge-bases#knowledge-base-with-custom-vector-store).But if you'd rather spend your time on other things (like finally building that billion-dollar AI App), that's perfectly fine too. By default, it's all handled automatically - you don't need to worry about the nitty-gritty details like data embedding, chunking, vector optimization, etc.
## Search
Now that your knowledge base is loaded and ready. Let's hunt for some juicy info!
#### Via SQL
```sql
-- Find the reviews that about Iphone in beast of lights
SELECT * FROM mindsdb.reviews_kb
WHERE content LIKE 'what are the best kindle reviews'
LIMIT 10;
```#### Via Python SDK
Install MindsDB SDK
```shell
pip install mindsdb_sdk
```You can call this AI knowledge base from your app with the following code:
```python
import mindsdb_sdk# connects to the specified host and port
server = mindsdb_sdk.connect('http://127.0.0.1:47334')my_kb = server.knowledge_bases.get('mindsdb.reviews_kb');
df = my_kb.find('what are the best kindle reviews').fetch()```
## 🤝 Contribute
Interested in contributing to MindsDB? Follow our [installation guide for development](https://docs.mindsdb.com/contribute/install?utm_medium=community&utm_source=github&utm_campaign=mindsdb%20repo).
You can find our [contribution guide here](https://docs.mindsdb.com/contribute/contribute?utm_medium=community&utm_source=github&utm_campaign=mindsdb%20repo).
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](https://github.com/mindsdb/mindsdb/blob/main/CODE_OF_CONDUCT.md). By participating, you agree to follow its terms.
Also, check out our [community rewards and programs](https://mindsdb.com/community?utm_medium=community&utm_source=github&utm_campaign=mindsdb%20repo).
## 🤍 Support
If you find a bug, please submit an [issue on GitHub](https://github.com/mindsdb/mindsdb/issues/new/choose).
Here’s how you can get community support:
* Ask a question in our [Slack Community](https://mindsdb.com/joincommunity?utm_medium=community&utm_source=github&utm_campaign=mindsdb%20repo).
* Join our [GitHub Discussions](https://github.com/mindsdb/mindsdb/discussions).
* Post on [Stack Overflow](https://stackoverflow.com/questions/tagged/mindsdb) with the MindsDB tag.For commercial support, please [contact the MindsDB team](https://mindsdb.com/contact?utm_medium=community&utm_source=github&utm_campaign=mindsdb%20repo).
## 💚 Current Contributors
Generated with [contributors-img](https://contributors-img.web.app).
## 🔔 Subscribe for Updates
Join our [Slack community](https://mindsdb.com/joincommunity)