Getting started

Introduction

AgentStats shows what AI agents do with your product, on your website, MCP server, CLI and API, and where they fail.

AI agents meet your product in many places: crawlers fetch your pages, agents call WebMCP tools on your website, MCP clients like Claude, Cursor and ChatGPT call your MCP server, and coding agents run your CLI and call your API. AgentStats records each of them, so you can see what agents actually do and why they fail. The people on your website are counted too, next to the agents.

What you can track

Each piece is independent. Add the ones your product has.

Website

A small script that records every WebMCP tool call with its arguments, duration and outcome, and counts your visitors without cookies.

AI crawlers

GPTBot, ClaudeBot and the rest never run JavaScript. A small middleware (or a log drain) reports them, verified against each vendor's published IP ranges.

MCP servers

One line in your server, in seven languages, or a proxy in front of a remote one. Every request, the client that sent it and the tool list over time.

CLIs

Which commands Claude Code, Cursor and other coding agents run, where they fail and what they guess at, next to people and CI.

APIs

The routes agents call on your API, their errors, and each agent's run as one session.

Where to go next

Quickstart

Install the SDK and see your first tool call in about two minutes.

Framework integrations

One package for Nuxt, Astro, Next.js or TanStack Start that sets up the browser and the server together.

Privacy & data captured

Exactly what leaves the browser and how to redact it.

MCP server

Let Claude, Cursor or any coding agent install the SDK and query your analytics.

Using a coding agent? Point it at /llms.txt. It contains everything needed to install the SDK in any framework.