Tuesday, April 7, 2026

Engineering Storefronts for Agentic Commerce – O’Reilly


For years, persuasion has been essentially the most beneficial talent in digital commerce. Manufacturers spend hundreds of thousands on advert copy, testing button colors, and designing touchdown pages to encourage folks to click on “Purchase Now.” All of this assumes the client is an individual who can see. However an autonomous AI procuring agent doesn’t have eyes.

I lately ran an experiment to see what occurs when a well-designed shopping for agent visits two sorts of on-line shops: one constructed for folks, one constructed for machines. Each shops bought mountain climbing jackets. Service provider A used the form of advertising and marketing copy manufacturers have refined for years: “The Alpine Explorer. Extremely-breathable all-weather shell. Conquers stormy seas!” Worth: $90. Service provider B supplied solely uncooked structured information: no copy, only a JSON snippet {"water_resistance_mm": 20000}. Worth: $95. I gave the agent a single instruction: “Discover me the most affordable waterproof mountain climbing jacket appropriate for the Scottish Highlands.”

The agent rapidly turned my request into clear necessities, recognizing that “Scottish Highlands” means heavy rain and setting a minimal water resistance of 15,000–20,000 mm. I ran the take a look at 10 occasions. Every time, the agent purchased the costlier jacket from Service provider B. The agent fully bypassed the cheaper choice because of the information’s formatting.

The explanation lies within the Sandwich Structure: the center layer of deterministic code that sits between the LLM’s intent translation and its ultimate choice. When the agent checked Service provider A, this center layer tried to match “conquers stormy seas” towards a numeric requirement. Python gave a validation error, the strive/besides block caught it, and the cheaper jacket was dropped from consideration in 12 milliseconds. That is how well-designed agent pipelines function. They place intelligence on the prime and backside, with security checks within the center. That center layer is deterministic and literal, systematically filtering out unstructured advertising and marketing copy.

How the Sandwich Structure works

A well-built procuring agent operates in three layers, every with a essentially completely different job.

Layer 1: The Translator. That is the place the LLM does its primary job. A human says one thing obscure and context-laden—”I would like a water-resistant mountain climbing jacket for the Scottish Highlands”—and the mannequin turns it right into a structured JSON question with express numbers. In my experiment, the Translator constantly mapped “waterproof” to a minimal water_resistance_mm between 10,000 and 20,000mm. Throughout 10 runs, it stayed targeted and by no means hallucinated options.

Layer 2: The Executor. This vital center layer comprises zero intelligence by design. It takes the structured question from the Translator and checks every service provider’s product information towards it. It depends completely on strict kind validation as a substitute of reasoning or interpretation. Does the service provider’s water_resistance_mm discipline include a quantity higher than or equal to the Translator’s minimal? If sure, the product passes. If the sector comprises a string equivalent to “conquers stormy seas,” the validation fails instantly. These Pydantic kind checks deal with ambiguity as absence. In a manufacturing system dealing with actual cash, a strive/besides block can’t be swayed by good copywriting or social proof.

Layer 3: The Choose. The surviving merchandise are handed to a second LLM name that makes the ultimate choice. In my experiment, this layer merely picked the most affordable choice. In additional advanced situations, the Choose evaluates worth towards particular consumer preferences. The Choose selects solely from a preverified shortlist.

Determine 1: The Sandwich Structure

This three-layer sample (LLM → deterministic code → LLM) displays how engineering groups construct most critical agent pipelines at this time. DocuSign’s gross sales outreach system makes use of the same construction: An LLM agent composes customized outreach based mostly on lead analysis. A deterministic layer then enforces enterprise guidelines earlier than a ultimate agent evaluations the output. DocuSign discovered the agentic system matched or beat human reps on engagement metrics whereas considerably reducing analysis time. The explanation this sample retains showing is evident: LLMs deal with ambiguity effectively, whereas deterministic code supplies dependable, strict validation. The Sandwich Structure makes use of every the place it’s strongest.

Need Radar delivered straight to your inbox? Be part of us on Substack. Join right here.

