๐ค Chat with your SQL database ๐. Accurate Text-to-SQL Generation via LLMs using Agentic Retrieval ๐.
๐ค Chat with your SQL database ๐. Accurate Text-to-SQL Generation via LLMs using Agentic Retrieval ๐.
Natural language โ SQL โ Answers. Now with enterprise security and user-aware permissions. https://github.com/user-attachments/assets/476cd421-d0b0-46af-8b29-0f40c73d6d83
๐ User-Aware at Every Layer โ Queries automatically filtered per user permissions
๐จ Modern Web Interface โ Beautiful pre-built <vanna-chat> 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?
<script src="https://img.vanna.ai/vanna-components.js"></script>
<vanna-chat
sse-endpoint="https://your-api.com/chat"
theme="dark">
</vanna-chat>Uses your existing cookies/JWTs. Works with React, Vue, or plain HTML.
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.
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
Pre-built <vanna-chat> 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
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
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
sequenceDiagram
participant U as ๐ค User
participant W as ๐ <vanna-chat>
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 UIKey Concepts:
<vanna-chat> component renders everything beautifullyHere's a complete example integrating Vanna with your existing FastAPI app and authentication:
โฆThen in your frontend:
<vanna-chat sse-endpoint="/api/vanna/v2/chat_sse"></vanna-chat>See Full Documentation for custom tools, lifecycle hooks, and advanced configuration
Extend Vanna with custom tools for your specific use case:
โฆVanna 2.0 includes powerful enterprise features for production use:
Lifecycle Hooks โ Add quota checking, custom logging, content filtering at key points in the request lifecycle
LLM Middlewares โ Implement caching, prompt engineering, or cost tracking around LLM calls
Conversation Storage โ Persist and retrieve conversation history per user
Observability โ Built-in tracing and metrics integration
Context Enrichers โ Add RAG, memory, or documentation to enhance agent responses
Agent Configuration โ Control streaming, temperature, max iterations, and more
Vanna is ideal for:
Upgrading from Vanna 0.x?
Vanna 2.0 is a complete rewrite focused on user-aware agents and production deployments. Key changes:
VannaBase class methods<vanna-chat> component and serverMigration path:
LegacyVannaAdapter to wrap your existing Vanna 0.x instance and get the new web UI immediatelySee the complete Migration Guide for step-by-step instructions.
MIT License โ See LICENSE for details.
Built with โค๏ธ by the Vanna team | Website | Docs | Discussions
SQL Injection vulnerability in `remove_training_data` (CVE-2026-4229)
Support for Vertex AI endpoint in GeminiLlmService class
Manual Training failed
ไฝ ไปฌๆฏๆไนๅปๅฎ็ฐ็ๆSQL็ๅ็กฎๆงไปฅ่ฝๅฐๅฐๅฎ้ ๅบ็จ็
Legacy OpenAI_Chat: temperature=0.7 causes 400 with models that only support default
Database Schema Awareness
Vanna 2.0 outputs too much process data on the conversation page
ๆๆ ทๅฏไปฅ่ฐ็จๆ็chromaDBๅ้ๅบ้่ฎญ็ป็ๅ ๅฎน
[Bug] Wrong SQL gets auto-saved to Tool Memory without validation โ Poisoned Memory problem
Does Vanna2.0 support connecting with vLLM๏ผ