1. The question always comes up at the first demo

At a major European grocery retailer, the assistant I worked on can suggest meal ideas for the week, turn them into a shopping list and keep adjusting that list through the conversation. At the first demo, the question came within five minutes: "Can it put all of that straight into the cart?"

It is a fair question. Once the agent has built the list, pushing it into the cart looks like the obvious next step, and it is exactly what agentic commerce demos have been promising for a year. Yet this is precisely where I chose not to go, and I believe it is one of the most important architecture decisions in that product.

2. What the agent does well: absorbing mental load

To know where to draw the line, you have to look at what the agent actually brings.

Coming up with meals for a family with a child who refuses vegetables, accounting for what is left in the fridge, turning all of that into a shopping list with sensible quantities: it is long, tedious, and nobody enjoys it. That is where a language model is irreplaceable. It reasons over a fuzzy intent, it proposes, it adjusts when you say "less meat this week". The value is in that conversation, and it is huge.

Adding to the cart, on the other hand, is not a cognitive task. It is a decision. And that is where everything changes.

3. What the agent does badly: deciding for the customer

Take one line from the list: "apples". To add it to the cart you need to pick the variety, the packaging (loose, one-kilo bag, tray of four), organic or not, the brand, and the quantity. In the aisle or on a product page, the customer settles all of that in a second, with their eyes. In a chat, each choice becomes a round trip.

Either the agent asks for confirmation every time, and adding ten items turns into an endless conversation nobody finishes. Or the agent decides on its own, and it will get a share of the lines wrong, because it cannot guess the preferences of a customer it does not know yet. In both cases the experience is worse than the click it was meant to replace.

The consequences of an error are not symmetric either. A bad meal idea is fixed in one sentence. A product added by mistake is, at best, an unpleasant surprise at delivery and, at worst, a disputed order, a refund and a call to customer service. A transaction confirmed on the customer's behalf also raises a genuine legal question of consent, governed in Europe by the Consumer Rights Directive. The customer wants absolute control over what they pay for, and they are right.

4. The agent prepares, the interface executes

The solution we settled on fits in one sentence: the agent prepares and suggests, the interface executes.

Concretely, the agent does not answer with text when products are involved. It returns a widget: a shopping list where each line shows the suggested product, alternatives, a checkbox and an editable quantity. At the bottom, an "Add to cart" button. The customer scans, unticks, adjusts, then clicks once. That click calls the site's cart API, exactly like a click on a product page, without going through the model.

class ShoppingListItem(BaseModel):
    product_id: str
    quantity: int = Field(ge=1, le=20)
    selected: bool = True

class AddToCartRequest(BaseModel):
    items: list[ShoppingListItem]

@router.post("/cart/add")
def add_to_cart(req: AddToCartRequest, cart: CartClient = Depends(get_cart)):
    # Triggered by the customer's click, never by the model.
    selected = [i for i in req.items if i.selected]
    return cart.add_many([(i.product_id, i.quantity) for i in selected])

This split follows a usability principle that has been around for thirty years, user control and freedom, the third of Nielsen's ten heuristics: users should always know what is about to happen and be able to back out. A button guarantees that. A sentence in a chat does not.

It also has an engineering advantage that is easy to underestimate: the boundary between probabilistic and deterministic is drawn in code. The model produces a typed proposal, validated with Pydantic. Adding to the cart is a plain API call, testable, logged, with no possible hallucination. If the agent gets it wrong, it gets a suggestion wrong, and the customer sees it before acting.

5. What about checkout?

For payment, the answer is even clearer. Today I do not let an agent confirm an order on a customer's behalf, and I have yet to meet a consumer retail context where the gain justifies the risk.

That does not mean the question is closed. The agentic payment protocols announced recently, such as the Agent Payments Protocol from Google and its partners, aim precisely at framing a mandate given by the user to an agent, with cryptographic proof of what was authorised. That is the right direction: if an agent ever pays, it will be because the customer signed a precise mandate, not because they said "yes" in a chat. Until those standards are deployed on the merchant side and the banking side, the "Pay" button stays with the customer.

What actually works in production

1. Separate thinking from acting: everything that requires reasoning over a fuzzy intent goes to the agent. Everything that commits the customer (cart, payment, deletion) goes through an interface click.

2. Answer with widgets, not text, as soon as products are involved: a checklist with a button beats ten confirmations in natural language.

3. Type the boundary: the model produces a Pydantic object, the action is a plain API call triggered by the user. The model never holds the right to write to the cart.

4. Keep the asymmetry of errors in mind: a bad suggestion costs a sentence, a bad order costs a customer.

In conclusion

Wanting an agent to do the checkout means judging the agent on the wrong task. Its value lies in what it spares the customer before the cart: thinking, searching, comparing, composing. The final click is the moment the customer takes back control, and a good product leaves it to them. The day an agent pays on someone's behalf, it will be within an explicit mandate, and the code, not the prompt, will have to carry that guarantee.

About the author

Hugues Lys is a freelance engineer specialised in artificial intelligence and machine learning (Machinamenta EURL). He designs and ships AI systems to production, from scoring models to conversational agents, as a senior engineer or technical lead.

Get in touch for January 2027 →

The discussion around this article is on LinkedIn →