Recipes
Ready-to-use AgentXP configurations for common site types.Pick the recipe closest to your site and adjust as needed. Each config is a complete
middleware.ts you can copy directly.
Documentation site
Documentation sites have clean structure and work well with zero config. Add allmsTxt page list so agents can discover your docs without crawling.
middleware.ts
SaaS landing page
Landing pages contain pricing, features, and social proof. Exclude marketing widgets and keep token limits moderate.middleware.ts
E-commerce product pages
E-commerce pages have sidebars, filters, cart widgets, and recommendation carousels. UsecontentSelector to target the product content and excludeSelectors to strip shopping chrome.
middleware.ts
Blog or content site
Blogs work well out of the box. Exclude comment sections and social widgets to keep output clean.middleware.ts
News or media site
News sites have ad slots, trending sidebars, and comment sections inside the main content area. AggressiveexcludeSelectors are required.
middleware.ts
News sites benefit the most from
contentSelector: 'article'. Without it, sidebar ads and trending sections inside <main> will appear in the markdown output.Dashboard or web app
App pages have toolbars, sidebar navigation, and notification drawers. Target the content area directly.middleware.ts
With existing middleware
If you already have middleware (Clerk, next-intl, or custom auth), pass it as the second argument. AgentXP handles agent requests; everything else goes to your middleware unchanged.middleware.ts