Deterministic data access for AI agents.
Use AI for reasoning, not for querying your warehouse. Your data team defines metrics. Your agents just select them. No SQL generation. No hallucinations.
For data teams shipping AI-powered products on Snowflake, Postgres, and ClickHouse.
Two ways to give AI agents access to data
Probabilistic data access
- schemas
- docs
- lineage
- embeddings
More context = better guesses
Still guessing.
Deterministic data access
- SQL written by data team
- tested
- versioned
No SQL generation
No ambiguity
Same input. Same output. Every time.
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.
Metrics, not queries
OnlyMetrix replaces query generation with metric selection. Define metrics once. Agents can only run what's approved.
Define metrics
YAML or Python. Versioned and tested. Written by your data team, not generated by an LLM.
Connect your warehouse
Snowflake, Postgres, ClickHouse. One command. Tested before saved.
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.
Works With Your Stack
Connect your warehouse, install the SDK, or deploy as an MCP server. OnlyMetrix fits where you already are.
Snowflake
liveNative Snowflake connector with session management and token refresh
PostgreSQL
liveConnection pooling, read-only enforcement, statement timeouts
ClickHouse
liveHTTP API integration with secure and standard modes
Python SDK
livepip install onlymetrix - query metrics from any Python app
MCP Protocol
liveConnect any MCP-compatible agent - Claude, GPT, custom agents
dbt
liveSync metric definitions and column descriptions from dbt manifests
Use AI where it works.
Not where it breaks.
- Reasoning
- Planning
- Summarizing
- Natural language understanding
- 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.
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.
Stop letting AI guess your data.
Define your first metric. Connect your warehouse. Let agents query safely.