Skip to content

Guide · Open source

How to use DB-GPT: install, connect your data and run analysis

Updated · written with AI from the project's own documentation and checked against our catalogue data

DB-GPT is an open-source agentic AI data assistant. You connect it to databases, CSV or Excel files, warehouses or knowledge bases, then ask questions in plain language and get back SQL, code, charts and written summaries. This guide shows you how to install it from PyPI, start it, and use it to explore your data, while noting where you still need to check the results yourself.

DB-GPTeosphoros-ai/DB-GPT · ★ 20.2k · MIT

Quick start

  1. 1Check prerequisites. Confirm you have Python 3.10 or newer and either uv or pip installed.
  2. 2Install the package. Run uv pip install dbgpt-app, or pip install dbgpt-app.
  3. 3Start DB-GPT. Run dbgpt start in your terminal.
  4. 4Complete the setup wizard. Choose an LLM provider and enter your API key when prompted.
  5. 5Open the web UI. Visit http://localhost:5670 in your browser.
  6. 6Connect your data. Add CSV, Excel, a database or a knowledge base to your workspace.
  7. 7Ask and verify. Ask a question in plain language, then review the generated SQL and code before trusting the result.

What do you need before you install DB-GPT?

DB-GPT is a Python package. The README lists Python 3.10 or newer as the prerequisite, plus uv (recommended) or pip as the installer.

The assistant needs a language model to run. Per the README, the first-run setup wizard asks you to choose an LLM provider and enter an API key, so have one ready, or be prepared to set up a local model.

  • Python 3.10+
  • uv (recommended) or pip
  • An LLM API key or a local model setup

How do you install DB-GPT from PyPI?

No source checkout is required for the PyPI route. Install the package with uv, which the README recommends, or with pip.

  • With uv (recommended): install the dbgpt-app package.
  • With pip: install the same dbgpt-app package.
uv pip install dbgpt-app # Or with pip pip install dbgpt-app

How do you start DB-GPT and finish setup?

Run the start command. On first run, an interactive setup wizard guides you through choosing an LLM provider and entering your API key. When setup is complete, the web server starts automatically.

Open the web UI at http://localhost:5670 in your browser. The README uses this address for the UI.

  • Run dbgpt start in your terminal.
  • Pick an LLM provider and enter your API key in the wizard.
  • Visit http://localhost:5670.
dbgpt start

How do you connect your data sources?

DB-GPT works across structured and unstructured sources. According to the README, you can connect databases, spreadsheets such as CSV and Excel files, documents, warehouses and knowledge bases. The product workflow starts by connecting these in one workspace.

  • Upload or connect CSV and Excel files.
  • Connect a database or warehouse.
  • Add a knowledge base for document retrieval.

How do you ask questions and get analysis?

Ask a business question in natural language. DB-GPT plans the task, writes SQL and Python code, runs it step by step, and can produce charts, dashboards, HTML reports and summaries.

Treat the output as a draft. The README warns that AI-written queries can be wrong, so read the generated SQL and code before you rely on any number.

  • Ask for a summary, a metric or a chart in plain language.
  • Open the generated SQL or code and check it against your data.
  • Use the output reports for decisions only after you have verified them.

How do skills and sandboxed execution help?

Skills package domain knowledge, analysis methods and workflows so you can reuse them for repeatable business analysis. The README describes importing a skill, including from GitHub.

Code and tools run in isolated sandboxed environments, which the README presents as a safer way to execute analysis.

  • Load a reusable skill for a repeated report.
  • Run generated code in the sandbox rather than directly on your system.

What people use it for

  • Asking questions of a CSV or Excel file in plain language
  • Exploring a database without writing SQL by hand
  • Generating charts, dashboards and HTML reports from analysis
  • Reusing domain-specific SQL analysis skills across a team
  • Building custom data agents and workflows for a product

Frequently asked questions

Is DB-GPT free to use?

DB-GPT is released under the MIT licence, as listed in the project details. You still need an LLM API key or a local model, and the README does not describe pricing for model providers.

What do I need to install DB-GPT?

The README lists Python 3.10 or newer and uv (recommended) or pip. You install the dbgpt-app package and then run dbgpt start.

How do I start DB-GPT for the first time?

Run dbgpt start. On first run an interactive setup wizard asks you to choose an LLM provider and enter your API key, then the web server starts. Open http://localhost:5670 in your browser.

Can DB-GPT answer questions about a CSV or Excel file?

Yes. The README says you can analyze CSV and Excel files, ask questions in natural language, and generate visual reports. Check the generated code and SQL before relying on the answer.

Are DB-GPT's SQL answers always correct?

No. The project describes AI-written queries as capable of being wrong, so you should review the generated SQL and code, especially for figures you will act on.

How does DB-GPT compare to LangChain, LlamaIndex, Vanna or PandasAI?

DB-GPT is a broad platform covering data analysis, skills, sandboxed execution and agent building, and the README describes it as having many components. If you need a small, simple tool, a narrower option may suit you better. Compare the scope of each project before choosing.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

DB-GPT suits analysts who want to question CSV, Excel or database data in plain language, and developers building data agents and workflows. Skip it if you need guaranteed-correct numbers without reviewing the code, have no LLM access, or want a small, simple tool.

Install options & downloads