Know what your SQL may cost, change, and break — before you run it.
QueryFlow inspects analytics SQL before it is run, rewritten, or moved to another warehouse, and returns the safer SQL, the assumptions behind it, and verification queries you can run against your real data. It never connects to your database — zero database credentials by design.
Live: https://getqueryflow.xyz · API: https://api.getqueryflow.xyz · Pay-per-call via x402 on OKX X Layer (eip155:196) — verified end to end with real mainnet settlements (receipts). OKX.AI / A2MCP listing is in progress, not yet live.
| Service | Endpoint | What it does |
|---|---|---|
| Query Preflight (hero) | POST /v1/preflight |
Performance risks, semantic hazards, and warehouse-appropriate cost evidence — each finding traced to a real node of the query's AST. Mode 1 (static) or Mode 2 (evidence-backed with your own dry-run / EXPLAIN). |
| Rewrite + Verify | POST /v1/rewrite_verify |
A safer rewrite plus a graded equivalence verdict from a real differential test on a local engine, and verification SQL you run against production. |
| Port + Behaviour Diff | POST /v1/port |
Move a query to another warehouse with every behaviour difference classified (SYNTAX_CHANGED · SEMANTICS_PRESERVED · SEMANTICS_CHANGED · TARGET_CONFIGURATION_DEPENDENT · UNSUPPORTED) and cited to official documentation. |
| Auditable Data Repair | POST /v1/repair |
Clean a CSV with a receipt for every change (row/column/before/after/rule/confidence) and an undo path — four artifacts (cleaned file, changes, unresolved, undo manifest). Ambiguous cells are left untouched, never guessed. |
| Transformation Contract | POST /v1/transformation_contract |
Turn a model into a contract, not just SQL: declared grain, primary-key expectation, engine-generated data tests, a reconciliation query, input assumptions, and known failure cases. |
Supported dialects: DuckDB, PostgreSQL, BigQuery, Snowflake.
- Deterministic core, LLM assist. A real SQL parser (sqlglot) + a real local engine (DuckDB) do the work. The model only proposes; every proposal returns to the engine to be parsed, executed, and diffed before it reaches the caller.
- No fakes. Every figure is computed by a real engine or is
nullwith a stated reason.evidence.executedcan only be set by a path that actually ran the engine. - No uncited semantic claims. Every dialect-behaviour rule carries a documentation URL
(see
docs/verification.md). - Calibrated language. Differential testing is evidence, not proof. Graded verdicts.
- Secrets are radioactive. Credential-shaped input is rejected before processing.
src/queryflow/ the deterministic engine + FastAPI app (queryflow.api:app)
tests/ gate tests for every phase (parse, execute, diff, verdict, contract, port, HTTP)
deploy/ ASP deployment (x402 payment gate via okxweb3-app-x402, systemd, Caddy)
docs/ verification log, unit economics, phase reports, builder→auditor handovers
python -m venv .venv && .venv/bin/pip install -r requirements.txt pytest
.venv/bin/python -m pytest tests -qThe deployed endpoint gates each service behind an x402 payment on OKX / X Layer
(eip155:196), schemes exact + aggr_deferred, via the OKX facilitator. An unpaid call
returns a standard 402 challenge; a paid, settled call returns the result. Configuration
is in deploy/queryflow.env.example.