Skip to content

inloop20/dbassistance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI SQL Assistant

An AI-powered assistant that converts natural language queries to SQL using Google Gemini + LangGraph.

📂 Project Structure

  • sql-assistance-frontend/: UI built with HTML, CSS, JS
  • sql-assistance-backend/: Python backend using LangGraph, SQLAlchemy, Google Gemini

🔐 Setup

1. Clone & Install Dependencies

cd sql_agent_-backend
pip install -r requirements.txt

⚙️ Backend Setup

Located in sql_agent_backend

1. 🔧 Prerequisites

  • Python 3.8+
  • PostgreSQL (with an existing database)
  • Google AI Key (for Gemini)
  • psycopg2 and langchain dependencies

2. 📦 Install Dependencies

cd sql_agent_backend
python -m venv venv
source venv/bin/activate  # For Windows: venv\Scripts\activate
pip install -r requirements.txt
  1. 📁 Environment Variables Create a .env file in the project root You can use .env.example as a template
cp .env.example .env
  1. 🚀 Run Frontend Simply open the HTML file in your browser: open index.html

Then from sql_agent_backend:

python sql_agent.py

This will:

Load schema from PostgreSQL

Run LangGraph to interpret user prompts

Generate & validate SQL

Execute and return results

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published