DB-GPT README

项目的 README,来自 github.com/eosphoros-ai/DB-GPT。合并为一个 markdown 文件:README.md。

DB-GPT

DB-GPT: Open-Source Product for Controlled Data Agents

From a data question to verifiable queries, analytical reports, and reusable dashboards.

GitHub Stars Latest release MIT License Follow DB-GPT on X (Twitter) Join the DB-GPT Discord community

English · 简体中文 · 日本語 · हिन्दी · മലയാളം · தமிழ்

Documentation · Releases · Community · Quick start

Connect your data, establish business definitions, choose expert methods, execute within configured tool and runtime boundaries, and deliver results you can inspect, edit, and reuse.

DB-GPT goes beyond translating natural language into SQL. It brings data connections, business semantics, expert skills, task orchestration, and analytical artifacts into one workflow: a practical assistant for users and an extensible foundation for developers building AI-native data applications.

Product demo · Why DB-GPT? · Product modules · Safety and execution boundaries · Quick start · Community

Product demo

https://github.com/user-attachments/assets/36ddad2c-1021-4181-b31a-8fb216c93f81

Why DB-GPT?

Business context before queries

“Revenue” can mean different date attribution, refund treatment, and scope. The Semantic Center organizes schema metadata, business meanings, metric formulas, and published versions so an agent can work from explicit definitions rather than guess them again for each question.

Expert methods, not just answers

Use specialized plugins for queries, analysis, SQL optimization, metadata and architecture, or financial analysis. Skills package reusable instructions and scripts; workflows make steps, dependencies, and tool configuration explicit.

Reusable results

Deliver query tables, charts, analytical reports, and editable dashboards—not only chat messages. Inspect the execution, review the result, request changes, and retain the artifact for the next task.

Human control over consequential actions

Models, tools, data sources, and runtime access depend on deployment and task configuration. Dashboard plans and proposed edits can be reviewed before application. Controlled execution is not a guarantee of absolute safety: use least-privilege credentials, appropriate isolation, and independent review.

Product modules

A shared starting point

The current DB-GPT home interface: natural-language input, model selection, and expert entry points

Start with a question, a file, or a database. Choose a model and the relevant expert, clarify the objective, and move into a query, analysis, or dashboard task.

1. Dashboards: from plan to board view

Start with a plan or template, generate a draft, edit widgets and queries, and enter Preview to present the full board.

The generated Walmart dashboard in Preview: total sales, active stores, weekly trend, and Top 10 stores

This is the actual Walmart dashboard generated and saved during the product demo, shown in Preview board view. Its four widgets include sales and store KPIs, a weekly trend, and a Top 10 ranking. It is a saved draft, not a publicly published board.

The featured Walmart board uses an example dataset. Its values illustrate this case, not current company performance.

2. Plugins and Skills: reusable expertise

Select an expert plugin for the task and bind its data, knowledge context, and permitted tools. Skills package domain instructions, methods, and scripts.

The English plugin interface with five data-expert categories

Expert Typical work
Data Query Clarify the question and metric, inspect and execute SQL, export results
Data Analysis Inspect data, analyze trends and composition, prepare reports and dashboards
SQL Optimization Inspect SQL and execution plans, propose changes for review
Metadata & Architecture Organize data dictionaries, relationships, and modeling recommendations
Financial Analysis Read financial materials and structure comparisons, subject to configuration and data prerequisites

Plugins provide methods, not data permissions. Review third-party instructions, scripts, dependencies, and tool access before installing them.

3. Data sources: reliable connections

Manage database connections and select the source for each task. Queries, analysis, and dashboards can work from the same connection inventory and metadata context.

Full English database catalog: all 27 types, with environment availability preserved

Supports data sources including MySQL, PostgreSQL, SQLite, DuckDB, ClickHouse, Apache Doris, StarRocks, Oracle, MSSQL, Neo4j, and TuGraph.

4. Semantic Center: maintained metric definitions

Organize metadata, business definitions, metrics, query examples, relationships, and rules around a source. Published definitions preserve versions that can be associated with a query result.

The Semantic Center with published metric formulas and versions

