DB-GPT
open-source agentic AI data assistant for the next generation of AI + Data products.
Last verified:
What is DB-GPT?
DB-GPT is an open-source agentic AI data assistant designed for the next generation of AI + Data products. It connects to databases, CSV/Excel files, data warehouses, and knowledge bases, allowing users to ask questions in natural language while AI autonomously writes SQL and executes code-driven analysis workflows. The platform generates charts, dashboards, HTML reports, and analysis summaries, executing tasks safely in sandboxed environments.
DB-GPT serves as a comprehensive platform for building AI-native data agents, workflows, and applications using agents, AWEL (Agentic Workflow Expression Language), RAG (Retrieval Augmented Generation), and multi-model support. Its core capabilities include a multi-agent data analysis pipeline with planner, SQL writer, and validator agents, automated Text2SQL fine-tuning achieving 82.5% accuracy on Spider dataset, and Generative Business Intelligence (GBI) for enterprise report analysis and business insights.
The tool is ideal for data analysts who need natural-language access to production databases without writing SQL, developers building custom data-analytics agents, and enterprises in regulated industries (finance, healthcare, government) requiring on-prem deployment. It supports 20+ database connectors including MySQL, PostgreSQL, SQLite, ClickHouse, DuckDB, Spark, Doris, and TDengine, plus integration with 30+ LLMs from providers like OpenAI, Anthropic, DeepSeek, Qwen, ChatGLM, and Baichuan.
DB-GPT is particularly strong for teams in China using domestic LLMs and databases, enterprises needing on-prem NL-to-SQL solutions, and organizations with DevOps capacity willing to self-host. The MIT/Apache 2.0 open-source license ensures no vendor lock-in, with 17.5k GitHub stars and active community development from eosphoros-ai.
DB-GPT pricing
Pricing model: Freemium
DB-GPT is completely free and open-source under the MIT/Apache 2.0 license. There is no paid tier, no per-seat costs, and no upsells. The starting tier includes all features: the full framework, web UI, and all 20+ database connectors. This makes it cost-effective for any team willing to self-host, from solo developers to enterprises. The only costs are infrastructure-related: GPU resources for local model deployment, server hosting, and vector database storage. For comparison, hosted alternatives like Hex charge per seat ($20-25/seat for Business), while Chat2DB has a free tier with limited features. DB-GPT's open-source model means no vendor lock-in and full control over your data and infrastructure.
DB-GPT pros
- Fully open-source with MIT/Apache 2.0 license, no per-seat costs
- Supports 20+ database connectors including MySQL, PostgreSQL, ClickHouse, DuckDB
- Multi-agent pipeline with planner, SQL writer, and validator agents
- AWEL workflow language for orchestrating complex, repeatable data tasks
- Sandboxed code execution for safe Python and SQL runs
- Supports 30+ LLMs including OpenAI, DeepSeek, Qwen3, ChatGLM, Baichuan
- SMMF framework manages multiple models and inference frameworks simultaneously
- Automated Text2SQL fine-tuning with 82.5% accuracy on Spider dataset
- Generative BI for enterprise report analysis and business insights
- RAG framework for knowledge-based applications with unstructured data
- On-prem deployment ensures data never leaves your infrastructure
- Visual web UI enables non-technical users to query databases conversationally
- Python SDK for building custom agent integrations
- Supports both local models (GPU) and API proxy models (CPU-compatible)
- Reusable skills packages for domain-specific tasks
- Chat DB capability for database performance analysis and optimization
- AutoDL one-line install script for Linux/Mac quick setup
- Active community with 17.5k GitHub stars and 162 contributors
- Bilingual documentation (Chinese and English)
- MCP Protocol support in v0.7.0 for enhanced model connectivity
DB-GPT cons
- Self-hosting requires significant DevOps work (vector DB, app server, LLM runtime)
- English documentation trails Chinese documentation in completeness
- NL-to-SQL accuracy varies by schema quality, requires prompt engineering for complex datasets
- Not ideal for small teams wanting zero-setup hosted SaaS solution
- Local model deployment requires GPU resources for acceptable performance
- Steeper learning curve compared to simpler NL-to-SQL tools like Chat2DB
- Infrastructure costs can add up despite free software (GPU, vector DB, server)
- Automatic scaling and observability features still in incubation, not fully implemented
- Configuration requires editing TOML files for model setup
- Dependency management with uv can be challenging for beginners
Frequently asked questions about DB-GPT
What is DB-GPT and what does it do?
DB-GPT is an open-source agentic AI data assistant that connects to your databases, CSV/Excel files, warehouses, and knowledge bases. It allows users to ask questions in natural language while AI autonomously writes SQL and executes Python code for analysis. The platform generates charts, dashboards, HTML reports, and analysis summaries. It also serves as a framework for building AI-native data agents, workflows, and applications using agents, AWEL workflow orchestration, RAG for knowledge bases, and multi-model support.
Which databases does DB-GPT support?
DB-GPT supports 20+ database connectors including MySQL, PostgreSQL, SQLite, ClickHouse, DuckDB, Spark, Doris, and TDengine. The data source module is designed to manage structured and semi-structured data assets, connecting databases, data warehouses, and data lakes to the DB-GPT framework. Custom extensions are also supported for additional data sources.
Which LLMs are supported by DB-GPT?
DB-GPT supports 30+ LLMs through its SMMF (Service-oriented Multi-model Management Framework). Supported models include DeepSeek (R1, V3, R1-Distill variants), Qwen3 series (235B, 30B, 32B, QwQ-32B), GLM (Z1-32B, GLE-4-32B, GLE-4-9B), Llama 3.1 (405B, 70B, 8B), Gemma, Yi, Mistral, Mixtral, Phi-3, Vicuna, Baichuan, ChatGLM, Wenxin, Tongyi, and Zhipu AI. Both open-source local models and API proxy models are supported.
What is AWEL in DB-GPT?
AWEL (Agentic Workflow Expression Language) is DB-GPT's workflow orchestration language for building complex, repeatable data tasks. It allows you to create multi-agent pipelines where one agent plans tasks, another writes SQL, and a validator checks results. AWEL enables end-to-end analysis workflows that plan tasks, break work into steps, call tools, and complete analysis autonomously. Version 0.8.0 released in 2026 includes major updates to AWEL capabilities.
Can I deploy DB-GPT on-premises for data privacy?
Yes, on-prem deployment is a stated design goal of DB-GPT. The platform ensures data never needs to be sent to external services. It supports privatized large models and proxy desensitization for privacy and security. This makes DB-GPT ideal for regulated industries like finance, healthcare, and government that require data to remain within their infrastructure. You can deploy local models (requiring GPU) or use API proxy models while keeping your database connections internal.
What is the difference between DB-GPT and Chat2DB?
DB-GPT is a comprehensive open-source framework for building AI-native data applications with multi-agent pipelines, AWEL workflow orchestration, RAG, and fine-tuning capabilities. Chat2DB is a simpler NL-to-SQL tool with zero-setup hosted SaaS options. DB-GPT is more suitable for enterprises needing on-prem deployment, custom agent workflows, and full control. Chat2DB is better for small teams wanting quick setup without DevOps work. DB-GPT requires self-hosting with vector DB, app server, and LLM runtime, while Chat2DB offers a free tier with limited features.
How does DB-GPT's Text2SQL fine-tuning work?
DB-GPT provides an automated fine-tuning lightweight framework centered on LLMs, Text2SQL datasets, and fine-tuning methods like LoRA/QLoRA/Pturning. The framework simplifies Text-to-SQL fine-tuning to an assembly-line process through DB-GPT-Hub. It has achieved 82.5% accuracy on the Spider dataset. Supported models for fine-tuning include LLaMA, LLaMA-2, BLOOM, BLOOMZ, Falcon, Baichuan, Baichuan2, InternLM, Qwen, XVERSE, ChatGLM2, and more.
What is SMMF in DB-GPT?
SMMF (Service-oriented Multi-model Management Framework) is DB-GPT's multi-model management system consisting of a model inference layer (vLLM, TGI, TensorRT) and model deployment layer. It supports multiple models and multiple inference frameworks simultaneously, provides scalability and stability through cloud-native concepts like Kubernetes, offers high framework performance with asynchronous interfaces, and includes manageability and observability features. SMMF seamlessly supports FastChat, vLLM, and llama.cpp inference frameworks, with automatic scaling and observability still in incubation.
Is DB-GPT suitable for non-technical users?
Yes, DB-GPT includes a visual web UI that enables non-technical users to query databases conversationally without writing SQL. Data analysts can connect to MySQL, upload a CSV, and use the chat interface to ask questions like 'Show total sales by region for last quarter' — DB-GPT generates SQL, executes it, and returns a chart instantly. The Chat Dashboard allows users to choose their preferred AI model, select a data source, and start chatting with the AI directly to analyze data and generate reports in seconds.