Dashboards were built for eyes. Here's how to make analytics work for AI agents
Digital analytics is a visual industry. We think in dashboards: line charts with a comparison period, funnels with drop-off bars, a red number that means "look here". A good analyst reads a dashboard in seconds because t
Digital analytics is a visual industry. We think in dashboards: line charts with a comparison period, funnels with drop-off bars, a red number that means "look here". A good analyst reads a dashboard in seconds because the design does half the work.
AI agents can't use any of that. They don't glance at a chart. They read text and numbers, one token at a time, and they have no idea that the red tile matters more than the grey one.
So when people ask "can we just connect an agent to our analytics?", the honest answer is: yes, but not to the dashboards. You have to rebuild what the dashboard was doing for the human. Here's how I'd approach it.
What a dashboard actually does
Before translating anything, it helps to list what a good dashboard gives a human that raw data doesn't:
- Definitions. "Conversion rate" on this tile means purchases / sessions, last-click, excluding internal traffic. Nobody says this out loud; it's baked into the chart.
- Comparison. Every number is shown against something: last week, same week last year, target.
- Salience. Colour, size and position tell you what matters.
- Context. Annotations: "campaign launched", "tracking broken 3–5 May".
- Guardrails. You can only see the cuts someone decided were meaningful.
An agent pointed at a raw analytics API gets none of this. It gets dimensions, metrics and numbers, and it will happily compute a conversion rate from the wrong denominator and explain it confidently.
Step 1: Write the semantic layer down
The single most important thing is to make your metric definitions explicit and machine-readable. Something like:
metrics:
conversion_rate:
description: Purchases divided by sessions, excluding internal traffic.
numerator: purchases
denominator: sessions
filters: [traffic_type != "internal"]
good_direction: up
bounce_rate:
description: Share of sessions with a single page view and no engagement events.
good_direction: down
This is the analytics equivalent of "the chart title and the tooltip". Whether you keep it in YAML, dbt's semantic layer or a tool like Cube matters less than the fact that it exists outside people's heads. An agent can only respect a definition it can read.
Step 2: Give the agent answers, not raw tables
Don't expose "query any table" as the agent's main tool. Expose a few question-shaped tools that return pre-digested answers:
metric_summary(metric, period, compare_to)top_movers(metric, dimension, period)funnel(steps, period)
And make each one return what a dashboard would have shown visually, as text:
{
"metric": "conversion_rate",
"period": "last_7_days",
"value": 0.021,
"compare_to": "previous_7_days",
"previous": 0.026,
"change_pct": -19.2,
"direction": "worse",
"summary": "Conversion rate fell 19% week over week (2.6% to 2.1%). The drop is concentrated in mobile traffic from paid social."
}
That direction: "worse" field is the red tile. The summary is the analyst's first sentence. You're encoding the visual judgement into the data itself.
Step 3: Always ship a comparison
A number with no comparison is useless to a human and dangerous for an agent, because the agent will invent one ("2.1% is a healthy conversion rate"). Make the comparison part of every response: previous period by default, and year-over-year where seasonality matters. If there's a target, include it.
Step 4: Put the annotations in the data
Every analytics team has a mental list of "don't trust these dates": tracking outages, consent banner changes, bot spikes, a big campaign. On a dashboard these are annotations. For an agent, they need to be returned alongside the numbers:
"caveats": [
"Tracking on checkout was partially broken 2026-05-03 to 2026-05-05.",
"A paid social campaign started 2026-05-10; traffic mix changed."
]
This one change prevents a large share of confidently wrong answers.
Step 5: Keep the guardrails
Dashboards quietly prevent bad analysis by only showing meaningful cuts. When you give an agent flexibility, add explicit limits:
- Minimum sample sizes. Don't report a conversion rate for a segment with 12 sessions; return "not enough data".
- Sensible dimension lists. Offer the breakdowns analysts actually use, not all 200 dimensions.
- Sampling and thresholding flags. If the source applied sampling or privacy thresholds, say so in the response.
Step 6: Keep charts for humans, at the end
None of this means charts go away. Charts are still the best way to show a human what changed. The shift is that the chart becomes the output of the agent's work ("here's the chart of the drop you asked about"), not the input it has to understand.
A quick test for your setup
Ask your agent three questions you'd ask a junior analyst:
- "How did conversion do last week?"
- "What drove the change?"
- "Can we trust this number?"
If it answers the first with a number and no comparison, the second by listing every dimension, or the third with "yes", you have more translation work to do. If it answers like a good analyst would, you've successfully turned a visual product into one an agent can use.
I spent years in digital analytics before building data tools for AI agents. If you're wiring agents into analytics stacks, I'm curious which of these steps has been hardest for you.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.