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
Metadata
Release files for querygate 0.1.0.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| querygate-0.1.0.dev0.tar.gz | 43.3 kB | Without provenance | Details for querygate-0.1.0.dev0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| querygate-0.1.0.dev0-py3-none-any.whl | Python 3 | none | any | Details for querygate-0.1.0.dev0-py3-none-any.whl |
Total release size: 97.5 kB
Release files / querygate-0.1.0.dev0.tar.gz
| Download URL | querygate-0.1.0.dev0.tar.gz |
|---|---|
| Size | 43.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1cff8e186ce19a038458b2d331ebe147302d7316fb18d31be040299e0d618c0
|
|
BLAKE2b-256 checksum How to use checksums |
27965dadd6fbd49c4b8a0b1fe943b122acf1b1b573e6476f8bb4e88095e2bf5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / querygate-0.1.0.dev0-py3-none-any.whl
| Download URL | querygate-0.1.0.dev0-py3-none-any.whl |
|---|---|
| Size | 54.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b585d83b6b1fb408f02ff7cb7678e5ea509dd52097a5af53a4641369d23743d
|
|
BLAKE2b-256 checksum How to use checksums |
a2a27575364cbfea561f362d2c535f1b2106bace30c54192f060936361365860
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for querygate 0.1.0.dev0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.