Skip to main content
If your site runs on WordPress (or plain PHP), you install the Agent Edge Network as a small plugin. It runs on every front-end request, passes humans and search bots straight through, and serves verified AI answer-engine crawlers the optimized version of your page.
This is the drop-in plugin — a single self-contained file with no dependencies. It is the WordPress counterpart of the Next.js middleware and Cloudflare Worker. It ships in shadow mode (log-only), so installing it can never change what your visitors see until you switch to Live.The plugin is listed as Bluemoon Agent Edge Network, but its file, folder and download are named bluesky-aen. Keep those names: an already-installed site then updates in place instead of ending up with two copies of the plugin.

What the plugin does

On every front-end request, before your theme renders, it:
  • Passes through anything that isn’t a known AI crawler — your site behaves exactly as before.
  • Never touches search bots — Googlebot, Bingbot and Applebot always get your real page (the cloaking firewall).
  • Serves verified answer-engine crawlers — in Live mode — the optimized version of your page instead of your HTML page. Crawlers that can’t be verified get your normal page (verification levels).
  • Reports every hit to Agent Analytics, so you see who crawled what and whether it was served.
Human visitors get your normal page, and reporting a hit never delays the response.

Before you start

  • A WordPress site you can add a plugin to (WordPress 5.6+, PHP 7.4+).
  • An edge token (format aen_...) from Agent Analytics in the Bluemoon app: choose WordPress / PHP and click Connect edge, or open Setup if the site is already connected.

Install it

Test it

The plugin ships in shadow mode — it serves your normal page to everyone and only logs what it would have served, so there is zero risk while you validate.
1

Trigger a real AI crawler

Open ChatGPT (or Perplexity) with browsing and ask a question that makes it look up your site.
2

Watch the hit land

The visit appears in Agent Analytics under Recent activity, with the crawler’s name, marked Verified.
3

Go live

Once you see verified hits, switch the serve mode to Live under Agent Analytics → Setup → How much to serve. No redeploy — the plugin reads the mode from the dashboard. Verified answer-engine crawlers now get the optimized version. See Serve modes.

Caching

If you run a full-page cache (WP Super Cache, W3TC, LiteSpeed, or a CDN), it may serve a cached HTML page to crawlers before the plugin runs. Exclude AI crawler user-agents from the cache (e.g. ChatGPT-User, PerplexityBot, ClaudeBot, Google-Extended) so the plugin can run for them. Human traffic stays fully cached.

Troubleshooting

Confirm the plugin is active, the edge token is saved under Settings → Bluemoon AEN, and you actually triggered a browsing AI. Opening your site in your own browser does not create a hit.
That’s expected in shadow mode, and for every human visitor in any mode — the plugin only changes the response for verified AI crawlers.
The request must be Verified (IP_VERIFIED), the crawler’s purpose must be enabled, and Bluemoon must have an optimized version of that URL. Check the page’s status in Agent Analytics under See all pages → Your pages. A serve mode change can take up to about five minutes to reach the plugin.
No. Human and search-bot traffic passes straight through, and hit reporting never delays the response. If Bluemoon is ever unreachable, the request fails open to your normal page.

Full plugin source

The plugin is a single self-contained file — no Composer, no build step.
bluesky-aen.php

How it differs from the other drop-ins

  • It runs inside WordPress at template_redirect priority 0, before your theme renders.
  • It reads the visitor IP from CF-Connecting-IP, then X-Forwarded-For, then REMOTE_ADDR, so it works behind Cloudflare or a load balancer.
  • It reads the serve mode from your Bluemoon dashboard, so you go Live without a redeploy. A change takes up to about five minutes to apply.
Everything else — the cloaking firewall, verification levels and serve modes — behaves exactly as it does for the middleware and Worker.