explaingit

vanna-ai/vanna

23,459PythonAudience · pm founderComplexity · 3/5MaintainedLicenseSetup · moderate

TLDR

Chat with your database in plain English. Vanna translates natural language questions into SQL queries, runs them, and returns results as tables and charts.

Mindmap

mindmap
  root((Vanna))
    What it does
      Chat with databases
      Translate English to SQL
      Show results as charts
    How it works
      AI language models
      Learns your data shape
      Retrieval-augmented generation
    Supported systems
      PostgreSQL MySQL Snowflake
      BigQuery SQLite
      OpenAI Anthropic Gemini
    Use cases
      Self-service analytics
      Non-technical exploration
      Embedded dashboards
    Enterprise features
      Row-level security
      Audit logs
      Rate limiting

Things people build with this

USE CASE 1

Embed a chat widget in your web app so non-technical team members can ask questions about sales, inventory, or customer data without writing SQL.

USE CASE 2

Build a self-service analytics dashboard where business users explore trends and metrics by typing natural language questions.

USE CASE 3

Replace manual data requests to analysts by letting stakeholders query your database directly and get instant answers with visualizations.

Tech stack

PythonFastAPIFlaskPostgreSQLMySQLSnowflakeBigQuerySQLite

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a database connection (PostgreSQL, MySQL, Snowflake, BigQuery, or SQLite) and API key for LLM integration.

Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

Vanna is a Python library that lets you chat with your database using plain English. Instead of writing SQL, a specialized language for querying databases, you just type a question like "show me Q4 sales" and Vanna translates it into the correct database query, runs it, and shows you the results as a table, chart, and a plain-English summary. It works by connecting an AI language model to your database, then using a technique called retrieval-augmented generation (RAG) to help the AI produce accurate SQL for your specific data structure. The AI learns the shape of your data so its queries actually work, rather than guessing. You would use Vanna if you run a business or data team and want non-technical colleagues to explore data without needing a data analyst. You embed a ready-made chat widget into your existing web app, point it at your database, and users can ask questions and get instant answers with charts. It supports many databases, including PostgreSQL, MySQL, Snowflake, BigQuery, SQLite, and many AI providers including OpenAI, Anthropic, Google Gemini, and others. The backend integrates with FastAPI or Flask. Version 2.0 adds enterprise features like row-level security (each user only sees their permitted data), audit logs, and rate limiting.

Copy-paste prompts

Prompt 1
I want to add a chat interface to my web app that lets users ask questions about our PostgreSQL database. How do I set up Vanna with FastAPI?
Prompt 2
Show me how to use Vanna's retrieval-augmented generation to teach the AI about my specific database schema so it generates accurate queries.
Prompt 3
How do I enable row-level security in Vanna so each user only sees data they're permitted to access?
Prompt 4
I have a Snowflake warehouse. Walk me through connecting Vanna to it and embedding the chat widget in my existing dashboard.
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.