An advanced MySQL Copilot that evolves from simple NL → SQL into a schema-aware, self-correcting, agentic system with performance insights and optional VS Code integration.
This repository is organized into phases:
- Phase 1 (MVP) – Backend with NL → SQL, schema introspection, and safe query execution (implemented in
backend/). - Phase 2 (Agentic) – Tool-based agent (schema, run, explain, self-correct).
- Phase 3 (Differentiator) – Query performance optimization engine and/or SQL dialect migration + VS Code integration.
mysql-agentic-copilot/
│── backend/ # FastAPI backend (Phase 1 complete)
│── README.md # Project-level documentation
See backend/README.md for detailed steps.
Quick start:
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\\Scripts\\activate
pip install -r requirements.txt
cp .env.example .env
# Add your OpenAI key in .env
uvicorn main:app --reloadAPI docs: http://127.0.0.1:8000/docs
A Dockerfile is provided in backend/ and docker-compose.yml in the root.
To build and run with Docker:
docker compose up --buildThis will spin up:
backendservice on port 8000- (You can later add a
mysqlservice for local DB if needed.)
- Phase 1 – MVP backend
- Phase 2 – Agentic execution & self-correction
- Phase 3 – Performance analysis & VS Code integration