Field guide: the open-source NL2SQL stack
Vanna, Wren AI, DB-GPT, the Dataherald engine, SQLCoder — what each is actually for, and how to choose.
The open-source text-to-SQL ecosystem sorts into four rough roles. Most production stacks combine two or three.
The framework: Vanna
Vanna (MIT) is the default starting point: a Python RAG framework you train on your own DDL, documentation, and known-good SQL pairs. Model-agnostic, vector-store-agnostic, database-agnostic. Its insight — that your organization's past queries are the best grounding data you own — became the standard OSS pattern. Choose it when you want a library, not a product.
The semantic-layer product: Wren AI
Wren AI (AGPL) is the open-source answer to Cortex Analyst: it builds an explicit semantic modeling layer (MDL) over your database, then serves a full GenBI experience — chat, SQL, charts, summaries — through a web UI. Choose it when the consumers are business users and you want grounding you can version-control.
The platform: DB-GPT
DB-GPT (MIT, eosphoros community) is the kitchen-sink option: local model support, a text-to-SQL fine-tuning hub, multi-agent orchestration, and the AWEL workflow language. Popular where data cannot leave the building. Choose it when you're building data applications, not just answering questions — and budget time for its surface area.
The reference engine: Dataherald
The Dataherald engine (Apache-2.0) survives its company as one of the cleanest reference architectures in the space: API-first NL2SQL with context stores, golden-SQL feedback loops, and evaluation hooks. Choose it to study or fork a production-shaped service design.
The models: SQLCoder
Defog's SQLCoder line proved that SQL-specialized open-weight models compete with far larger generalists on this task. Pair one with Vanna or your own pipeline when latency, cost, or data residency rule out frontier APIs.
The honest caveats
Every one of these inherits the field's open problems: semantic drift as schemas evolve, evaluation on your data (public leaderboard rank transfers poorly), and the wrong-but-plausible failure mode that no framework fully solves. The projects that take those seriously in their docs tend to take them seriously in their code.
The full directory — licenses, links, and coverage history — lives on the tools page, updated as the ecosystem moves.
sources
- Vannagithub.com
- Wren AIgithub.com
- DB-GPTgithub.com
- Dataherald enginegithub.com
- SQLCodergithub.com
- Welcome to nl2sql.aiAug 10, 2026
- The state of natural-language-to-SQL, August 2026Aug 10, 2026
- Why BIRD became the benchmark that mattersAug 10, 2026