vanna-ai /vanna
๐ค Chat with your SQL database ๐. Accurate Text-to-SQL Generation via LLMs using Agentic Retrieval ๐.
โ
23,801โ 2,547๐ 4โ 337โ 515โค 78
+1
Daily
-4
Weekly
-20
Monthly
23,801
stars
2,547
forks
4
watchers
337
prs
515
issues
78
releases
README
Vanna 2.0: Turn Questions into Data Insights
Natural language โ SQL โ Answers. Now with enterprise security and user-aware permissions.
https://github.com/user-attachments/assets/476cd421-d0b0-46af-8b29-0f40c73d6d83
!Vanna2 Demo
---
What's New in 2.0
๐ User-Aware at Every Layer โ Queries automatically filtered per user permissions
๐จ Modern Web Interface โ Beautiful pre-built component
โก Streaming Responses โ Real-time tables, charts, and progress updates
๐ Enterprise Security โ Row-level security, audit logs, rate limiting
๐ Production-Ready โ FastAPI integration, observability, lifecycle hooks
Upgrading from 0.x? See the Migration Guide | What changed?
---
Get Started
Try it with Sample Data
Quickstart
Configure
Configure
Web Component
html
Uses your existing cookies/JWTs. Works with React, Vue, or plain HTML.
---
What You Get
Ask a question in natural language and get back:
1. Streaming Progress Updates
2. SQL Code Block (By default only shown to "admin" users)
3. Interactive Data Table
4. Charts (Plotly visualizations)
5. Natural Language Summary
All streamed in real-time to your web component.
---
Why Vanna 2.0?
โ
Get Started Instantly
Production chat interface
Custom agent with your database
Embed in any webpage
โ
Enterprise-Ready Security
User-aware at every layer โ Identity flows through system prompts, tool execution, and SQL filtering
Row-level security โ Queries automatically filtered per user permissions
Audit logs โ Every query tracked per user for compliance
Rate limiting โ Per-user quotas via lifecycle hooks
โ
Beautiful Web UI Included
Pre-built component โ No need to build your own chat interface
Streaming tables & charts โ Rich components, not just text
Responsive & customizable โ Works on mobile, desktop, light/dark themes
Framework-agnostic โ React, Vue, plain HTML
โ
Works With Your Stack
Any LLM: OpenAI, Anthropic, Ollama, Azure, Google Gemini, AWS Bedrock, Mistral, Others
Any Database: PostgreSQL, MySQL, Snowflake, BigQuery, Redshift, SQLite, Oracle, SQL Server, DuckDB, ClickHouse, Others
Your Auth System: Bring your own โ cookies, JWTs, OAuth tokens
Your Framework: FastAPI, Flask
โ
Extensible But Opinionated
Custom tools โ Extend the Tool base class
Lifecycle hooks โ Quota checking, logging, content filtering
LLM middlewares โ Caching, prompt engineering
Observability โ Built-in tracing and metrics
---
Architecture
!Vanna2 Diagram
---
How It Works
mermaid
sequenceDiagram
participant U as ๐ค User
participant W as ๐
participant S as ๐ Your Server
participant A as ๐ค Agent
participant T as ๐งฐ Tools
U-W: "Show Q4 sales"
W-S: POST /api/vanna/v2/chat_sse (with auth)
S-A: User(id=alice, groups=[read_sales])
A-T: Execute SQL tool (user-aware)
T-T: Apply row-level security
T-A: Filtered results
A-W: Stream: Table โ Chart โ Summary
W-U: Display beautiful UI
Key Concepts:
1. User Resolver โ You define how to extrTop issues
#721Support for MCP (Model Context Protocol) in Vanna.AI17 comments ยท 2024-12-04#176Add an overridable logging function13 comments ยท 2024-01-22#763Plotly figure always generating with y = [0...n]11 comments ยท 2025-01-31#331(FeatureRequest)Get LLM to use specific SQL in the question-sql pair in the chroma database11 comments ยท 2024-04-02#261Queries don't properly execute without "REBOOT" in Vanna Streamlit9 comments ยท 2024-02-26#1001vanna-components.js:114242 Uncaught TypeError: Re.trim is not a function8 comments ยท 2025-11-13#285Support for multiple database connections 7 comments ยท 2024-03-08#914Multi-Tenant support6 comments ยท 2025-06-23
Discussions
#1126Vanna2.0:How to find train menu in web ui0 comments ยท 2026-03-26#1120Is there any documentation about vanna-chat implementation and customization ?0 comments ยท 2026-03-15#1096How to integrate Amazon Bedrock in version 2.00 comments ยท 2026-02-17#1094Documentation issue on system prompts0 comments ยท 2026-02-13#1093Banner showing "Setup Required"0 comments ยท 2026-02-13#1092What's right way to train with custom sql?2 comments ยท 2026-02-13#1091To run vanna gitrepo code https://github.com/vanna-ai/vanna which file we have to use0 comments ยท 2026-02-12#1089Postgres migration0 comments ยท 2026-02-10
Latest release
v2.0.2 v2.0.2 2026-02-02What's Changed Fix ChromaDB collection retrieval triggering unnecessary embedding function initialization by @Copilot in https://github.com/vanna-ai/vanna/pull/1081 New Contributors @Copilot made their first contribution in https://github.com/vanna-ai/vanna/pull/1081 Full Changelog: https://github.com/vanna-ai/vanna/compare/v2.0.1...v2.0.2