Hacker News AI· bminnick·· 23 hr agoAI score28
Detecting AI Agents in Next.js with Vouched KYA
Detecting AI Agents in Next.js with Vouched KYA
AI summary
This post shows how to add Vouched KYA's Detect to a Next.js 16 app by installing @kya-os/checkpoint-nextjs and calling withCheckpoint in proxy.ts with an API key from .env.local, classifying each request as human, ai_agent, bot or incomplete_data in observe mode. It demonstrates simulating ChatGPT and GPTBot user agents with curl, reading x-checkpoint response headers, logging results via onResult, and unit testing the proxy with Vitest; Detect has a free tier with no card required.
Source: Hacker News AI · vouched.id