DataGrout.ai Logo
Tool Suite ยท Math

Deterministic Numerics.
Zero Credits. Zero Hallucinations.

Math is DataGrout's numeric engine for AI agents. Generate sequences, compute statistics, fit regressions, detect outliers, and normalize distributions โ€” all in-process, deterministic, and completely free.

12 tools

generation ยท analysis ยท modeling

100% deterministic

seed for bit-for-bit reproducibility

Free forever

gateway costs waived entirely

Pairs naturally with Prism โ†’ to turn numeric output into charts and visual reports

Free to start ยท No credit card required

12 Tools Across Three Areas

Generation builds sequences, Analysis summarizes and cleans, Modeling fits and forecasts. All accept cache_ref โ€” pipe data from any prior tool call without re-sending through the LLM.

math.range@1

math.range

Evenly-spaced sequences

Free

Generate a numeric sequence from start to stop with a fixed step. Computed as start + i ร— step to avoid floating-point drift. Accepts negative steps for descending ranges. Maximum 10,000 values per call.

Key Parameters

stop (required)start (default 0)step (default 1)label

Response Shape

values[], records[], count, start, stop, step

What Agents Use Math For

LLMs can describe math. Math tools do it โ€” deterministically, at scale, for free.

LLM-Free Descriptive Statistics

An agent receives 50,000 rows of sales data from Salesforce. Instead of sending values through the LLM for summarization, pipe the cache_ref to math.describe โ€” get mean, median, percentiles, and a histogram in one call at zero cost.

math.describecache_ref chaining

Anomaly Detection in Pipelines

Detect metric spikes, pricing anomalies, or sensor outliers before they propagate. math.outliers returns exact indices and bounds using IQR or z-score โ€” no heuristics, no hallucinated thresholds.

math.outliersmath.describe

Regression & Trend Forecasting

Fit a linear or polynomial trend to time-series revenue data, get an equation string and r-squared, and extend N steps into the future. Agents can quote trend direction with reproducible numbers โ€” not LLM guesses.

math.trendmath.window

Reproducible Synthetic Datasets

Seed math.sample with an integer and get bit-for-bit identical draws every run. Build test fixtures, simulate load patterns, or generate benchmark datasets without touching production data.

math.samplemath.sequence

Correlation Analysis Across Fields

Pass a Frame tool result via cache_ref to math.correlate โ€” get a full Pearson and Spearman matrix with r-squared and interpretation labels across every field pair. No LLM inference, instant results.

math.correlateframe.select

Easing Curves for Animations & UI

Generate a linspace, pipe it through math.interpolate with ease_in_out_cubic or any of 12 easing functions, and pass records to prism.chart. Build smooth animation keyframes or progress curves without writing any math.

math.linspacemath.interpolateprism.chart
Power-Up Combos

Math Gets More Powerful With Other DataGrout Tools

Chain Math into pipelines with Prism, Frame, Flow, and Logic to build complete numeric intelligence workflows.

Math+prism.chart

Instant Visualization Pipeline

Pass Math output records directly to prism.chart via cache_ref. Generate a histogram from math.describe, plot a regression fit from math.trend, or visualize an easing curve from math.interpolate โ€” all in two tool calls.

math.describe โ†’ prism.chart(cache_ref, goal='histogram of distribution')

โœฆ Numeric output becomes a hosted chart in one hop

Math+frame.filter

Pre-Filter Then Analyze

Use frame.filter to isolate a relevant slice of records (e.g. Q4 revenue only), then pipe the cache_ref into math.describe or math.trend. No re-fetching, no LLM overhead โ€” the data stays server-side throughout.

frame.filter(cache_ref, Q4=true) โ†’ math.correlate(cache_ref)

โœฆ Sub-second statistical analysis on pre-filtered datasets

Math+flow.into

Automated Analysis Workflows

Build a flow that fetches data from an integration, runs math.outliers to detect anomalies, branches on findings with flow.route, and notifies via a downstream tool โ€” all scheduled via Governor.

salesforce.query โ†’ math.outliers โ†’ flow.route(outliers_found) โ†’ notify

โœฆ Autonomous anomaly detection without manual intervention

Math+logic

Persist Numeric Facts

Assert math results as Logic facts โ€” correlation coefficients, trend directions, outlier counts. Future agent calls can query these without re-running the analysis, making historical patterns available at sub-millisecond speed.

math.trend โ†’ logic.remember('revenue_slope', coeff[0])

โœฆ Numeric intelligence that persists across agent sessions

Conduit SDK

Math in Practice

One import. Auth, retries, and cache_ref chaining all handled by the Conduit SDK.

math.describe ยท Python ยท Conduit SDK
from datagrout.conduit import Client

async with Client(
    "https://gateway.datagrout.ai/servers/{uuid}/mcp",
    auth={"bearer": "your-access-token"}
) as client:

    # Step 1: fetch data from Salesforce (result cached server-side)
    sf_result = await client.perform(
        "salesforce@1/get_opportunities@1", {}
    )
    cache_ref = sf_result["_meta"]["datagrout"]["cache_ref"]

    # Step 2: describe the 'amount' field โ€” no data re-sent
    stats = await client.perform("data-grout@1/math.describe@1", {
        "cache_ref": cache_ref,
        "field": "amount",
        "bins": 20
    })

    print(f"Mean: {stats['mean']:.2f}")
    print(f"Std:  {stats['std']:.2f}")
    print(f"P95:  {stats['percentiles']['p95']:.2f}")
    # stats['histogram'] โ†’ ready for prism.chart

Also available in TypeScript, Rust, Elixir, and Ruby. View Conduit SDK โ†’

Frequently Asked Questions

Everything developers ask before integrating Math tools.

More questions? Read the full Math documentation.

Deterministic numerics. Zero credits. Production-ready.

Math tools run fully in-process โ€” no LLM, no external calls, no token cost. Chain them with Prism, Frame, and Logic to build complete numeric intelligence pipelines for your agents.

Free to start ยท No credit card required

We use cookies to improve your experience, analyze site traffic, and serve personalized content. By clicking "Accept All", you consent to our use of cookies. See our Privacy Policy for details.

Ask the Advisor