Why an agent runtime is different.
SQL-generation layers expose one surface — render SQL for a metric.
An agent runtime exposes the steps an agent takes before it commits to SQL,
so failures land as recoverable structured errors, not silently-wrong rows.
01
Separate tools, not one endpoint
capabilities, discover, inspect,
plan, build-options, validate,
compile, and execute are each their own MCP
tool — alongside catalog, valid-values,
and three segment helpers. Agents can stop, branch, or backtrack at
any step instead of being forced through one opaque "give me SQL" call.
02
Structured errors with recovery hints
When a query doesn't fit, the runtime returns a typed envelope with
recovery_hints and closest_matches — usable
directly by the next tool call, no prompt-engineering glue required.
03
Inline scope classification
Every discover and plan call runs the
scope classifier inline. Intents that share no content tokens with the
package come back as out_of_scope or
low_relevance blocks — off-topic questions don't quietly
hit the warehouse.
04
Planner-owned rewrites
Mixed-grain requests, metric predicates, temporal-validity joins, and
same-store conversion live in the planner — not as helper views every
team has to re-author.
05
Explainable plans, not opaque SQL
compile's response carries the full explain payload —
alias resolution, chosen join paths, rewrite strategy, logical plan,
SQL AST, and rendered warehouse SQL — flattened into
compile_response_metadata so reviewers see everything
before trusting the result.
06
Packages as code, tested like code
Authored as versioned YAML with graphs, joins, clocks, value domains,
examples, and package-local tests. The CLI ships
parse-config, validate-config, and
test-package.