{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "nalinbhardwaj-botscent--log-ai-agent-visits",
 "repo": "nalinbhardwaj/botscent",
 "repo_url": "https://github.com/nalinbhardwaj/botscent",
 "repo_slug": "nalinbhardwaj-botscent",
 "title": "Log which AI agents visit your site",
 "page_title": "How to log which AI agents visit your site with Botscent",
 "summary": "Count visits by agent name so you can see agent traffic apart from people.",
 "who": "A site owner or analytics lead who cannot tell AI agent visits from human visits in current logs.",
 "problem": "Agent traffic is mixed into normal analytics, so you cannot see which agents arrive or how often.",
 "outcome": "A log entry for each request that records the agent name, or human, and the reasons, using the page verdict joined to the request's own verdict.",
 "steps": [
  "Run `npm install botscent` in the project, or `pip install botscent` for a Python server.",
  "Add the page half for your framework, following the Quickstart section for that framework.",
  "Add the server half, for example `app.use(botscent())` in Express, or `export { proxy } from 'botscent/next'` in Next.js 16 or later.",
  "Send the page verdict to your server with `reportHeaders` on same-origin requests, then join it with `combine(own, report)` on the server.",
  "Run `npx botscent check https://your-site.example/` and confirm the server and page halves report pass."
 ],
 "agent_prompt": "Using the botscent repo (nalinbhardwaj/botscent), add agent visit logging to <site path>. Expected output: one log line per request with agent_name or human and the reasons. Verify that `npx botscent check https://<your-site>/` reports pass for both halves.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "The page verdict comes from the visitor's browser, so use it to measure and adapt pages, not to make access decisions.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "A site built with a supported framework such as Next.js, Express, Django or FastAPI",
  "npm for the TypeScript package or pip for the Python package",
  "Permission to edit your site's server code and page layout",
  "A running site URL to test against"
 ],
 "risk": "dual-use",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/nalinbhardwaj-botscent/log-ai-agent-visits/",
 "md": "https://dedupedai.com/use-cases/nalinbhardwaj-botscent/log-ai-agent-visits/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/nalinbhardwaj-botscent--log-ai-agent-visits.json",
 "api_version": "v1"
}
