Kokumi: agentic analytics from the ground up
So you can see when AI agents read your site, not only people. "Kokumi isn't nearly done and ready to go - it will be its own Posthog / Umami someday." Me, 2 Nov 2026. What I mean by that: analytics built from the ground up for a web that agents read as well as people.
What works today is the first stretch: a visit counter that runs at Cloudflare's edge, in front of a static site, and counts visits to pages, their markdown twins and llms.txt - so agents count as visitors. Rust on Cloudflare Workers plus D1. MIT, free.
13 commits · 17 Oct to 2 Nov 2026 · MIT

1,498 agent hits on mackenziebowes.com in 14 days, beside 415 people
To 2 Nov 2026, straight from Kokumi's read API. A counter that runs in the page's script misses every one of them... agents fetch the page without running its script.
Our own crew's visits aren't set aside yet (#2755), so some of both are ours.
What it does for you
- Agents count as visitorsHits are counted at the edge, before the page loads, markdown twins and llms.txt included. Shipped 17 Oct.
- Knows who askedEach hit is a person, a verified agent, a claimed agent, an unconfirmed browser or unrecognised, and an agent is verified only when its IP is in the operator's published list, never by network owner. Shipped 17 Oct.
- Two levels of recordThe edge counts store no IP, no user-agent text, no cookie and no id; page views store the IP, a salted visitor key and the place - and for EU, EEA and UK visitors, the country only. Shipped 17 Oct (counts) and 20 Oct (views).
- Sees where agents came fromThe ?ref= tag, falling back to utm_source (which ChatGPT adds), and the referrer host. Shipped 17 Oct.
- Time in view, scroll depth and clicksPer page view. Shipped 20 Oct.
- Names everything on the pageEvery figure, link, section, button and form, named from the page: seen, clicked, opened, copied, submitted. Shipped 20 Oct.
Start in a minute
Yourself
It deploys as a Cloudflare Worker with a D1 database in front of your static site. The schema's in schema.sql, and cargo run --example verify shows how requests get classified.
Hand it to your agent
Paste this into your agent. It reads this page's plain-text copy and does the setup.
Read mackenziebowes.com/projects/kokumi.md and set up Kokumi in front of my site.
How it works
Kokumi is the Worker that serves the static site, so it sees every request - including the ones that never run JavaScript. That's the whole trick... the edge counts the hit before the page even loads.
It stores per day, path, ref tag, referrer host and who asked. Days are Vancouver days, yknow - mine.
A page script sends a beacon to /api/hit, and that's where a person gets counted.
Reading it back: GET /api/v1/counts?days=7 and /api/v1/hits, with a bearer read token.
Where it stops
It runs on Cloudflare Workers and D1 only. If you're not on Cloudflare, this isn't for you yet - I'm not gonna pretend otherwise.
And an agent is verified only by its operator's published IP list, never by network owner. An agent from an unlisted range shows as claimed or unrecognised... I'd rather show you less than guess.
What's coming
Where this is going. Someday it's its own PostHog or Umami - analytics from the ground up for a web that agents read as well as people. Not nearly there yet... next steps:
In flight
Planned
Paused
Me - Mackenzie Bowes, in Vernon, with a crew of agents
They're the ones who don't need naps. If you want to talk - about Kokumi, or about having a crew like this work for you - write to me.
Talk to MackenzieEverything shipped
13 commits, 17 Oct to 2 Nov 2026.
October 20266 changes
- 20 OctTime in view, scroll depth and clicks, per page view
- 20 OctPage views, with the place (country only for EU, EEA and UK visitors)
- 20 OctEvery figure, link, section, button and form named from the page
- 17 OctAgents counted at the edge, markdown twins and llms.txt included
- 17 OctWho asked: person, verified agent, claimed agent, unconfirmed browser or unrecognised
- 17 OctWhere agents came from: the ?ref= tag, utm_source and the referrer host
Reference
Requirements and what it works with
- Runs on
- Cloudflare Workers with D1.
- Needs
- A Cloudflare account, wrangler and Rust.
- Licence
- MIT
- Cost
- Free (Cloudflare's own plan limits apply).
Questions I'd ask too
- Can I use it today?
- Yea - it deploys as a Cloudflare Worker with a D1 database in front of your static site. MIT and free; Cloudflare's own plan limits apply. You need a Cloudflare account, wrangler and Rust.
- Why does my normal counter miss agents?
- Agents fetch the page without running its script, so a counter inside the page never sees them. Kokumi counts at the edge, before the page loads.
- Does it store IPs?
- Two levels. Edge counts: no IP, no user-agent text, no cookie, no id. Page views: the IP, a salted visitor key (sha256 of a secret salt, the IP and the user agent) and the place - country only for EU, EEA and UK visitors.
- What if an agent isn't in its operator's list?
- It shows as claimed or unrecognised. Verification is only ever the operator's published IP list, never the network owner.
- How do I hand it to my agent?
- Tell them - "Read mackenziebowes.com/projects/kokumi.md and set up Kokumi in front of my site."
- How do I read the counts myself?
GET /api/v1/counts?days=7and/api/v1/hits, with a bearer read token.
Follow Kokumi
The code, with the schema and the verify example.