Skip to content
RunningLake

The SQL agent

Ask in plain English. Answered within your access.

A business user whose role may run queries asks a question in words. The SQL agent, which is the Analyst Agent, turns it into SQL built from your team’s defined metrics and shows it first. The person runs it as themselves, so the answer holds only what they are allowed to see. Keep the question, and its SQL becomes a business flow: the same question, run again with new values, with no AI call. Neither is built yet; the build order says where each stands.

The SQL agent PLANNED Business flows PLANNED

Asking in plain English

01

A question in words.

PLANNED

Ask the way you would ask a colleague: what was revenue by region last quarter, for the Pro plan? Before the question is sent, RunningLake shows what it may cost.

02

SQL built from your metrics, shown first.

PLANNED

The SQL agent matches the question to the metrics your team has defined, and the platform compiles the SQL; the model never writes it. A question outside the defined metrics is refused, naming the closest metrics you can see.

03

Run as you, inside your access.

PLANNED

Nothing runs until you press Run, and then the statement runs as you. The catalog’s grants decide what you can read: a table you cannot read is not read for you. Column masks and row filters are planned with the policy compiler.

PLANNED
04

The answer, with its working.

PLANNED

The answer comes back with the SQL that produced it, the tables it read, the metric definitions it applied and how fresh the data is. The numbers go to you, never to the model.

Business flows

Ask once. Run it any time.

Most business questions come back every week or every quarter. A business flow keeps the question’s SQL, so the next answer needs no AI at all.

PLANNED
  • Built once. When you keep an answer, the parts that change become parameters: the plan, the quarter, the region.
  • Run again with new values. Next quarter, pick new values and press Run. No AI call, and no wait for a model.
  • Shared, never widened. Each person who runs a flow runs it as themselves, inside their own access, so sharing a flow never shares data.
Revenue by regionbusiness flow
SELECT region, SUM(amount) AS revenue
FROM   silver.sales.orders_paid
WHERE  plan = ‹plan›
  AND  date_trunc('quarter', paid_at) = ‹quarter›
  AND  (‹region› = 'All' OR region = ‹region›)
GROUP BY region
-- an illustration
Four of its runswho ran each
2 Oct · Pro · 2026-Q3 · All · the SQL agent built it
Ana
9 Oct · Growth · 2026-Q3 · All · no AI
Ben
16 Oct · Pro · 2026-Q3 · Europe · no AI
Chidi
23 Oct · Growth · 2026-Q3 · Europe · no AI
Ana
Runs so far, and AI calls
48 · 1

An illustration with made-up names and counts. A run keeps its values and who ran it, never its result. One AI call built the SQL, and every run since used none.

What it will not do

PLANNED

The SQL agent answers from the metrics your team has defined. A question about raw tables that no metric covers is refused rather than guessed, and the refusal names the closest metrics you can see. It never runs a statement itself, and it never sees an answer’s rows. Asking it a question widens nobody’s access: a table the person cannot read is not read for them.

How the agents work  ·  How access and governance work