I've always wanted to know which user agents are currently hitting my site... Am I getting crawled? Are ML bots sifting through my site?
I added some middleware to my site to log the user agents hitting it, while using Vercel's KV to store the user agents and their counts. New agents are only admitted up to a fixed budget each minute, so a burst of bots can't flood the store with garbage.
If you are interested in the code, the middleware and the api are both on GitHub.
Recently admitted user agents
| User Agent | Count |
|---|