5. Workflow: explicit steps and collaboration

Use the visual editor to organize Agent nodes, inputs, outputs, serial steps, and parallel branches. Prefer explicit workflows when a task should be repeatable.

An English workflow template with semantic grounding, planning, parallel analysis, and combined review

This is a template editing view, not evidence that the workflow has been debugged or published. Configure its data source, model, and tools before running it.

6. Knowledge, connectors, and runtime management

From question to result

Connect → Ground → Plan → Execute → Review → Reuse

  1. Select the source and clarify the objective, time range, and metric scope.
  2. Inspect fields, data quality, business definitions, and metric versions.
  3. Select an expert and Skills; configure a workflow for repeatable tasks.
  4. Execute SQL, code, or retrieval within permitted tools and runtimes.
  5. Review the plan, calculations, sources, artifacts, and proposed changes.
  6. Retain the report or dashboard; configure scheduling only with the required operational support.

Safety and execution boundaries

DB-GPT provides configurable execution and review mechanisms. Effective safety depends on deployment:

Capabilities depend on the release, configuration, schema migrations, and model behavior. Use the code and documentation for your version; a UI entry or historical demo is not a production-readiness guarantee.

Quick start

Option 1: installer for macOS and Linux

Download and review the script before running it:

curl -fsSL https://raw.githubusercontent.com/eosphoros-ai/DB-GPT/main/scripts/install/install.sh -o install.sh
less install.sh
bash install.sh

Follow the wizard to choose a profile and configure a model provider. Then use the directory and startup command printed by the installer:

cd ~/.dbgpt/DB-GPT
uv run dbgpt start webserver --profile <profile>

Replace <profile> with your configured profile and open http://localhost:5670.

Existing source checkout: keep your current branch

From the repository root:

bash scripts/install/install.sh --profile openai --repo-dir "$(pwd)"
uv run dbgpt start webserver --profile openai

--repo-dir reuses the current checkout instead of cloning or switching branches. Provider credentials and required services still need configuration.

With dependencies installed and an appropriate TOML configuration, the backend can also be started directly:

.venv/bin/python packages/dbgpt-app/src/dbgpt_app/dbgpt_server.py -c configs/dbgpt-proxy-openai.toml

For frontend development, run npm run dev -- --hostname 127.0.0.1 --port 3000 inside web/. A running UI does not prove model inference or data access is ready.

Option 2: PyPI

Use Python 3.10 or newer:

pip install dbgpt-app
dbgpt start

Complete provider setup before using the interface. PyPI releases, main, and feature branches may differ; use the corresponding source checkout to test branch-specific features.

See the documentation for additional installation and configuration options.

Developer ecosystem

Consult current documentation for provider support, drivers, and dependencies instead of treating historical model lists as compatibility guarantees.

Vision and evolution

Make trustworthy data work open and composable: help users complete an analysis while enabling teams to retain business context, reusable methods, and analytical artifacts.

Development directions include semantic consistency, task evaluation, execution diagnostics, portable Skills and workflows, and supervised recurring tasks. Track proposals and priorities through Issues and Discussions, without assuming unconfirmed release dates.

Community

Contribute reproducible cases, fixes, documentation, Skills, and workflows. Include the version, configuration method, and a minimal reproduction when reporting a problem; remove secrets and sensitive data from logs.

Contribution

For detailed guidelines, see how to contribute. Contributions to code, documentation, Skills, workflows, and reproducible examples are welcome.

Contributors Wall

DB-GPT contributors

License and disclaimer

DB-GPT is distributed under the MIT License. Read the disclaimer.

Academic citations

The following papers introduce the project and related research. They do not describe the compatibility of every current UI feature.

