Back to Lab
7 min

Making an Online Store AI Agents Can Shop: What We Did at MU COFFEE, and What We Skipped

We reworked the MU COFFEE online store for the day someone tells an AI to "order more of that coffee." The core of the work was making the store readable, buyable, and operable for AI agents. Here is what we did, and what we chose not to do.

AIOE-commerceAI AgentsStructured DataNext.js

Making an Online Store AI Agents Can Shop

As more people hand research and shopping to AI, an online store gets read and operated by AI agents, not just people. In November 2026 we reworked the online store of MU COFFEE, the specialty coffee roastery I founded, with that in mind.

The short version: the core was making the store readable, buyable, and operable for AI agents — facts in the initial HTML, a single-URL path into the cart, and HTML that says what the screen means.

Below is what we did, in order of importance, followed by what we decided not to do.


1. Make it readable: put the facts in the initial HTML

Many AI crawlers read HTML without running JavaScript. Anything that only appears after JavaScript runs might as well not exist, even if people can see it on screen.

What we changed on MU COFFEE:

  • Metadata in the initial HTML. Next.js can stream metadata for dynamic pages after the first response. For the major AI crawlers, we configured it to always render in the initial <head>
  • Product facts as structured data. Origin, process, variety, roast level, flavor notes, tax-inclusive price, shipping (free over ¥5,000), and the return policy
  • Different robots.txt rules for different crawlers. Search and training crawlers don't see cart and checkout pages. AI agents acting on a user's request (ChatGPT-User, Claude-User, Perplexity-User) may go as far as cart and checkout

To be clear about structured data: adding it doesn't make AI cite you. Google says AI Overviews and AI Mode need no special markup. We added it so that facts like prices and shipping costs aren't misread.


2. Make it buyable: add to cart from a single URL

When an AI agent helps someone shop, the most fiddly part is picking a product, choosing size and grind, and adding it to the cart. So we made a link that puts the item in the cart just by opening it:

https://mu.coffee/store/cart?add=<variant_id>:<quantity>:<grind>

Join several items with commas to add them all at once. It's not only for AI: you can also send someone a link on social media or a chat app with the beans already in their cart.

The more convenient a feature is, the more it needs a safe design. What we paid attention to:

  • No price in the link. The amount charged is still calculated on the server. A link can't change a price
  • Limited input. Quantity is 1–99, at most 20 lines per link, and product IDs are format-checked
  • Public products only. Unlisted products can't be added through a link
  • No double adds. Once the items are in the cart, the parameters are removed from the URL, so reloading the page doesn't add them again
  • Wholesale discounts load first. Items are added only after login state and discounts are loaded, so displayed prices stay correct

We also added a machine-readable product feed at /products.json, so an AI can see the whole catalog at once. For each size of each product it lists the tax-inclusive price, shipping, available grinds, and an add-to-cart URL.


3. Make it operable: say what the screen means

When an AI agent operates a page, it relies on what the HTML means, not how it looks. The same is true for people using screen readers.

  • Size options are grouped with fieldset and legend, and aria-pressed says which one is selected
  • Roast and flavor scales and the radar chart expose their values as readable labels
  • The cart's +, − and remove buttons are labeled with the product they act on
  • Checkout and sign-up forms use autocomplete, so browser autofill works

All of this is basic accessibility. Much of making a site agent-ready overlaps with making it accessible.


4. One source for each fact

Shipping costs, the return policy, and each product's origin and roast appear in many places: the page, structured data, llms.txt, and the product feed. If one of them goes stale, AI picks up conflicting information.

So product attributes and purchase rules each live in one place, and every output reads from it. We also wrote down which places to update when shipping changes. It's unglamorous, but consistent facts are a precondition for AI describing you correctly.


5. A foundation bug we also fixed: canonical (basic SEO)

Not the main story, but worth noting as foundation work: every product page and the store index pointed their canonical at the homepage. The cause was metadata in the Next.js (App Router) root layout being inherited by every page below it. We removed the canonical from the root layout, made every public page emit its own URL, and set cart, checkout, login and account pages to noindex. This is a basic SEO bug fix rather than an AIO measure.


What we didn't do

We also want to be clear about what we judged not worth spending on.

  • No expectations for llms.txt. We do publish /llms.txt with the product list and a buying guide, but there's little evidence that major AI services actually use it. We keep it consistent with the real pages and don't treat it as a main lever
  • No chasing FAQ rich results. We built an FAQ page, but Google stopped showing FAQ rich results in May 2026. The page exists to answer shipping, delivery time and payment questions in one place, for people and AI alike
  • No new specs yet. New agent-facing specs such as WebMCP can wait until there's evidence they're actually used

Results come next

This just shipped, so there are no numbers to report yet. We'll track whether product pages get indexed correctly and whether visits and orders start arriving through AI, using Search Console and order data.


Summary

  • The core is making the store readable, buyable, and operable for agents
  • Foundation-level SEO bugs, like the canonical one, are worth fixing when you find them
  • So AI can read the store, put key facts in the initial HTML
  • So AI can buy, offer single-URL add-to-cart links, designed to fail safe
  • So AI can operate the store, say what the screen means in HTML, which is mostly accessibility work
  • Decide what not to do, too. We don't expect much from llms.txt or brand-new specs

At gKnowsis, we offer an outside-in check along these lines as the AIO Audit. Scope and pricing are on the service page. To find out how your site looks to AI, get in touch.