Authorization notice. Botscent is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.
Who it is forA front-end developer whose site shows ads or long layouts that are not useful to AI agents.
The problemAgents receive the same page as people, including ad blocks and layout that slow or confuse them.
The outcomeA page that renders a simpler version when the page verdict is agent, while people see the normal page.
What you need first
- 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
Steps
- Install the package with
npm install botscent. - Add the page half for your framework, for example
import 'botscent/auto'ininstrumentation-client.tsfor Next.js 15.3 or later. - In the component, call
useBotscent()frombotscent/reactand 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.
Prompt for your agent
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.
Caveat. Use the page verdict to adapt content only, because it comes from the visitor's browser and can be forged.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for nalinbhardwaj/botscent and "Change page content when an AI agent visits"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer