Detecting AI Agents in Next.js with Vouched KYA Vouched released @kya-os/checkpoint-nextjs, an npm package that adds Vouched KYA's Detect engine to a Next.js 16 app's proxy.ts so every request is classified as human, ai_agent, bot or incomplete_data, adding a few milliseconds per request. The package requires Node.js 22.12 or later and a free Vouched KYA account with an sk_ API key, and runs in "observe" enforcementMode by default so requests are reported to the Vouched KYA dashboard but not blocked; Vouched built KYA on KYA-OS, an open standard it donated to the Decentralized Identity Foundation, and reserves policy enforcement and authorization checks for its paid Enforce and Govern plans. Blog Detecting AI Agents in Next.js with Vouched KYA AI agents like ChatGPT, Claude and Perplexity are already browsing websites on behalf of real people, and most of our websites can't tell them apart from humans or crawlers. But the good news is that we can fix that In this post, we'll add Vouched KYA's Detect to a Next.js app in about 5 minutes, for free. Prefer to watch? Here's the video walkthrough. What are Know Your Agent and Detect? You've probably heard of KYC Know Your Customer . Know Your Agent https://kya.vouched.id/?utm source=vouched-blog&utm medium=blog&utm campaign=kya-brandon-nextjs-2026-11&utm content=intro-kya KYA is the same idea for the agent era: knowing which AI agents are interacting with our business, and which human authorized them. Vouched https://www.vouched.id/?utm source=vouched-blog&utm medium=blog&utm campaign=kya-brandon-nextjs-2026-11&utm content=intro-vouched built Vouched KYA on KYA-OS, an open standard it has donated to the Decentralized Identity Foundation https://identity.foundation . Vouched Detect https://kya.vouched.id/docs/detect?utm source=vouched-blog&utm medium=blog&utm campaign=kya-brandon-nextjs-2026-11&utm content=intro-detect classifies every request that reaches our servers as human , ai agent , bot or incomplete data . In Next.js, we run Vouched's detection engine right inside our app's Proxy https://nextjs.org/docs/app/getting-started/proxy , adding just a few milliseconds to each request. And - the best part - Detect has a free tier https://kya.vouched.id/pricing?utm source=vouched-blog&utm medium=blog&utm campaign=kya-brandon-nextjs-2026-11&utm content=intro-pricing , no card required. Vouched KYA's paid plans add Enforce https://kya.vouched.id/docs/enforce?utm source=vouched-blog&utm medium=blog&utm campaign=kya-brandon-nextjs-2026-11&utm content=intro-enforce and Govern https://kya.vouched.id/docs/govern?utm source=vouched-blog&utm medium=blog&utm campaign=kya-brandon-nextjs-2026-11&utm content=intro-govern , where we can apply policies to agents and verify who authorized them. We'll cover those in future posts Code You can find the completed code sample here: https://github.com/vouched/KnowYourAgentWebsite-Nextjs-Sample https://github.com/vouched/KnowYourAgentWebsite-Nextjs-Sample Prerequisites - A Next.js 16 app, using the App Router or the Pages Router - Node.js 22.12 https://nodejs.org/en/download or later - A free Vouched KYA account https://kya.vouched.id/signup?utm source=vouched-blog&utm medium=blog&utm campaign=kya-brandon-nextjs-2026-11&utm content=prereq-signup with a project and an API key it starts with sk . 1. Add the npm Package npm install @kya-os/checkpoint-nextjs 2. Store our API Key Safely Our API key is a secret, so it should NEVER be committed to source control. Next.js loads environment variables from .env.local , and the .gitignore that create-next-app generates already ignores it. Be sure to double-check your .gitignore ; your future-self will thank you 💯. In the root of our project, create .env.local : CHECKPOINT API KEY=