## Sources

1. [Engineering Storefronts for Agentic Commerce](https://www.oreilly.com/radar/engineering-storefronts-for-agentic-commerce/)

---

### Engineering Storefronts for Agentic Commerce by Heiko Hotz

**Main Arguments**
*   Traditional e-commerce has long relied on visual persuasion, emotive ad copy, and landing page design to encourage humans to make purchases [1]. However, this approach fails entirely when the buyer is an autonomous AI shopping agent, which lacks eyes and does not experience human emotions or scarcity anxiety [1], [2].
*   Marketing language is fundamentally "mathematically lossy" because it compresses precise, high-information signals (like an exact breathability rating) into vague, low-information strings that a machine cannot validate [3]. Consequently, products relying on persuasive copy over hard data will be systematically filtered out by AI pipelines [4], [3].
*   To survive in an agent-driven market, commercial data infrastructure is now just as critical as the visual storefront [5]. Merchants must pivot from hiding logic inside visual React components to exposing raw, machine-readable product specifications through structured feeds [6]. 

**Key Takeaways**
*   **The Sandwich Architecture**: Modern AI shopping agents use a three-layer pipeline that utilizes large language models (LLMs) for handling ambiguity and deterministic code for strict validation [7].
    *   **Layer 1: The Translator**: An LLM interprets a vague human request (e.g., "waterproof jacket for the Scottish Highlands") and converts it into a precise, structured JSON query with explicit numerical requirements [8].
    *   **Layer 2: The Executor**: This middle layer acts as a strict filter containing zero intelligence [9]. It uses rigid type validation (such as Pydantic checks) to evaluate product data against the Translator's requirements [9]. It treats ambiguity as absence, meaning any field containing marketing fluff instead of a required number will immediately fail the validation [9]. 
    *   **Layer 3: The Judge**: A final LLM reviews the preverified shortlist of products that survived the Executor's filter and makes the ultimate selection based on parameters like price or specific user preferences [7].
*   **Negative Optimization**: Traditional marketing casts a wide net, relying on human common sense to avoid mismatched purchases [10]. In agentic commerce, an AI takes claims literally, and a resulting "item not as described" return will generate a persistent trust discount for the merchant [10], [11]. To protect their algorithmic trust score, merchants must employ "negative optimization" by explicitly defining who their product is *not* for using structured data [11].
*   **Programmable Logic over Visual Banners**: AI agents ignore visual countdown timers and flash sale banners, treating them merely as neutral scheduling parameters [2]. Instead, discounts must become programmable logic embedded in the data payload, operating as transparent, machine-readable contracts (e.g., conditional pricing rules based on cart value and competing offers) that optimization engines can mathematically calculate [2].
*   **The Migration of Persuasion**: The deterministic middle layer of AI agents is entirely persuasion-proof, meaning marketing teams must adopt structured data as their primary interface [12]. Persuasion now occurs at the "edges" of the transaction: shaping the user's initial prompt through brand awareness before the agent runs, and building long-term algorithmic trust through operational excellence after the purchase [12].

**Important Details**
*   The author conducted an experiment where an AI shopping agent was tasked with finding the cheapest waterproof hiking jacket for the Scottish Highlands [13]. The agent consistently chose a $95 jacket from a merchant providing raw JSON data (`{"water_resistance_mm": 20000}`) over a $90 jacket from a merchant using marketing copy ("Conquers stormy seas!") [13].
*   The cheaper jacket was dropped from the agent's consideration in just 12 milliseconds because the deterministic middle layer threw a Python validation error when trying to parse the marketing phrase as a numeric requirement [4]. 
*   DocuSign successfully utilizes a similar "Sandwich Architecture" for sales outreach, where an LLM composes personalized research, a deterministic layer enforces business rules, and a final agent reviews the output [7].
*   To adapt to this shift, the Universal Commerce Protocol (UCP) is emerging as a standard [6]. UCP requires merchants to publish a "capability manifest"—a structured Schema.org feed that compliant AI agents can easily discover and query [6].