MCP-native · Open Source

Your AI agents just found a 7.4% improvement in churn prediction. Overnight. Without writing SQL.

OnlyMetrix is a reasoning engine for your data warehouse. It compiles business logic, resolves ambiguity, runs 29 variations in under a second, and surfaces findings your team can act on.

For data teams shipping AI-powered products on Snowflake, Postgres, and ClickHouse.

analysis.root_cause("revenue", change="decreased")
Primary driver
Germany 72% of decline
enterprise accounts: -12 inactive
Suggested Investigate DACH strategy
13 primitives 29 variations < 1s

Two ways to give AI agents access to data

What everyone else is doing

Probabilistic data access

User / Agent
LLM
Inject Context
  • schemas
  • docs
  • lineage
  • embeddings
Generates SQL guess
Database
Result maybe correct

More context = better guesses

Still guessing.

OnlyMetrix

Deterministic data access

User / Agent
Selects Metric
Pre-defined Metric
  • SQL written by data team
  • tested
  • versioned
Database
Deterministic Result

No SQL generation

No ambiguity

Same input. Same output. Every time.

Don't help AI guess your data. Remove the guess.

AI agents shouldn't be writing SQL

Every team building AI agents hits the same wall:

  • How do you let agents query production data safely?
  • How do you prevent bad joins or wrong metrics?
  • How do you audit what actually ran?

Today's solutions rely on:

  • prompt engineering
  • schema injection
  • "context layers"

They make guessing better. They don't remove the risk.

3 agents, 1 question
Agent A "Revenue is $1.2M"
Agent B "Revenue is $1.4M"
Agent C "Revenue is $980K"

Metrics, not queries

OnlyMetrix replaces query generation with metric selection. Define metrics once. Agents can only run what's approved.

01

Define metrics

YAML or Python. Versioned and tested. Written by your data team, not generated by an LLM.

02

Connect your warehouse

Snowflake, Postgres, ClickHouse. One command. Tested before saved.

03

Let agents query safely

3 lines of code. No raw SQL access. Same input, same output, every time.

Deterministic

Same metric, same filters, same result. Every time.

Auditable

Know exactly what ran and why. Every query logged.

Safe by default

Agents cannot access undefined data. PII masking on every query.

Built for production

No prompt hacks. No hidden behavior. Rust core, sub-millisecond overhead.

A reasoning engine, not a query layer

OnlyMetrix compiles business logic, resolves ambiguity, tests variations, and surfaces findings. Here is what is running under the hood.

Compiler

Catches bad joins before they run. Fan-out detection, PII at compile time.

Semantic Layer

Resolves "show me the money" to your revenue metric. Five-layer understanding.

Autoresearch

+7.4% F1 improvement. 29 variations tested. Under a second.

Analysis

13 reasoning primitives. Root cause, sensitivity, threshold discovery.

Custom Analysis

Define, export, share. JSON DAGs shareable across your team.

Works With Your Stack

Connect your warehouse, install the SDK, or deploy as an MCP server. OnlyMetrix fits where you already are.

Snowflake

live

Native Snowflake connector with session management and token refresh

PostgreSQL

live

Connection pooling, read-only enforcement, statement timeouts

ClickHouse

live

HTTP API integration with secure and standard modes

Python SDK

live

pip install onlymetrix - query metrics from any Python app

MCP Protocol

live

Connect any MCP-compatible agent - Claude, GPT, custom agents

dbt

live

Sync metric definitions and column descriptions from dbt manifests

Use AI where it works.
Not where it breaks.

LLMs are great at
  • Reasoning
  • Planning
  • Summarizing
  • Natural language understanding
They are not reliable at
  • Writing correct SQL
  • Understanding your schema
  • Enforcing business definitions
  • Producing consistent results

OnlyMetrix keeps AI in the loop. Just not in control of your data layer.

A Peek at How Agents See Your Data

You define the metric. Agents query it. They never see the SQL.

config/metrics.yaml
metrics:
  - name: total_revenue
    description: "Total paid revenue in USD"
    sql: |
      SELECT SUM(total_cents) / 100.0
        AS revenue_usd
      FROM orders
      WHERE status = 2
    filters:
      - column: month
        type: date
      - column: region
        type: text
    tags: [finance, revenue]

  # Agents call query_metric("total_revenue")
  # and get back: revenue_usd = 4298.00

Agents never see the raw SQL

They only query the metrics you define. Filter values are type-checked and injected safely. No SQL injection, no schema leaks.

Agent Response
Metric total_revenue
Revenue (USD) $4,298.00
Filters Applied none
Execution 2ms
PII Columns Masked 0

Real numbers, not promises

679 tests, zero failures
+7.4% F1, first overnight run
29 variations tested in under a second
5,942 customers scored
42 E2E tests against real retail data

Built by someone who spent years watching AI agents give wrong answers about retail data, and decided to fix the foundation instead of the prompt.

Stop letting AI guess your data.

Define your first metric. Connect your warehouse. Let agents query safely.