# Build vs. buy: measuring agent traffic from your own logs

> You can measure AI agent traffic yourself with the logs you already have. Here's how to do it, what it costs in time, and the honest point where building stops making sense.

Punchline Analytics · 2026-11-19

Here's an unpopular opinion for a software company to hold: the best tool evaluation often ends with "we don't need to buy anything yet."

Every new category comes with a wave of vendors. (Yes, we're aware of the irony, given where you're reading this. 😄) Before you add another line item to the tech stack, it's worth knowing what you can do with what you already have.

For agent traffic, you have more than you think. So let's build it, see how far we get, and be honest about where it gets hard.

## What you already have

Every request to your site, including the ones your analytics tag never sees, is logged somewhere:

- **Your CDN** (Cloudflare, Fastly, CloudFront, Vercel and others) keeps request logs, often exportable.
- **Your web server or hosting platform** keeps access logs.

Each log line usually includes the path, the user agent, the IP address, the status code and a timestamp. That's enough to get started.

## Step 1: Count the agents that say who they are (1-2 days)

AI companies publish the names their agents use. Search your logs for them:

- **Live fetches for a person asking right now:** `ChatGPT-User`, `Claude-User`, `Perplexity-User`
- **Search and answer indexes:** `OAI-SearchBot`, `Claude-SearchBot`, `PerplexityBot`
- **Training:** `GPTBot`, `ClaudeBot`

Group by name, by day and by path. You'll get a first look at which agents visit and what they read. The [agent directory](https://punchlineanalytics.com/agents) lists these with links to each operator's docs.

**What you'll learn:** whether this is a rounding error or a real slice of your traffic. For a day or two of work, that's a great return.

## Step 2: Check they're real (2-3 days)

Here's where it gets more involved. Anyone can put "GPTBot" in a user agent. To know it's really OpenAI, you check the request's IP address against the ranges the operator publishes (OpenAI, Google, Perplexity and others publish JSON lists). Some operators also support reverse DNS checks, and a few agents now sign their requests cryptographically.

You'll need to fetch those lists regularly (they change), match every request against them, and label the ones that don't match as impostors. Not hard, but it's real engineering, and it needs an owner. ([Here's how the checks work](https://punchlineanalytics.com/blog/real-googlebot-or-impostor).)

## Step 3: Separate people from agents that don't say who they are (weeks)

This is where most DIY projects stall.

Plenty of automated traffic doesn't announce itself: scripts, headless browsers, uptime monitors, vulnerability scanners, agents driving a real browser. Telling those apart from people takes a set of rules - request patterns, network types, missing browser headers, timing - and constant tuning as the traffic changes.

It's the kind of project that's easy to start and hard to finish. Anyone who's watched a "quick" internal analytics project turn into a permanent side job knows exactly how this goes. The first version takes a week. The next two years are edge cases.

## Step 4: Connect it to anything that matters (months)

Counting agents is interesting. Connecting them to outcomes is valuable:

- Which assistants sent people to your site afterwards?
- Which companies, among those who came forward, had an agent research you first?
- Did the people who arrived after agent research convert?

Each of these means joining log data to your analytics, your forms and your CRM, without keeping personal data you shouldn't. (IP addresses in logs are personal data in a lot of places, so retention and access need care too. Loop in Legal early - they'll appreciate it.)

## The honest math

Here's roughly how we'd think about it:

| Stage | Effort | Worth building? |
|---|---|---|
| Count declared agents from logs | A day or two | Yes, almost always. Do this first. |
| Verify them against published ranges | A few days, plus upkeep | Yes, if you have an engineer who'll own it. |
| Detect undeclared automation | Weeks, plus constant tuning | Rarely. This is a product, not a script. |
| Connect to people, companies and revenue | Months | Only if it's core to your business. |

Steps 1 and 2 are a great project for a curious Ops team with a friendly engineer. They'll tell you whether this matters for your business, which is exactly what you want to know before you spend money.

Steps 3 and 4 are where building turns into maintaining, and maintaining turns into a second job.

"But," you say, "we have a data team. They can build anything."

They probably can. The question is whether this is what you want them building - and whether they'll still want to own it in a year, when the agent list has doubled and the rules need retuning every month.

## Our recommendation

Start with your logs. Get a number. If agent research turns out to be a meaningful part of your funnel, then evaluate tools, and use what you learned to write better requirements. (That's the [secret to a good tool evaluation](https://opsscale.substack.com/p/the-secret-to-a-successful-tool-evaluation) anyway: know your use cases before the demos start.)

And if you do buy, keep your log query. It's the best way to check any vendor's numbers - ours included.

*If you'd rather skip to the answer, Punchline does all four steps and shows the evidence behind every label. [Start free](https://app.punchlineanalytics.com/signup) and check your DIY numbers against it.*
