Skip to content
Kokumi

People vs agents at the edge

Live

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

Slice 1 counts. classify.rs.

Quickstart

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

Same content served cleanly for agents as raw Markdown:/features/edge-analytics.md
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 bandSourceHow Kokumi decides
PeoplePOST /api/hitPage script executed in the visitor browser (visits + views)
Verified agentEdge WorkerIP matches the operator's published CIDR range in ranges/
Claimed agentEdge WorkerUser-Agent names a known bot outside verified IP ranges
Unconfirmed browserEdge WorkerBrowser-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