# Can AI agents shop a headless store?

> Can AI agents shop a headless store built with Next.js, Nuxt, Hydrogen or Medusa? Where rendering, robots.txt and structured data break, and code to fix it.

- Canonical URL: https://aiscovery.io/platforms/headless
- Markdown version: https://aiscovery.io/platforms/headless.md
- Last updated: 2026-10-21

Yes when product facts are in the HTML your server sends, which Next.js, Nuxt and Hydrogen do by default, but headless stores commonly lose what the old theme gave them for free: structured data, sensible robots rules, policy pages and plain links.

In a headless store your team owns the storefront: rendering, robots.txt, metadata, structured data and routing are all code. The commerce backend, whether Shopify, Medusa, commercetools or your own, only supplies the data.

- [Request a demo](https://aiscovery.io/demo)
- [Check AI crawler rules free](https://aiscovery.io/tools/ai-crawler-checker)

Reviewed 21 October 2026 against official documentation. [21 sources](https://aiscovery.io/platforms/headless#sources)

> Example: what an agent runs into on headless stores

> Interactive demo on the HTML page: an illustrative storefront scene with numbered spots that match the common problems below.

Common problems:

1. Content renders in the browser only, so agents that don't run scripts see an empty page.
2. Structured data is missing because the old theme used to add it.
3. Client-side routing hides links agents need to move between pages.

> Example: An illustrative store, not a real result. Your own result shows only what is really on your store.

## Headless stores at a glance

- **Rendering:** Next.js and Nuxt render on the server by default. Data fetched in the browser after load isn't in the first HTML.
- **robots.txt:** A file or route you own: app/robots.ts in Next.js, the robots module in Nuxt, a route in Hydrogen.
- **Structured data:** Only what you add. Next.js recommends a script tag in the page; Medusa's starter ships none.
- **Agent protocols:** Hydrogen adds UCP and MCP endpoints for Shopify-backed storefronts. Elsewhere, you build them.

## What usually breaks on headless stores

Frameworks render well by default. What breaks is usually the part a theme used to handle, which nobody rebuilt.

### 1. Prices and stock load in the browser

Next.js renders pages as Server Components and prerenders client components into the first HTML, and Nuxt renders on the server unless a route turns it off. What's missing is data a component fetches in the browser after load, such as a live price or stock call, and any route with server rendering switched off. [\[1\]](https://nextjs.org/docs/app/getting-started/server-and-client-components) [\[7\]](https://nuxt.com/docs/4.x/guide/concepts/rendering)

### 2. Structured data didn't survive the replatform

Next.js's own JSON-LD example has a name, image and description, but no offers, and Medusa's storefront starters (the archived nextjs-starter-medusa and its successor, dtc-starter) ship no JSON-LD and no app/robots.ts; their next-sitemap config isn't installed or run. Price, stock, shipping and returns markup exist only if your team adds them. [\[2\]](https://nextjs.org/docs/app/guides/json-ld) [\[12\]](https://docs.medusajs.com/resources/nextjs-starter) [\[13\]](https://github.com/medusajs/dtc-starter)

### 3. A starter's robots.txt blocks your policy pages

Hydrogen's older skeleton template serves a robots.txt route modelled on Shopify's old defaults, with Disallow: /policies/ and Disallow: /search in the default \* group. Every crawler without a group of its own follows it, so stores built on it tell most compliant crawlers to skip the refund and shipping policies. [\[9\]](https://github.com/Shopify/hydrogen/blob/2026-04/templates/skeleton/app/routes/%5Brobots.txt%5D.tsx)

### 4. Metadata can land outside the head

Since Next.js 15.2, metadata from a dynamic generateMetadata can stream into the body for bots that Next.js doesn't treat as HTML-limited. Its default list names no AI crawlers, so their title and description tags may not arrive in the head. [\[4\]](https://nextjs.org/docs/app/api-reference/functions/generate-metadata) [\[5\]](https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/router/utils/html-bots.ts)

### 5. Links that only work with JavaScript

Navigation built from click handlers on spans or divs, instead of real links with an href, leaves an agent that reads the page without a way to reach collections, products or policies.

## How to fix it on headless stores

All of these are a few lines in the storefront. The examples use Next.js App Router; the same ideas apply in Nuxt, Remix or Astro.

[Check which AI crawlers your robots.txt allows, free](https://aiscovery.io/tools/ai-crawler-checker)

### 1. Render price and stock on the server, with markup

Fetch the product in the page itself, not in a browser effect, so price and stock are in the first HTML. Add Product markup with one Offer per variant, as Next.js recommends, in a script tag escaped against injection. Use revalidation, or swr and isr route rules in Nuxt, to keep prices fresh. [\[2\]](https://nextjs.org/docs/app/guides/json-ld) [\[7\]](https://nuxt.com/docs/4.x/guide/concepts/rendering) [\[17\]](https://developers.google.com/search/docs/appearance/structured-data/merchant-listing)

app/products/\[handle\]/page.tsx:

```tsx
export default async function ProductPage({ params }) {
  const { handle } = await params
  const product = await getProduct(handle) // on the server, in the first HTML

  const jsonLd = {
    '@context': 'https://schema.org',
    '@type': 'Product',
    name: product.title,
    image: product.images,
    description: product.description,
    offers: product.variants.map((variant) => ({
      '@type': 'Offer',
      sku: variant.sku,
      url: `https://example.com/products/${handle}?variant=${variant.id}`,
      price: variant.price,
      priceCurrency: variant.currency,
      availability: variant.inStock
        ? 'https://schema.org/InStock'
        : 'https://schema.org/OutOfStock',
      hasMerchantReturnPolicy: { '@id': 'https://example.com/returns#policy' },
    })),
  }

  return (
    <main>
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{
          __html: JSON.stringify(jsonLd).replace(/</g, '\\u003c'),
        }}
      />
      {/* Name, price, stock, delivery and a link to /returns, as text */}
    </main>
  )
}
```

### 2. Write robots rules per crawler, in code

Next.js builds robots.txt from app/robots.ts, with a group per user agent. A crawler that finds its own group ignores the \* group, so repeat your private paths there. In Nuxt, the @nuxtjs/robots module takes the same groups, and blockAiBots: 'training' blocks training crawlers only. [\[3\]](https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots) [\[8\]](https://nuxtseo.com/docs/robots/api/config) [\[18\]](https://www.rfc-editor.org/rfc/rfc9309)

app/robots.ts:

```ts
import type { MetadataRoute } from 'next'

