Installation From Source#

To get started, install DB-GPT with the following steps.


Download DB-GPT

git clone

Install Miniconda

We use Sqlite as default database, so there is no need for database installation. If you choose to connect to other databases, you can follow our tutorial for installation and configuration. For the entire installation process of DB-GPT, we use the miniconda3 virtual environment. Create a virtual environment and install the Python dependencies. How to install Miniconda

conda create -n dbgpt_env python=3.10
conda activate dbgpt_env
# it will take some minutes
pip install -e ".[default]"
cp .env.template .env

2.Deploy LLM Service#

DB-GPT can be deployed on servers with low hardware requirements or on servers with high hardware requirements.

If you are low hardware requirements you can install DB-GPT by Using third-part LLM REST API Service OpenAI, Azure, tongyi.


As our project has the ability to achieve OpenAI performance of over 85%,


Notice make sure you have install git-lfs

centos:yum install git-lfs

ubuntu:apt-get install git-lfs

macos:brew install git-lfs

Installing Dependencies

pip install -e ".[openai]"

Download embedding model

mkdir models and cd models

#### embedding model
git clone
git clone

Configure LLM_MODEL, PROXY_API_URL and API_KEY in .env file



Make sure your .env configuration is not overwritten

3.Prepare sql example(Optional)#

(Optional) load examples into SQLite

bash ./scripts/examples/

On windows platform:


4.Run db-gpt server#

python pilot/server/

Open http://localhost:5000 with your browser to see the product.