Talk to your database in natural language — replace your enterprise web admin console.
🤖 DB-GPT-X is an open-source data application development framework that uses Large Language Model (LLM) technology to interact with databases through natural language, replacing traditional web management backends.
🌐 Currently we provide query access only. Support for full CRUD operations (Create, Read, Update, Delete) is under internal testing and will be released soon.
🚀 In the Data 3.0 era, DB-GPT-X enables enterprises and developers to build custom applications with less code — letting developers focus on complex business logic instead of managing admin consoles.
git clone https://github.com/sql-agi/DB-GPT-X- Configure the
.envfile (reference:templates.env_temple) - Set
OPENAI_API_KEYandOPENAI_API_BASE(official API key recommended) - Switch to the docker directory:
cd DB-GPT-X/docker- Follow the instructions in
docker/README.md
Note: To customize the database schema or seed data, edit
/docker/sql/init.sql.
Prerequisites: Python 3.9, Conda
conda create --name db-gpt python=3.9
conda activate db-gpt
pip install -r requirements.txtConfigure .env (reference: templates.env_temple):
| Variable | Required |
|---|---|
OPENAI_API_KEY |
✅ |
OPENAI_API_BASE |
✅ |
MYSQL_HOST |
✅ |
MYSQL_PORT |
✅ |
MYSQL_USER |
✅ |
MYSQL_PASSWORD |
✅ |
MYSQL_DATABASE |
✅ |
🔥 We strongly recommend using the official OpenAI API key. Third-party relay keys may produce degraded results.
python web_demo.pyThe program starts a local web server. Open the printed URL in your browser. The latest version features a typewriter effect for improved UX.
By default
share=False. Setshare=Truein web_demo.py for public access via Gradio's relay server (note: this may reduce typewriter performance).
python cli_demo.pyInteractive conversation in the terminal. Type quit to exit.
python api.pyStarts a local server on port 8000. Call via POST:
curl -X POST "http://127.0.0.1:8000/chat/db" \
-H "Content-Type: application/json" \
-d '{"input": "hello"}'Response:
{
"reply": "Hello! How can I help you?"
}- Frontend: Richer UI, support for more database types and open-source LLMs
- Backend: Deep testing of complex CRUD scenarios, environment switching, role-based permissions
- Community: More user feedback integration; contributors welcome
Join the DB-GPT-X WeChat community to discuss and share feedback.
Follow our official WeChat account for updates.
DB-GPT-X is an independently developed open-source project maintained by the sql-agi team.
This project has no affiliation, authorization, endorsement, or cooperative relationship with eosphoros-ai/DB-GPT.
The source code, architecture design, and core implementations of DB-GPT-X are independently developed and maintained by the sql-agi team.