const privatePaths = ['/cart', '/checkout', '/account', '/api/']

export default function robots(): MetadataRoute.Robots {
  return {
    rules: [
      { userAgent: '*', allow: '/', disallow: privatePaths },
      // A named group replaces the * group, so repeat the private paths.
      {
        userAgent: ['OAI-SearchBot', 'Claude-SearchBot', 'PerplexityBot'],
        allow: '/',
        disallow: privatePaths,
      },
      // Model training: opt out.
      { userAgent: ['GPTBot', 'Google-Extended', 'CCBot'], disallow: '/' },
    ],
    sitemap: 'https://example.com/sitemap.xml',
  }
}
```

### 3. Unblock policies in an inherited Hydrogen robots route

If your storefront started from Hydrogen's skeleton, open app/routes/\[robots.txt\].tsx and delete the /policies/ line from the general disallow rules, so crawlers can read your refund and shipping policies. [\[9\]](https://github.com/Shopify/hydrogen/blob/2026-04/templates/skeleton/app/routes/%5Brobots.txt%5D.tsx)

app/routes/\[robots.txt\].tsx, generalDisallowRules:

```tsx
  return `Disallow: /cart
Disallow: /account
Disallow: /collections/*sort_by*
Disallow: /search/?*
${sitemapUrl ? `Sitemap: ${sitemapUrl}` : ''}`;
// Removed: Disallow: /policies/
```

### 4. Send metadata in the head to every bot

Next.js lets you choose which bots get blocking metadata in the head through htmlLimitedBots. Matching every user agent turns streaming metadata off, so all crawlers get title and description where they expect them. [\[6\]](https://nextjs.org/docs/app/api-reference/config/next-config-js/htmlLimitedBots)

next.config.ts:

```ts
import type { NextConfig } from 'next'

const config: NextConfig = {
  htmlLimitedBots: /.*/,
}

