Documentation
Everything you need to know to use QueryAI and Kaveri.
On this page
Getting Started
Kaveri is a natural language to SQL interface built on top of QueryAI.
Upload a data file (CSV, Excel, JSON, or SQL), then ask questions in plain English.
Quick start:
1. Open [Kaveri](/kaveri)
2. Click the upload icon or drag & drop a file
3. Once uploaded, type your question in the chat input
4. View the generated SQL, explanation, and chart
No SQL knowledge is required. Kaveri handles everything.
Uploading Data
Supported formats:
Limits:
After upload, Kaveri automatically:
Asking Questions
Type any question about your data in the chat input. Examples:
Kaveri uses a tool-use agent loop:
1. `get_schema` — reads column names and types
2. `sample_data` — inspects a few rows to understand values
3. `execute_sql` — runs the generated SELECT query
This multi-step process produces more accurate SQL than single-shot generation.
Model Selection
Use the model dropdown in the sidebar to choose which AI model generates your SQL.
Available models:
|---|---|---|
Models are accessed via [OpenRouter](https://openrouter.ai) — one key, all models.
Guardrails & Safety
Kaveri includes two layers of safety:
**Input guardrails** — blocks off-topic questions:
**SQL safety checks** — blocks destructive operations:
Only read-only SELECT queries are ever executed on your data.
Self-Hosting
Prerequisites:
Backend setup:
cd backend
python -m venv .venv
.venv/Scripts/activate # Windows
pip install -r requirements.txt
cp .env.example .env # add your OPENROUTER_API_KEY
uvicorn main:app --reload
Frontend setup:
cd frontend
npm install
cp .env.example .env.local # set DATABASE_URL if using PostgreSQL
npm run dev
Open `http://localhost:3000` to start using QueryAI.