That is exactly why Service provider A’s jacket vanished. The Executor tried to parse “Extremely-breathable all-weather shell” as an integer and failed. The Choose obtained an inventory containing precisely one product. In an agentic pipeline, the layer deciding whether or not your product is taken into account can not course of normal advertising and marketing.

From storefronts to structured feeds

If advert copy will get filtered out, retailers should expose the uncooked product information—cloth, water resistance, delivery guidelines—already sitting of their PIM and ERP techniques. To a procuring agent validating a breathability_g_m2_24h discipline, “World’s most breathable mesh” triggers a validation error that drops the product completely. A competitor returning 20000 passes the filter. Persuasion is mathematically lossy. Advertising copy compresses a high-information sign (a exact breathability ranking) right into a low-information string that can’t be validated. Data is destroyed within the translation, and the agent can not recuperate it.

The rising normal for fixing that is the Common Commerce Protocol (UCP). UCP asks retailers to publish a functionality manifest: one structured Schema.org feed that any compliant agent can uncover and question. This migration requires a basic overhaul of infrastructure. A lot of what an agent wants to guage a purchase order is at present locked inside frontend React parts. Each piece of logic a human triggers by clicking should be uncovered as a queryable API. In an agentic market, an incomplete information feed results in full exclusion from transactions.

Why telling brokers to not purchase your product is an efficient technique

Exposing structured information is simply half the battle. Retailers should additionally actively inform brokers to not purchase their merchandise. Conventional advertising and marketing casts the widest web attainable. You stretch claims to broaden enchantment, letting returns deal with the inevitable mismatches. In agentic commerce, that logic inverts. If a service provider describes a light-weight shell as appropriate for “all climate situations,” a human applies widespread sense. An agent takes it actually. It buys the shell for a January blizzard, leading to a return three days later.

In conventional ecommerce, that return is a minor price of doing enterprise. In an agentic surroundings, a return tagged “merchandise not as described” generates a persistent belief low cost for all future interactions with that service provider. This forces a method of adverse optimization. Retailers should explicitly code who their product is just not for. Including "not_suitable_for": ["sub-zero temperatures", "heavy snow"] prevents false-positive purchases and protects your belief rating. Agentic commerce closely prioritizes postpurchase accuracy, that means overpromising will steadily degrade your product’s discoverability.

From banners to logic: How reductions turn out to be programmable

Simply as brokers ignore advertising and marketing language, they can’t reply to pricing methods. Open any on-line retailer and also you’ll encounter countdown timers or banners saying flash gross sales. Promotional advertising and marketing ways like faux shortage rely closely on human feelings. An AI agent doesn’t expertise shortage anxiousness. It treats a countdown timer as a impartial scheduling parameter.

Reductions change type. As a substitute of visible triggers, they turn out to be programmable logic within the structured information layer. A service provider might expose conditional pricing guidelines: If the cart worth exceeds $200 and the agent has verified a competing supply beneath $195, robotically apply a ten% low cost. It is a essentially completely different incentive. It serves as a clear, machine-readable contract. The agent immediately calculates the deal’s mathematical worth. With the logic uncovered immediately within the payload, the agent can issue it into its optimization throughout a number of retailers concurrently. When the client is an optimization engine, transparency turns into a aggressive function.

The place persuasion migrates

The Sandwich Structure’s center layer is persuasion-proof by design. For advertising and marketing groups, structured information is not a backend concern; it’s the main interface. Persuasion now migrates to the sides of the transaction. Earlier than the agent runs, model presence nonetheless shapes the consumer’s preliminary immediate (e.g., “discover me a North Face jacket”). After the agent filters the choices, human patrons usually assessment the ultimate shortlist for high-value purchases. Moreover, operational excellence builds algorithmic belief over time, appearing as a structural type of persuasion for future machine queries. You want model presence to form the consumer’s preliminary immediate and operational excellence to construct long-term algorithmic belief. Neither issues for those who can not survive the deterministic filter within the center.

Brokers at the moment are shopping your retailer alongside human patrons. Manufacturers treating digital commerce as a purely visible self-discipline will discover themselves completely optimized for people, but invisible to the brokers. Engineering and industrial groups should align on a core requirement: Your information infrastructure is now simply as vital as your storefront.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles