Skip to main content
The serve mode decides whether a verified AI crawler gets the optimized version of your page or your normal page. Every install starts in shadow: you see crawler activity in Agent Analytics without changing what anyone receives. When you’re confident, you switch to default.

The serve modes

The Next.js middleware file, the Cloudflare Worker and the custom integration snippets accept shadow and default only. off and canary:<pct> apply to installs that read the serve mode from your dashboard, such as the WordPress plugin. In the dashboard, under Agent Analytics → Setup → How much to serve, the modes are named Off (off), Testing (shadow) and Live (default).
Whatever the serve mode, Googlebot, Bingbot and Applebot always get your normal page. See Cloaking firewall.

Shadow mode: start here

In shadow mode your install recognises AI crawlers, checks whether they are verified, and reports each visit to Agent Analytics as Passthrough. It never serves the optimized version, so every visitor and crawler gets your real page. Use this time to confirm that visits show up and that the verification levels and purposes look right.
Stay in shadow mode for a few days before switching. You’ll get a clear picture of which crawlers visit which pages, and how many are Verified (IP_VERIFIED) versus Unverified (UA_ONLY).

Default mode: full rollout

In default mode, a crawler gets the optimized version only when all of these are true: If any of these is missing, the crawler gets your normal page. Nothing breaks and no error is shown.
Want a gradual rollout with a file-based install? Switch to default: only pages that already have an optimized version can be served, which naturally limits the first wave.

How to change the serve mode

1

Edit SERVE_MODE

Open your middleware.ts, Worker or snippet file and change the SERVE_MODE value near the top:
2

Redeploy

The mode is read from the file, so it takes effect once the new version is live. There is no dashboard step.
Then open Agent Analytics. In Recent activity, verified crawlers on pages with an optimized version start showing Optimized served instead of Passthrough.

What ENABLED controls

Separately from the serve mode, the ENABLED setting decides which purposes can receive the optimized version at all:
Both USER_TRIGGERED (someone asked an AI assistant to open your page) and RETRIEVAL (an answer engine fetching pages) are enabled by default. Remove one if you only want to serve the other. Crawlers whose purpose is not enabled always get your normal page. SEARCH_INDEX can never be enabled.

What Agent Analytics shows in each mode

AI crawler visits are logged in every mode, including shadow, so Agent Analytics always has data. The Result column of Recent activity shows what the crawler actually received:
  • Optimized served (VARIANT): the crawler got the optimized version.
  • Passthrough (PASSTHROUGH): the crawler got your normal page. In shadow mode, every visit shows as Passthrough.
For installation and edge token setup, see the Quickstart.