# People vs agents at the edge

Every page, .md twin and llms.txt request counted at Cloudflare's edge, split into people, verified agents, claimed agents, unconfirmed browsers.

Status: Live

Every HTML page, `.md` twin, and `llms.txt` response is counted at the edge in `hits`, while browsers confirm themselves cleanly through `/visit.js`.

## Key facts

- **Caller bands:** 4 audiences
- **Edge row PII:** 0 (no IP, UA, cookie)
- **Verified IP lists:** OpenAI, Google, Perplexity, Bing
- **External host fallback:** visit.js CORS beacon

## Four distinct caller bands

Kokumi refuses to merge confirmed humans with unverified bots. Every count carries its confidence band in both `/api/v1/counts` and `kokumi moved`.

| Caller band | Source | How Kokumi decides |
| --- | --- | --- |
| People | POST /api/hit | Page script executed in the visitor browser (visits + views) |
| Verified agent | Edge Worker | IP matches the operator's published CIDR range in ranges/ |
| Claimed agent | Edge Worker | User-Agent names a known bot outside verified IP ranges |
| Unconfirmed browser | Edge Worker | Browser-shaped User-Agent at edge without a verified IP match |

## IP-list verification beats ASN and UA guessing

User-Agent strings can be spoofed in one curl flag, and cloud ASNs mix crawlers with scrapers. `classify.rs` checks source IPs strictly against operator-published prefixes (OpenAI, Google, Perplexity, Bing) without writing those IPs into `hits`.

## Progressive enhancement across hosts

Run Kokumi on Cloudflare in front of your origin to unlock full edge agent and `.md` counting. On external hosts (Shopify, Squarespace, Wix, WordPress), point `<script src=".../visit.js" data-endpoint="..." defer></script>` at your Worker for CORS beacon tracking.

## Questions

### Why does Kokumi separate verified agents from claimed agents?

Any script can set a known bot User-Agent string. Kokumi only marks an agent as verified when the source IP matches the operator's published CIDR range in ranges/.

### Does the edge Worker store visitor IP addresses?

No. classify.rs checks the IP in memory against operator CIDR ranges and writes only the caller band and path to hits, with no IP, user-agent text, cookie, or id.

### Can I use edge analytics on Shopify, Squarespace, or WordPress?

External origins that do not proxy HTML through Cloudflare can load /visit.js over CORS to count people in hits, while full edge agent and .md counting runs when Cloudflare sits in front of your origin.

## Related

- [AI traffic and citations](/features/ai-traffic)
- [Live fixture demo](/demo)
- [Self-hosting guide](/docs/self-hosting)