Agent Workflows
You ask; your agent answers from your real traffic. The questions that come up when you’re deciding what to build next.
Did that change work?
Name the change: the commit, the day it shipped, or a launch you recorded. “Did yesterday’s
pricing page change work?” has the agent read the commit’s time from git and call
compare_around, which compares equal windows before and after that moment (up to a week
each side): visitors and pageviews, with a note when the windows are still too short, or the data too
thin, to read as impact.
compare_around(commit: "a1b2c3d", at: "2026-10-20T16:04:00Z")
Recording launches is optional. When you want one on the timeline, say so (“note that we
launched on Product Hunt today”) and the agent calls record_annotation; the agent never
records one on its own.
Where do people drop off?
“Where do people drop off between the landing page and checkout?” runs an ordered
funnel over the steps you name, paths or events, with the share lost at each step. Don’t
know the steps yet? “What do people do after the docs page?” calls journeys, the
routes visitors actually take, grouped and counted.
Is anything broken?
“Is anything broken since this morning’s deploy?” calls what_broke: new
JavaScript errors with the page and how many visitors hit them, plus pages people keep reloading or
bounce between.
Track this
Your agent writes your markup, so it can add tracking in the same change as the feature, when you
ask: “add the CSV export button and track clicks on it” lands with
data-staats="export_click" on the button. See Tracking.
How it’s going
“How did the launch go?” calls get_overview: visitors, pageviews, top pages
and referrers against the previous period. “What changed this week?” calls
what_changed for unusual days, new referrers and pages whose share moved. With several
sites, portfolio_overview ranks them.
A note in your project instructions (optional)
Connected agents learn the tools from the server itself. If you want your agent to reach for
Staats when it matters, add a line to your CLAUDE.md (or AGENTS.md):
## Analytics
This site's traffic is in Staats (MCP server "staats").
- When I ask how something is doing, or whether a change worked,
check Staats before answering.
- When I ask to track something, add a data-staats attribute
in the same change.