Overview

SenseQL is an AI-powered query agent that lets you talk to your databases in natural language.
Instead of writing SQL, just ask questions like:

“Show me all delivered orders in July.”

SenseQL will generate, run, and return SQL results automatically.

Supports:

  • PostgreSQL

  • Google BigQuery

1. Tech Stack

SenseQL is built with a modern, modular stack:

Frontend (React)

  • Login and authentication

  • Connect user databases

  • Chat interface for asking queries

Backend (NestJS + PostgreSQL)

  • User authentication and session management

  • Stores connected databases and chat history

  • Forwards queries to the GenAI server

GenAI Server (FastAPI + LangChain + LLMs)

  • Fetches schema from the user database

  • Selects tables and columns

  • Generates SQL queries

  • Executes SQL against PostgreSQL, BigQuery, or MySQL

2. System Workflow

How SenseQL turns your question into SQL:

  1. User Input
    You type a question in the chat.
    → Sent to backend via WebSocket.

  2. Table Selection Agent
    Picks the relevant tables from your schema.
    → Handles ambiguities and may ask clarifying questions.

  3. Column Selection Agent
    Matches query intent with column names.
    → Detects synonyms and typos.

  4. SQL Generation Agent
    Uses an LLM to build a safe, optimized SQL query.
    → Includes retries and error correction.

  5. Query Execution
    SQL runs on your database.
    → Results returned to the frontend and stored in chat.

3. Agents Explained

Table Selection Agent

  • Input: natural language + schema

  • Output: list of relevant tables

Column Selection Agent

  • Input: selected tables + user query

  • Output: relevant columns and data types

SQL Generation Agent

  • Input: tables + columns + query intent

  • Output: final SQL string (with previews and retries)

4. Integrations

SenseQL connects directly to:

  • PostgreSQL

  • Google BigQuery

Planned: Snowflake, MySQL



Create a free website with Framer, the website builder loved by startups, designers and agencies.