export default config
```

### 5. Use real links for navigation

Render collections, products, filters and policies as links with an href, through your framework's Link component. Client-side routing still works, and an agent reading the page can follow every path.

## Agent protocols for headless stores

A headless storefront can implement the open agent commerce protocols itself. These are the ones announced so far, newest last.

- **Sep 2025: Agentic Commerce Protocol.** OpenAI and Stripe released ACP, an open standard for checkout between buyers, AI agents and businesses. Medusa's tutorial shows how to implement its product feed and checkout specs; until OpenAI grants access, the example only logs to the console. [\[14\]](https://docs.medusajs.com/resources/how-to-tutorials/tutorials/agentic-commerce) [\[19\]](https://stripe.com/newsroom/news/stripe-openai-instant-checkout) [\[20\]](https://www.agenticcommerce.dev/)
- **Jan 2026: Universal Commerce Protocol.** Google announced UCP, an open standard for the whole shopping journey, co-developed with Shopify, Etsy, Wayfair, Target and Walmart. [\[21\]](https://blog.google/products/ads-commerce/agentic-commerce-ai-tools-protocol-retailers-platforms/)
- **Mar 2026: Vercel's agent-ready commerce template.** Vercel started vercel/shop in March 2026, described as agent-ready commerce with llms.txt, Schema.org data, a sitemap and robots, and archived the Next.js Commerce template in October 2026, pointing to vercel/shop. [\[15\]](https://github.com/vercel/shop) [\[16\]](https://github.com/vercel/commerce)
- **Oct 2026: Hydrogen 2026-10 works with any framework.** Shopify said Hydrogen now works with any JavaScript framework, with WebMCP so in-browser agents can search the catalog and update the cart. Its request handlers document MCP and UCP endpoints and buy permalinks for agents. [\[10\]](https://shopify.dev/changelog/blog/hydrogen-2026-10-is-now-available) [\[11\]](https://shopify.dev/docs/storefronts/hydrogen/request-handlers)

## What Aiscovery checks on headless stores

From the outside, the way an agent sees your store. Nothing to install, and agents stop before login, cart, checkout and payment.

[Request a demo](https://aiscovery.io/demo) · [Free AI crawler checker](https://aiscovery.io/tools/ai-crawler-checker)

- What the robots.txt your code generates declares for each AI crawler, and whether it blocks policy or product paths.
- Page basics on the HTML your server sends, read without running JavaScript: title, description, canonical, headings and language.
- JSON-LD syntax on the pages the check reads, and AI-facing files such as llms.txt and sitemaps.
- Reachability and redirects for our identified checker.
- GPT-6 Luna and Gemini try to find a product, its price, stock, delivery and returns in a real browser, stopping before cart and checkout.

## Questions about headless stores and AI agents

**Q: Is a Next.js store readable by AI agents?**

A: Usually. Pages and layouts are Server Components by default, and client components are prerendered into the HTML, so the first response carries your content. What's missing is anything fetched in the browser after load, plus whatever structured data and robots rules you didn't write.

**Q: How do I block GPTBot in Next.js?**

A: Add a rule for userAgent 'GPTBot' with disallow '/' in app/robots.ts. GPTBot is OpenAI's training crawler; OAI-SearchBot decides whether you appear in ChatGPT search, so leave it allowed if you want to be found.

**Q: How do I block only AI training bots in Nuxt?**

A: With the @nuxtjs/robots module, set blockAiBots to 'training'. It adds a group that disallows training crawlers and leaves search crawlers alone. You can also write your own groups per user agent.

**Q: Does Hydrogen support AI agent checkout?**

A: For Shopify-backed storefronts, Hydrogen's request handlers include MCP and UCP endpoints and buy permalinks for agentic commerce, and Hydrogen 2026-10 adds WebMCP so agents in the browser can search the catalog and update the cart.

**Q: Does Medusa's storefront starter include robots.txt and structured data?**

A: No. When we checked in October 2026, neither the archived nextjs-starter-medusa nor its successor dtc-starter had app/robots.ts or JSON-LD, and their next-sitemap config wasn't wired up, so add all three. Medusa's agentic commerce tutorial covers OpenAI's product feed and checkout specs.

**Q: Do you need access to our code to test a headless store?**

A: No. Aiscovery tests the storefront from the outside, the same way an agent does, so it works with any framework and backend.

## Sources

Official documentation and announcements, checked on 21 October 2026. Platforms change often, so check the source before you change settings.

1. [Server and Client Components](https://nextjs.org/docs/app/getting-started/server-and-client-components), Next.js docs
2. [How to implement JSON-LD in your Next.js application](https://nextjs.org/docs/app/guides/json-ld), Next.js docs
3. [robots.txt file convention](https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots), Next.js docs
4. [generateMetadata and streaming metadata](https://nextjs.org/docs/app/api-reference/functions/generate-metadata), Next.js docs
5. [Default HTML-limited bots list (html-bots.ts)](https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/router/utils/html-bots.ts), Next.js on GitHub
6. [htmlLimitedBots](https://nextjs.org/docs/app/api-reference/config/next-config-js/htmlLimitedBots), Next.js docs
7. [Rendering modes](https://nuxt.com/docs/4.x/guide/concepts/rendering), Nuxt docs
8. [Nuxt Robots module configuration](https://nuxtseo.com/docs/robots/api/config), Nuxt SEO
9. [Hydrogen skeleton: app/routes/\[robots.txt\].tsx](https://github.com/Shopify/hydrogen/blob/2026-04/templates/skeleton/app/routes/%5Brobots.txt%5D.tsx), Shopify on GitHub
10. [Hydrogen 2026-10 is now available](https://shopify.dev/changelog/blog/hydrogen-2026-10-is-now-available), Shopify developer changelog, 14 October 2026
11. [Hydrogen request handlers](https://shopify.dev/docs/storefronts/hydrogen/request-handlers), Shopify developer docs
12. [Next.js Starter Storefront](https://docs.medusajs.com/resources/nextjs-starter), Medusa docs
13. [medusajs/dtc-starter](https://github.com/medusajs/dtc-starter), Medusa on GitHub
14. [Implement Agentic Commerce specifications](https://docs.medusajs.com/resources/how-to-tutorials/tutorials/agentic-commerce), Medusa docs
15. [vercel/shop](https://github.com/vercel/shop), Vercel on GitHub
16. [vercel/commerce (archived)](https://github.com/vercel/commerce), Vercel on GitHub
17. [Merchant listing structured data](https://developers.google.com/search/docs/appearance/structured-data/merchant-listing), Google Search Central
18. [RFC 9309: Robots Exclusion Protocol](https://www.rfc-editor.org/rfc/rfc9309), IETF, 2022-09
19. [Stripe powers Instant Checkout in ChatGPT](https://stripe.com/newsroom/news/stripe-openai-instant-checkout), Stripe, 29 September 2025
20. [Agentic Commerce Protocol](https://www.agenticcommerce.dev/), OpenAI and Stripe
21. [New agentic commerce tools and the Universal Commerce Protocol](https://blog.google/products/ads-commerce/agentic-commerce-ai-tools-protocol-retailers-platforms/), Google, 11 January 2026

## Related guides

- [Can AI agents shop a custom-built store?](https://aiscovery.io/platforms/custom-built)
- [Can AI agents shop a Shopify store?](https://aiscovery.io/platforms/shopify)
- [Can AI agents shop a BigCommerce store?](https://aiscovery.io/platforms/bigcommerce)

### Go deeper

- [Every store engine](https://aiscovery.io/platforms)
- [Testing e-commerce stores with AI agents](https://aiscovery.io/resources/test-ecommerce-ai-agents)
- [The llms.txt guide](https://aiscovery.io/resources/llms-txt)
- [Our checker and how to allow it](https://aiscovery.io/checker)

Platform names and logos belong to their owners. Aiscovery is not affiliated with them; we test any store from the outside.

## See what agents see on headless stores.

Tell us your store and we'll show you, on a short call, what AI agents could and couldn't find there, and the fix for each.

[Request a demo](https://aiscovery.io/demo)

Have a real workflow to test now? [Apply as a launch partner](https://aiscovery.io/partners)

---

This is the Markdown version of the page for AI agents. The HTML page at the canonical URL is authoritative. Site index: https://aiscovery.io/llms.txt
