Vanna
Retrieval-augmented text-to-SQL: train on your schema and docs, then ask questions in English and get accurate, runnable SQL.
Vanna
Vanna is a Python framework for accurate text-to-SQL over your own database. You "train" it on your DDL, documentation, and example queries; it stores those in a vector store and uses RAG so an LLM generates SQL grounded in your actual schema. Ask a question in plain English and Vanna returns runnable SQL, executes it, and can render the result as a table or chart.
Key features
- RAG-based text-to-SQL that improves as you add training data
- Model-agnostic (OpenAI, Anthropic, and others) and DB-agnostic (Postgres, Snowflake, BigQuery, MySQL, SQLite, and more)
- Pluggable vector stores (ChromaDB, Qdrant, and others)
- Runs from a notebook, Streamlit/Flask app, or embedded in your own agent
- Self-hostable — your schema and data stay in your environment
Well suited to analytics copilots and agent tools that need reliable SQL grounded in a specific warehouse rather than generic guesses.
Curated mirror of the open-source Vanna (MIT). Get it from the source.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/vanna-text-to-sql/check). Click a policy:
Consume Vanna programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/vanna-text-to-sql
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/vanna-text-to-sql/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add vanna-text-to-sql
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/vanna-text-to-sql/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "vanna-text-to-sql" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.