Skip to content

Analysis Primitives

OnlyMetrix includes 22 built-in analysis primitives. Each runs deterministically in Rust — the AI agent selects and orchestrates them, but the computation is exact.

Quick Reference

PrimitiveWhat it answersEndpoint
healthIs this metric behaving normally?Agent only
trendsHow has this metric changed over time?Agent only
driversWhat dimensions are driving changes?Agent only
segment_performanceHow do segments compare?Agent only
contributionWhat's each segment's share of the total?Agent only
compareHow do two cohorts or periods differ?Agent only
anomaliesAre there outliers in the data?Agent only
correlateDo two metrics move together?/v1/analysis/correlate
root_causeWhy did a metric change?Agent only
sensitivityHow much does the total change if one segment shifts?Agent only
forecastWhere is this metric heading?Agent only
causal_impactDid a specific event change the metric?/v1/analysis/causal-impact
scenarioWhat if we change a segment by X%?/v1/analysis/scenario
benchmarkHow does this metric compare to its own history?/v1/analysis/benchmark
cohortHow do user cohorts retain over time?/v1/analysis/cohort
funnelWhere do users drop off in a multi-step process?/v1/analysis/funnel
metric_impactIf metric A changes, how does metric B respond?/v1/analysis/metric-impact
counterfactualWhat would the total be without a specific segment?/v1/analysis/counterfactual
monitorSet a threshold condition and check if it's triggered/v1/analysis/monitor
data_qualityCheck nulls, duplicates, freshness, schema/v1/analysis/data-quality
paretoWhich segments account for 80% of the total?Agent only
thresholdFind natural breakpoints in the dataAgent only

Tier availability

PlanPrimitives included
Freehealth, trends, drivers, segment_performance, contribution, compare, anomalies
Team ($299/mo)All 22 primitives
EnterpriseAll 22 + custom primitives

Using via the AI agent

Ask natural language questions and the agent selects the right primitive:

You askAgent uses
"Why did revenue drop last month?"root_cause
"What would revenue be without France?"counterfactual
"Did the price change in March affect orders?"causal_impact
"How are customers retaining?"cohort
"What if we grow UK revenue by 10%?"scenario
"Which countries drive 80% of revenue?"pareto
"Is this metric trustworthy?"data_quality

Using via API

Analysis endpoints accept a JSON body with metric and primitive-specific parameters:

bash
curl -X POST https://api.onlymetrix.com/v1/analysis/causal-impact \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"metric": "total_revenue", "event_date": "2026-03-15"}'

See individual primitive pages for detailed parameter documentation.


Detailed guides

MIT Licensed (SDK) | Proprietary (Server)