13 Reasoning Primitives

Agents don't just query metrics. They reason about them.

Every analytical operation, governed

Each primitive takes a metric, applies a specific analytical operation, and returns a structured response. No raw SQL. No hallucinated analysis.

Primitive
What it does
root_cause
Decomposes a metric change into contributing factors across dimensions
correlate
Finds statistical relationships between two metrics or segments
threshold
Identifies optimal cutoff points using F1 scoring against ground truth
sensitivity
Measures how much a metric changes when individual dimensions shift
segment_performance
Compares metric values across all segments of a dimension
contribution
Shows each segment's share of the total metric value
drivers
Ranks dimensions by coefficient of variation to find what drives metric movement
anomalies
Detects statistical outliers using z-score or IQR methods
pareto
Identifies the vital few: which segments account for 80% of the value
trends
Detects direction, acceleration, and inflection points over time
forecast
Projects metric values forward using historical patterns
compare
Period-over-period comparison with absolute and percentage changes
health
Overall metric health check: freshness, volatility, anomaly count

The churn investigation chain

An agent doesn't just report that churn is up. It investigates why, by chaining primitives into an analytical narrative.

1
trends

Churn is accelerating

The trend primitive detects that churn isn't just up; the rate of increase is accelerating. This isn't a blip.

2
drivers

Country has CV = 5.7

The drivers primitive finds that the "country" dimension has a coefficient of variation of 5.7, the highest of any dimension. Churn isn't uniform.

3
sensitivity

94% concentrated in top 3 countries

Sensitivity analysis shows 94% of churn is concentrated in just three countries. The problem is geographic, not product-wide.

4
correlate

Churn independent of spending

The correlate primitive finds that churn is independent of customer spending levels. High-value customers are churning at the same rate. This isn't a pricing problem.

5
explanation

Agent builds the narrative

"Churn is accelerating, driven by geographic concentration in 3 countries, independent of spending. Likely a regional service or product issue. not pricing."

Uniform response structure

Every primitive returns the same shape. Agents always know what to expect.

analysis_response.json
{
  "value": // The computed result (number, array, object)
  "explanation": "Churn concentrated in 3 countries (94%)",
  "confidence": 0.87,
  "warnings": ["Small sample size in 2 segments"],
  "suggested_actions": [
    "Run segment_performance on country dimension",
    "Check correlate between churn and support_tickets"
  ]
}

Give your agents the power to reason

13 primitives. One response contract. Zero hallucinations.