BibTeX references
@article{xue2023dbgpt,
      title={DB-GPT: Empowering Database Interactions with Private Large Language Models},
      author={Siqiao Xue and Caigao Jiang and Wenhui Shi and Fangyin Cheng and Keting Chen and Hongjun Yang and Zhiping Zhang and Jianshan He and Hongyang Zhang and Ganglin Wei and Wang Zhao and Fan Zhou and Danrui Qi and Hong Yi and Shaodong Liu and Faqiang Chen},
      year={2023},
      journal={arXiv preprint arXiv:2312.17449},
      url={https://arxiv.org/abs/2312.17449}
}
@misc{huang2024romasrolebasedmultiagentdatabase,
      title={ROMAS: A Role-Based Multi-Agent System for Database monitoring and Planning},
      author={Yi Huang and Fangyin Cheng and Fan Zhou and Jiahui Li and Jian Gong and Hongjun Yang and Zhidong Fan and Caigao Jiang and Siqiao Xue and Faqiang Chen},
      year={2024},
      eprint={2412.13520},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2412.13520}
}
@inproceedings{xue2024demonstration,
      title={Demonstration of DB-GPT: Next Generation Data Interaction System Empowered by Large Language Models},
      author={Siqiao Xue and Danrui Qi and Caigao Jiang and Wenhui Shi and Fangyin Cheng and Keting Chen and Hongjun Yang and Zhiping Zhang and Jianshan He and Hongyang Zhang and Ganglin Wei and Wang Zhao and Fan Zhou and Hong Yi and Shaodong Liu and Hongjun Yang and Faqiang Chen},
      year={2024},
      booktitle={Proceedings of the VLDB Endowment},
      url={https://arxiv.org/abs/2404.10209}
}

Star History

Star History Chart

DB-GPT (eosphoros-ai/DB-GPT)

正在搜索数据库…

20.3K ·GitHub
这是干什么的?一个开源的 AI 智能体数据助手:连接数据库、文件或知识库,用大白话提问,AI 会自动编写 SQL 和代码、执行分析,并生成图表、仪表盘和报告。
这是云服务,还是要我自己部署运行的?需要自己部署:它以 Python 包的形式安装,启动一个本地 Web 服务器,你通过浏览器里的 Web 界面来使用。它也可以作为平台,用来构建 AI 原生的数据应用。
怎么把它跑起来?在 macOS 和 Linux 上一行命令即可安装,或者用 Python 3.10+ 和 uv 或 pip 从 PyPI 安装。首次运行时,设置向导会让你选择 LLM 服务商并填写 API 密钥,之后 Web 服务器会自动启动。
必须有付费的 API 密钥吗,还是可以在本地跑模型?向导里提供多种服务商,比如 OpenAI 兼容 API、DashScope、Kimi 和 MiniMax。如果你想在自己的硬件上跑推理,也支持通过 vLLM 或 llama.cpp 使用本地 GPU 模型。
那个一行命令的安装器在 Windows 上也能用吗?不能——快速安装器只支持 macOS 和 Linux。Windows 用户需要参考进阶安装文档,里面还介绍了 Docker 和手动源码安装的方式。
我的数据比较敏感——它到底会被传到哪里?它就是为私有化部署设计的:隐私和执行安全依赖私有模型部署、代理脱敏和沙箱执行,你还可以搭配本地部署的模型,而不使用云端 API。
它能对接哪些数据源?关系型数据库、CSV 和 Excel 文件、文档和知识库——而且可以在同一个流程里混合使用多种数据源,比如数据库查询和表格分析可以放在同一个智能体任务里。
它支持哪些 LLM?官方列出的支持模型包括 DeepSeek、Qwen、GLM、Llama、Gemma、Yi、Starling、SOLAR、Mixtral 和 Phi;快速上手指南还提供了现成配置,比如通过 Moonshot 使用 Kimi 2.5,以及通过 OpenAI 兼容 API 使用 MiniMax。
默认从 PyPI 安装包含哪些东西?核心框架——CLI、FastAPI 服务器和 Agent——外加 OpenAI 兼容和 DashScope 的 LLM 支持、RAG 文档解析以及 ChromaDB 向量库,所以基础的 RAG 场景开箱即用。
我能把自己的分析流程打包起来复用吗?可以——领域知识、分析方法和执行步骤会打包成可复用的技能(skills),而且借助 AWEL,你还可以在这个平台之上组合出智能体、工作流和应用。
大小
556.4 MB
星标
20.3K
时长
3年
提交 · 90 天