@trybluesky/aen
v0.3.0
Published
Bluesky Agent Edge Network — a drop-in Next.js edge middleware that detects verified AI crawlers and serves them AEO-optimized content.
Maintainers
Readme
@trybluesky/aen
Drop-in Bluesky Agent Edge Network middleware for Next.js. Detects verified AI answer-engine crawlers (ChatGPT, Perplexity, Claude…) and serves them your AEO-optimized content. Everything else — humans and classic search bots — passes straight through.
Install
npm i @trybluesky/aen
npx @trybluesky/aen init # writes middleware.ts (or proxy.ts on Next.js 16+)Or add it by hand — middleware.ts at your project root:
export { default } from "@trybluesky/aen";
export const config = { matcher: "/((?!_next/|favicon.ico).*)" };On Next.js 16+, use proxy.ts instead:
export { proxy } from "@trybluesky/aen";
export const config = { matcher: "/((?!_next/|favicon.ico).*)" };Configure
Environment variables:
| Variable | Required | Default | |
| --- | --- | --- | --- |
| AEN_EDGE_TOKEN | yes | — | Your site key, from Agent Analytics → Settings. |
| AEN_SERVE_MODE | no | shadow | shadow = detect + log only. default = serve verified AI crawlers. |
| AEN_BASE | no | https://app.trybluesky.com | Control-plane base URL. |
It ships in shadow mode (zero risk). Set AEN_SERVE_MODE=default when you're ready to serve.
Full guide: https://docs.trybluesky.com/guides/nextjs-middleware
