KYA: know your agent
Learn whether each visitor to your site is a person, an AI agent or other automation, from a script tag, an edge package or a lookup API.
KYA tells your site whether each visitor is a person, an AI agent or other automation, and, for an agent, which one and whether that's verified. This page helps you pick one of the three ways to get that answer.
{ "actor": "ai_agent", "operator": "Anthropic", "product": "Claude-Agent", "verification": "network_verified", "confidence": "high", "reasons": ["agent_network"] }KYA returns results only. It never blocks, challenges or slows a visitor: what to do with a verdict is your decision. See Acting on a verdict.
Three ways in
| Use it when | You get | Your code | |
|---|---|---|---|
| The snippet | You can add a script tag to your pages | A verdict for each browser session, read by session id | One tag, and one API call to read a session |
| The edge package | Your site runs on Cloudflare Workers, Next.js or Node | A verdict on every request, as kya-* request headers. The snippet is served from your own domain | A few lines of setup, no API call |
| Agent lookup | You have one request's IP address, user agent and headers, and no page: an API, a feed, a log | Whether it's a declared AI agent or crawler, and whether that claim is verified, claimed or impersonated | One API call per request |
- Only a session can say
human. The snippet sees how the page is used. A lookup sees one request, and finds agents that declare themselves. - The edge package uses both: the session's verdict when the browser has one, a lookup otherwise.
- All three use your API key (
gsk_…, see Authentication). The snippet also needs a site's public key (gpk_…).
Start here
Quickstart
Create a site, paste the tag, load a page and read its session's verdict.
Verdicts
Actor, confidence, verification and every reason code, and how to act on them.
Edge package
Verdicts as request headers on Cloudflare Workers, Next.js and Node.
Data & privacy
Exactly what the snippet collects, the cookie it sets, retention and limits.