{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "nalinbhardwaj-botscent--adapt-pages-for-ai-agents",
 "repo": "nalinbhardwaj/botscent",
 "repo_url": "https://github.com/nalinbhardwaj/botscent",
 "repo_slug": "nalinbhardwaj-botscent",
 "title": "Change page content when an AI agent visits",
 "page_title": "How to change page content when an AI agent visits with Botscent",
 "summary": "Hide ads, simplify layout or adjust prices for agent visitors in the page itself.",
 "who": "A front-end developer whose site shows ads or long layouts that are not useful to AI agents.",
 "problem": "Agents receive the same page as people, including ad blocks and layout that slow or confuse them.",
 "outcome": "A page that renders a simpler version when the page verdict is agent, while people see the normal page.",
 "steps": [
  "Install the package with `npm install botscent`.",
  "Add the page half for your framework, for example `import 'botscent/auto'` in `instrumentation-client.ts` for Next.js 15.3 or later.",
  "In the component, call `useBotscent()` from `botscent/react` and branch on the verdict type.",
  "Hide the ad or simplify the layout only when the verdict type is agent.",
  "Run `npx botscent check https://your-site.example/` and confirm the page half reports pass."
 ],
 "agent_prompt": "Using the botscent repo (nalinbhardwaj/botscent), change <component path> to hide ads when useBotscent() returns type agent. Expected output: the normal page for humans and a simplified page when the page verdict is agent. Verify with `npx botscent check https://<your-site>/` that the page half reports pass.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "Use the page verdict to adapt content only, because it comes from the visitor's browser and can be forged.",
 "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": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/nalinbhardwaj-botscent/adapt-pages-for-ai-agents/",
 "md": "https://dedupedai.com/use-cases/nalinbhardwaj-botscent/adapt-pages-for-ai-agents/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--adapt-pages-for-ai-agents.json",
 "api_version": "v1"
}
