DistillQL

DistillQL docs

DistillQL is a Python package. It runs SQL across the databases a company already has, each part under the login of the person who asked. It drafts a glossary of the company's terms from past queries and records how it got every answer. You can use it from the command line and Python, or let an AI app call its six tools over MCP.

Version 0.1.14 is an alpha. It runs on Python 3.11 to 3.13.

pip install distillql
distillql demo

Three ways to use it

  • On its own, from the command line or Python. pip install distillql is all you need. distillql crawl, glossary, review, sql and gaps run in a terminal, and import distillql gives the same engine and tools to a script or notebook. No AI is involved.
  • With any LLM. distillql ask distillql.yaml "your question" --model gpt-oss:20b answers with a model on this machine (Ollama or LM Studio) or, if the config allows it, a cloud model. DistillQL runs the conversation and keeps personal columns and most rows back from the model. See use any LLM.
  • Through an AI app. Install the MCP extra too: pip install 'distillql[mcp]'. Your app, such as Claude Code or Cursor, then starts distillql mcp itself and calls the six tools. There is nothing to keep running: the server starts and stops with the app.

Where to start

The configuration, command line and Python API pages list every option.

What it does not do

  • It calls no model. Your AI app brings the model, under your own plan or API key. DistillQL needs no key.
  • It writes nothing to your databases. On every engine, the planner refuses any query that is not one SELECT before it runs. Postgres also runs each query in a read-only transaction that is rolled back. A DuckDB file opened with read_only: true refuses writes itself. On Trino, Snowflake, BigQuery and Databricks the planner's check and the user's own rights are the only guards. The write tool saves to the local DuckDB session or to a file in write_dir, never to a connected database.
  • It sends nothing to us. It runs in your Python process and keeps its state in local files.

Reporting a problem

Use the form at distillql.com/interest. Say what you ran and what happened. For a security problem, say so in the form and leave out the details until we reply.