{"id":50494452,"url":"https://mindsdb.github.io/engine/","last_synced_at":"2026-06-18T23:00:31.983Z","repository":{"id":355129341,"uuid":"1220012117","full_name":"mindsdb/engine","owner":"mindsdb","description":"Semantic Query Engine for AI Agents to securely query data from any datasource","archived":false,"fork":false,"pushed_at":"2026-06-12T23:55:29.000Z","size":286349,"stargazers_count":6,"open_issues_count":3,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-17T14:28:49.183Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mindsdb.com","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mindsdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-24T13:02:53.000Z","updated_at":"2026-06-12T23:55:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mindsdb/engine","commit_stats":null,"previous_names":["mindsdb/engine"],"tags_count":377,"template":false,"template_full_name":null,"purl":"pkg:github/mindsdb/engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindsdb%2Fengine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindsdb%2Fengine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindsdb%2Fengine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindsdb%2Fengine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mindsdb","download_url":"https://codeload.github.com/mindsdb/engine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindsdb%2Fengine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34510287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-02T06:00:22.094Z","updated_at":"2026-06-18T23:00:31.974Z","avatar_url":"https://github.com/mindsdb.png","language":"Python","funding_links":[],"categories":["AI Agents"],"sub_categories":["Tutorial"],"readme":"\u003cdiv align=\"center\"\u003e\n\n  # MindsDB Query Engine\n\n**Semantic search over all your data — entirely in SQL.**\n\n  \u003ca href=\"https://pypi.org/project/MindsDB/\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://badge.fury.io/py/MindsDB.svg\" alt=\"PyPI version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.python.org/downloads/\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/python-3.10.x%7C%203.11.x%7C%203.12.x%7C%203.13.x-brightgreen.svg\" alt=\"Supported Python versions\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/mindsdb/mindsdb\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/docker/pulls/mindsdb/mindsdb.svg?logo=docker\u0026label=Docker%20pulls\u0026cacheSeconds=86400\" alt=\"Docker pulls\" /\u003e\n  \u003c/a\u003e\n\n[**Docs**](https://mindsdb.github.io/engine) · [**Website**](https://mindshub.ai) · [**Discord**](https://mindshub.ai/discord) · [**Contact**](https://mindshub.ai/contact)\n\u003c/div\u003e\n\n---\n\nMindsDB Query Engine connects to 200+ data sources — databases, warehouses, applications, files — and lets you query them live in one SQL dialect, with no ETL. Index unstructured content into [knowledge bases](https://mindsdb.github.io/engine#kb-overview), then search it by meaning, by keyword, or both at once, with plain SQL filters on top. Everything is reachable from any MySQL- or PostgreSQL-compatible client.\n\n\u003e **Where this fits:** MindsDB now builds [MindsHub](https://mindshub.ai) — a hub for open AI agents. The Query Engine remains a standalone open-source project, and it pairs well with MindsHub agents: connect it to give an agent live, SQL-queryable access to your data and semantic search. The full story: [MindsHub vs MindsDB](https://mindshub.ai/mindshub-vs-mindsdb).\n\n## How it works\n\n```\n   MySQL clients · PostgreSQL clients · BI tools · ORMs · HTTP API\n                                  │\n                   ┌──────────────▼───────────────┐\n                   │     MindsDB Query Engine     │\n                   │     one SQL dialect over     │\n                   │  a federated query planner   │\n                   └──────────────┬───────────────┘\n                                  │\n            ┌─────────────────────┼─────────────────────┐\n            │                     │                     │\n  ┌─────────▼─────────┐ ┌─────────▼─────────┐ ┌─────────▼─────────┐\n  │     Databases     │ │    Apps \u0026 files   │ │  Knowledge bases  │\n  │ Postgres, MySQL,  │ │ Slack, web crawler│ │   embeddings +    │\n  │ MongoDB, Snowflake│ │ docs, sheets,     │ │  vector store +   │\n  │ BigQuery, S3, …   │ │ email, calendars… │ │    BM25 index     │\n  └───────────────────┘ └───────────────────┘ └───────────────────┘\n           queried live, in place — data is never copied\n```\n\n- **One server, three interfaces.** The engine ships a built-in SQL editor on HTTP (`:47334`) and speaks the MySQL (`:47335`) and PostgreSQL (`:47336`) wire protocols — so `mysql`, `psql`, DBeaver, SQLAlchemy, or any BI tool [connects directly](https://mindsdb.github.io/engine#setup-clients).\n- **Federated queries, no pipelines.** [`CREATE DATABASE`](https://mindsdb.github.io/engine#db-create) attaches a live data source through an integration handler. The planner translates each query, pushes work down to the source, and streams results back — your data stays where it is. Source-specific syntax is still available via [native queries](https://mindsdb.github.io/engine#native-queries).\n- **Knowledge bases are the semantic layer.** A [knowledge base](https://mindsdb.github.io/engine#kb-overview) combines an embedding model, an optional reranking model, and a vector store (e.g. pgvector). `INSERT INTO` it to chunk, embed, and index content; `SELECT` from it to retrieve by meaning, filtered by metadata columns like any other table.\n- **Hybrid retrieval.** [Hybrid search](https://mindsdb.github.io/engine#kb-hybrid) runs vector similarity and BM25 keyword matching in parallel and merges the results — for queries that mix natural language with exact identifiers, codes, or acronyms.\n- **Organize and automate.** [Projects](https://mindsdb.github.io/engine#proj-create) namespace your work, [views](https://mindsdb.github.io/engine#view-create) save cross-source transformations, and [jobs](https://mindsdb.github.io/engine#job-create) schedule any SQL to run on an interval — e.g. to keep knowledge bases fresh.\n\n## Quick start\n\nRun with [Docker](https://mindsdb.github.io/engine#setup-docker):\n\n```bash\ndocker run --name mindsdb_container \\\n  -e MINDSDB_APIS=http,mysql \\\n  -p 47334:47334 -p 47335:47335 \\\n  mindsdb/mindsdb\n```\n\nOr install from [PyPI](https://mindsdb.github.io/engine#setup-pip):\n\n```bash\npip install mindsdb            # add extras as needed, e.g. mindsdb[pgvector,openai,postgres]\npython -m mindsdb\n```\n\nThen open the editor at `http://127.0.0.1:47334`, or connect any MySQL client to port `47335`. The [quickstart](https://mindsdb.github.io/engine#quickstart) walks through the rest.\n\n## From zero to semantic search\n\nSix SQL statements, start to finish. Full syntax for every statement is in the [SQL reference](https://mindsdb.github.io/engine).\n\n**1. Attach your data sources** ([docs](https://mindsdb.github.io/engine#db-create)) — they are queried live, nothing is imported:\n\n```sql\nCREATE DATABASE my_pg\nWITH ENGINE = 'postgres',\nPARAMETERS = {\n  \"host\": \"localhost\", \"port\": 5432,\n  \"user\": \"user\", \"password\": \"pass\",\n  \"database\": \"mydb\"\n};\n\nCREATE DATABASE my_mongo\nWITH ENGINE = 'mongodb',\nPARAMETERS = {\n  \"host\": \"mongodb+srv://user:pass@cluster.example.net\",\n  \"database\": \"support\"\n};\n```\n\n**2. Query across sources in one dialect** ([docs](https://mindsdb.github.io/engine#sql-join)) — even non-SQL stores like MongoDB, and save the result as a [view](https://mindsdb.github.io/engine#view-create):\n\n```sql\nCREATE VIEW open_tickets_by_product AS (\n  SELECT p.name, COUNT(t.ticket_id) AS open_tickets\n  FROM my_mongo.support_tickets AS t\n  JOIN my_pg.products AS p\n    ON t.product_id = p.id\n  WHERE t.status = 'open'\n  GROUP BY p.name\n);\n```\n\n**3. Create a knowledge base** ([docs](https://mindsdb.github.io/engine#kb-create)) — an embedding model plus a vector store, addressable as a table:\n\n```sql\nCREATE KNOWLEDGE_BASE support_kb\nUSING\n  embedding_model = {\n    \"provider\":   \"openai\",\n    \"model_name\": \"text-embedding-3-large\",\n    \"api_key\":    \"sk-...\"\n  },\n  storage          = my_pgvector.support_kb_store,  -- a pgvector connection\n  content_columns  = ['subject', 'body'],\n  metadata_columns = ['product_name', 'priority', 'created_at'],\n  id_column        = 'ticket_id';\n```\n\n**4. Index your content** ([docs](https://mindsdb.github.io/engine#kb-insert)) — rows are chunked, embedded, and upserted:\n\n```sql\nINSERT INTO support_kb\n  SELECT ticket_id, subject, body, product_name, priority, created_at\n  FROM my_mongo.support_tickets;\n```\n\n**5. Search by meaning, filter by metadata** ([docs](https://mindsdb.github.io/engine#kb-query)):\n\n```sql\nSELECT chunk_content, product_name, relevance\nFROM support_kb\nWHERE content = 'cannot connect after the latest update'\n  AND priority \u003c= 2\n  AND relevance \u003e= 0.5\nLIMIT 10;\n\n-- hybrid search: blend vector similarity with BM25 keyword matching\nSELECT *\nFROM support_kb\nWHERE content = 'error ERR-4421'\n  AND hybrid_search = true;\n```\n\n▶ [How to use semantic search with metadata filters](https://www.youtube.com/watch?v=HN4fHtS4mvo) — a good explainer of this feature.\n\n**6. Keep the index fresh with a job** ([docs](https://mindsdb.github.io/engine#job-create)):\n\n```sql\nCREATE JOB refresh_support_kb (\n  INSERT INTO support_kb\n    SELECT ticket_id, subject, body, product_name, priority, created_at\n    FROM my_mongo.support_tickets\n    WHERE created_at \u003e LAST\n)\nEVERY hour;\n```\n\n## Help and support\n\n| You need | Go to |\n| --- | --- |\n| Ask a question | [Discord](https://mindshub.ai/discord) |\n| Report a bug | [GitHub Issues](https://github.com/mindsdb/engine/issues) — please include reproduction steps |\n| Commercial support | [Contact the team](https://mindshub.ai/contact) |\n\n**Security note:** if you find a vulnerability, please do not open a public issue — follow our [security policy](https://github.com/mindsdb/engine/security) instead.\n\n## Contributing\n\nContributions are welcome — code, integrations, docs, and bug reports alike. We follow the fork-and-pull workflow: see the [contribution guide](CONTRIBUTING.md) to get set up, and browse the [open issues](https://github.com/mindsdb/engine/issues) for somewhere to start. Good first areas are new integration handlers, bug fixes, and documentation improvements.\n\n## Resources\n\n- [Documentation](https://mindsdb.github.io/engine)\n- [MindsHub — open AI agents, from the same team](https://mindshub.ai)\n- [MindsHub vs MindsDB — how the product evolved](https://mindshub.ai/mindshub-vs-mindsdb)\n- [Discord](https://mindshub.ai/discord)\n- [Contact](https://mindshub.ai/contact)\n\n## License\n\nMindsDB Core is licensed under the [Elastic License 2.0](LICENSE); some directories carry their own license — see the [LICENSE](LICENSE) file for the full structure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/mindsdb.github.io%2Fengine%2F","html_url":"https://awesome.ecosyste.ms/projects/mindsdb.github.io%2Fengine%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/mindsdb.github.io%2Fengine%2F/lists"}