Building DB, asking natural language questions through agents
Project description
🔗 SQLThought
Are you interested in quickly building a database from CSV files and asking questions in natural language? You’ve arrived at the right place!
Quick Install
pip install sqlthought
CLI commands
SQLThought includes a full command-line interface:
sqlthought- Show with the steps to followsqlthought --version— Show installed versionsqlthought configure— Configure Groq API + modelsqlthought init- Create workspace for setting up dbsqlthought build-db— Build a SQLite database from CSV filessqlthought query— Query your database using natural language
🤔 What is this?
SQLThought is built to simplify how people interact with structured data.
Many users know exactly what they want to ask — but writing SQL, understanding joins, tuning filters, or debugging errors takes time.
Traditional NLQ (Natural Language Query) systems jump from text → SQL directly, which often leads to invalid queries and unclear reasoning.
SQLThought takes a more reliable approach:
✅ It thinks step-by-step It analyzes the schema, decomposes the question, plans the query, generates SQL, executes it, and—if something fails—corrects the SQL automatically.
✅ It builds a database for you Just place your CSV files in a folder and run one command to generate a queryable SQLite database.
✅ It gives natural language answers Once SQL is executed, SQLThought converts the results back into a clean, conversational answer powered by Groq.
🧩 What are the key features?
Multi-Agent Reasoning
SQLThought uses LangGraph to orchestrate intelligent pipelines with:
- Stepwise decomposition
- State-aware execution
- Deterministic branches
- Automatic SQL correction loops
- Fully transparent, debuggable agent workflows
Groq-Powered LLM Execution
Fast agentic reasoning using Groq’s API, providing:
- Low-latency inference
- Predictable outputs
- Easy model switching
- Secure local configuration
Modular, Extensible Architecture
Every reasoning stage is isolated and replaceable.
Secure Local Config Storage
~/.sqlthought/config.json
Stores API keys and model preferences locally (never uploaded or logged).
NLQ to SQL conversion
The first reasoning module shipped with SQLThought is a full NLQ → SQL agentic system with:
- Schema understanding
- Subtask decomposition
- Query planning
- SQL generation
- SQL execution
- Automatic correction loops
💁 Contributing
Contributions, feature ideas, and pull requests are welcome! More documentation and developer guides will be added soon.
📕 License
MIT License © 2025 Tiyasa Mukherjee
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sqlthought-1.0.3.tar.gz.
File metadata
- Download URL: sqlthought-1.0.3.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e46a3b3175dd79d9ec5fea16605a19aedf0e4be5fe77ceb0cd2a8b3e5fc91b34
|
|
| MD5 |
2f49fddbdaadfd29df3f8130e08b7e88
|
|
| BLAKE2b-256 |
dd3a4beeb59ae483b2935fc7ca134f1721ec41d47728ba0754f397dc611217c1
|
File details
Details for the file sqlthought-1.0.3-py3-none-any.whl.
File metadata
- Download URL: sqlthought-1.0.3-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbab52650b0460ccc03c47b9a0279462f41cb44a66b335051bee44af4538d2b2
|
|
| MD5 |
e83c7f3333e18ce95bed23fc9f81a043
|
|
| BLAKE2b-256 |
591812ea3f38123dd6af532ef049d3b47222fa2ece4af550617100e354bac1e6
|