This release is a pre-release and may not be stable for production use.
querygate
Vanna answers questions with your database. querygate makes sure a human said yes first — and can prove it.
The moat: airgapped · evaluated · audited · human-gated.
Text-to-SQL engines (Vanna, WrenAI, DB-GPT) generate SQL well. None of them answer the questions an enterprise deployment actually asks:
- Who approved this query before it ran?
- What did the model try before it got it right?
- How do we pause for a human — and resume cleanly when they answer an hour later?
- Can this run fully airgapped?
querygate is that missing layer. It is not another engine — it orchestrates one (Vanna by default, swappable by config) inside a checkpointed LangGraph flow with two human gates:
rewrite → ambiguity check ⟲ → schema retrieval → SQL generation → validation ⟲
(clarify interrupt) (retry loop)
→ human approval → execute
(approve interrupt)
- Clarify before generating — catches ambiguous intent ("recent" — by which date?).
- Approve before executing — a human sees the SQL before it touches the database. Mandatory by default; relaxable only by explicit config.
What ships in the box
- The graph (
core/graph.py) — checkpointed, interrupt-driven, resumable across slow human responses. The retry loop is invisible to the UI; only real interrupts surface. - Pluggable everything (
core/deps.py) —SchemaProvider,GenerationModel,DBConnector,AuditSinkprotocols. A deployment is one YAML file, zero code. - Audit trail — every generation attempt (not just the final one), every clarification, every approval decision, as JSONL. Approved pairs are training-ready for a future self-learning loop by design.
- Safety preflight — refuses to start against a database role without
default_transaction_read_only=on,statement_timeout, and an idle timeout. Row limits enforced on execution. - Offline eval harness — frozen gold sets, execution-accuracy scoring (result-set comparison), optional LLM-jury rubric tier that supplements — never replaces — it.
- Airgap-first — local models via Ollama, pgvector on your existing Postgres,
no runtime downloads, no external calls. See
docs/airgap-deployment.md.
Status
0.1.0.dev — scaffold. See the roadmap in docs/charter.md.
License
Apache-2.0
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 querygate-0.1.0.dev0.tar.gz.
File metadata
- Download URL: querygate-0.1.0.dev0.tar.gz
- Upload date:
- Size: 43.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1cff8e186ce19a038458b2d331ebe147302d7316fb18d31be040299e0d618c0
|
|
| MD5 |
492290e5dadb6fba6c160ef221f3d18f
|
|
| BLAKE2b-256 |
27965dadd6fbd49c4b8a0b1fe943b122acf1b1b573e6476f8bb4e88095e2bf5d
|
File details
Details for the file querygate-0.1.0.dev0-py3-none-any.whl.
File metadata
- Download URL: querygate-0.1.0.dev0-py3-none-any.whl
- Upload date:
- Size: 54.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b585d83b6b1fb408f02ff7cb7678e5ea509dd52097a5af53a4641369d23743d
|
|
| MD5 |
442954186ea3a91bba9ea28bb2631fab
|
|
| BLAKE2b-256 |
a2a27575364cbfea561f362d2c535f1b2106bace30c54192f060936361365860
|