The Decision
Agent-mediated commerce is here in pilot form — Google's Universal Commerce Protocol, OpenAI's instant checkout, AP2, and WebMCP all assume agents can find and transact against your catalog Source 10Source 6Source 5. The choice every commerce team faces in 2026 is whether to keep shipping HTML product pages as the primary integration surface for buyers (human and machine) or to expose structured endpoints — JSON-LD, JSON-RPC, WebMCP tools — as a first-class channel alongside the storefront.
The Table
| Dimension | HTML Product Pages | Structured Endpoints (JSON-LD + WebMCP/JSON-RPC) |
|---|---|---|
| Latency | 2.6 MB median mobile page, LCP > 2.5s on most pages over 1 MB Source 16Source 16; agent must scrape DOM or screenshot | One tool call returns structured results, replacing "dozens of interactions" of clicking and scrolling Source 6 |
| Memory / token cost | 34,000 chars (~8,000 tokens) per scraped page; rises ~9x at 100-page scale Source 3 | ~90% token reduction when script filters to known fields; "thousands of tokens for each image" eliminated Source 3Source 6 |
| DX / setup | Already shipped; works for humans; AMP showed the cost of a parallel HTML dialect Source 9Source 15 | JSON-LD via <script type="application/ld+json"> in layout.js/page.js; WebMCP exposes search_products as a declarative tool Source 12Source 6 |
| Breaks when | Page weight inflates, client-rendered, hidden in accordions, layout shifts on personalization widgets Source 16Source 7Source 14 | Schema is fabricated or duplicated across templates; quotes diverge from on-page text; tool descriptions drift Source 14Source 18 |
| Pick if | Your buyer is overwhelmingly human and your SEO depends on long-form landing pages Source 2 | You expect agents to discover, compare, and checkout — and you want them to pick you without burning tokens parsing your DOM Source 10Source 6 |
I'd pick structured endpoints as the primary contract and treat the HTML page as the secondary, human-facing render.
The Mechanism
Why structured endpoints win for agent-mediated buying. When an agent visits a product page today, it is, as Sam Witteveen puts it, "a tourist who doesn't speak the language of that site" — scraping HTML or screenshotting, then translating both into a foreign representation just to find a price and an add-to-cart button Source 6. WebMCP lets the site register a tool — search_products — and the agent calls one function instead of clicking through filters. The agent gets structured results back; "one tool call replaces what could have been dozens of interactions" Source 6. AP2 and A2A formalize the wire format as JSON-RPC 2.0 over plain HTTP, so existing API gateways, auth, and observability work unchanged Source 5Source 13.
The economics compound. A naive HTML fetch of a single product index page costs ~8,000 tokens; filtering to known fields drops that under 1,000 — a ~90% reduction that multiplies across the 50-to-100-page sweeps a shopping agent runs per query Source 3. Page weight is moving the wrong way: median mobile page is 2.6 MB, up 8.4% year-over-year, and AI crawlers "may limit the depth or frequency of crawling to manage their computation budgets" — sites overloaded with JavaScript and client-side rendering "could end up being underrepresented" because the crawlers don't render Source 16. Catchpoint's instrumentation of AP2 flows shows the failure modes are now in the JSON-RPC graph between merchant, payment, and credential agents — not in the page render path at all Source 5Source 5. If your commerce surface isn't on that graph, the agent doesn't see you.
Why HTML pages still win for the human session. Russell's argument for e-commerce stands: "server-generated semantic HTML and progressive enhancement" beats SPAs for human shoppers because sessions are short, content is fresh, and there's "very little shared data across these pages" Source 2. The fastest 2025 retail landing page (IKEA) renders in ~1 second; the laggards take 4+ seconds and bleed conversions Source 8Source 8. JSON-LD is already 43% of home-page structured data and is increasingly used by LLM-based search to "extract, summarize, and recombine content" Source 1Source 14. The HTML page, served lean with embedded JSON-LD, is still the right artifact when a human is reading and the agent only needs to understand — not transact Source 12.
The default, though, is structured endpoints. Buying is no longer "the human clicks through a shopping cart" — it's "an AI agent (powered by Gemini) can interpret a natural-language intent, search merchant catalogues through APIs, fetch user credentials from a secure wallet service, initiate and confirm payment, all through machine-to-machine communication" Source 5. The product page is observability and SEO; the endpoint is the transaction.
The Migration Path
If you chose HTML-only and want to move:
-
Ship JSON-LD on every PDP first. It's the cheapest move. In Next.js, render it as a
<script type="application/ld+json">inpage.jswith@type: 'Product', escaping<to\u003cfor XSS Source 12. Validate with Rich Results Test. This unblocks LLM-based search extraction without touching your transaction stack Source 14Source 1. -
Expose a read-only product endpoint that returns the same payload as the JSON-LD. Use JSON-RPC 2.0 over HTTPS — the same format A2A and AP2 use — so you're not inventing a third dialect Source 5Source 13. Methods:
products.search,products.get,inventory.check. Make tool calls idempotent (same params → same result) so agent retries are safe Source 17. -
Wrap the endpoint as a WebMCP tool with a declarative spec on the HTML page (
<tool name="search_products" ...>). Well-structured HTML forms get you ~80% of the way; the imperative API handles the dynamic cases Source 6. The agent now calls a function instead of scraping. -
Stage checkout behind a confirmation gate. AP2/UCP push toward end-to-end agent checkout, but the act-with-confirmation pattern — agent prepares the order, human clicks "Send" — is the production-safe shape today Source 11Source 4. Wire the cart-prep call as a separate RPC from
order.commit. -
Instrument the agent path end-to-end. Catchpoint found 429s, merchant timeouts, and Cloudflare 530s hidden inside surface-level 200 OKs — observability built for page loads misses them entirely Source 5. Log every tool call: model version, params, latency, result.
-
Strip the HTML PDP of agent-hostile cruft. Plugins on a single landing page can add 43+ requests and 432ms of Long Tasks Source 8. If the goal is "machine-readable signals," the path is fewer scripts, not more Source 14Source 16.
CEMENT Brick
If you ship 2026 commerce with the HTML product page as your only integration surface, then agents will under-discover and under-buy your catalog, because every shopping agent — whether driven by UCP, AP2, or WebMCP — pays a ~90% token tax Source 3 to parse your DOM, runs into rendered-versus-raw gaps on client-side content, and loses to competitors who expose a single JSON-RPC products.search call that returns the exact fields the agent needs to compare, decide, and check out Source 3Source 6Source 16Source 5.
Sources
- Engineering Docs
- If Not React, Then What? - Infrequently Noted
- Agent Skills: Code Beats Markdown Here's Why
- AI agents in 2025: Why agentic commerce isn't ready for Black Friday yet
- How to Monitor AI Agents in Commerce Systems
- The Rise of WebMCP
- Engineering Docs
- Expert: Mark Zeman
- Further thoughts on Accelerated Mobile Pages AMP
- Google's New Universal Commerce Protocol
- Beyond Generative: The Rise Of Agentic AI And User-Centric Design — Smashing Magazine
- How to implement JSON-LD in your Next.js application
- A2A vs MCP: AI Agent Communication Explained
- Engineering Docs
- Implementing Accelerated Mobile Pages AMP
- Engineering Docs
- Engineering Docs
- Building Tools for AI Agents