What is an AI shopping agent?
An AI shopping agent is a conversational decision layer connected to live commerce tools. It can translate a customer’s goal into product constraints, retrieve current options, explain trade-offs, modify a cart, and hand the customer into a controlled checkout.
That is materially different from a FAQ bot. A bot that answers “Do you ship internationally?” can operate on published content. An agent responding to “Find a waterproof jacket in my size that arrives before Friday” needs live inventory, buyer context, delivery estimates, and permissioned actions.
The model should reason about the request. Your commerce system should remain the source of truth.
Which capabilities belong in the architecture?
Catalog retrieval
Search must combine semantic intent with deterministic filters. “Minimal black running shoes” is semantic; size, stock, price, material, and delivery window are structured constraints. Retrieve both, then preserve the product and variant identifiers returned by the catalog.
Recommendation
Ask the model to rank only the retrieved candidates. The response should name the relevant constraint behind each recommendation and disclose uncertainty. If delivery data is unavailable, say so instead of inferring it from a product description.
Cart operations
Expose narrow tools such as get_cart, add_cart_line, remove_cart_line, and update_buyer_identity. Shopify’s Storefront API models the cart as a persistent object containing merchandise lines, costs, discounts, and a checkout URL. Keep the cart identifier in application state, not in model memory.
Checkout handoff
The agent may prepare a transaction, but the customer should see the final items, quantities, total, address, delivery method, and payment step before confirmation. Stripe recommends associating a PaymentIntent with the cart or customer session and using idempotency to prevent duplicate operations.
Intent Discovery
Sizing/Style Needs
Inventory RAG
Real-time Stock Check
Personalized Offer
Scarcity & Persuasion
Cart Injection
Direct API Action
Secure Checkout
Payment Handover
How should tool calling work?
Use a small, typed tool surface. Function calling connects the model to your application, but it does not make the model an authorization system.
Understand
Extract the customer's goal, hard constraints, preferences, and missing information.
Structured intent schemaRetrieve
Query the product, inventory, price, promotion, policy, and delivery systems using current identifiers.
Commerce APIs + hybrid searchDecide
Rank only eligible products and explain the trade-offs using retrieved facts.
Constrained model responseAct
Execute narrow cart tools, verify the returned state, and require approval for checkout.
Policy gateway + idempotencyUse strict schemas for tool arguments where the model platform supports them. Validate every argument again on the server. Product IDs, quantities, prices, discounts, and buyer context must be authorized against the current session.
What should remain deterministic?
The model should never invent or privately calculate facts your commerce platform already owns. Keep these operations deterministic:
- eligibility and stock checks;
- price, tax, discount, and shipping calculations;
- customer authentication and account access;
- return-policy and regulated-product restrictions;
- payment authorization;
- order creation and refund execution.
The agent can explain the result, but it should not become the source of record.
Treat conversation text as untrusted input
A customer, product description, review, or retrieved webpage can contain instructions that attempt to redirect the agent. Keep tool permissions outside the prompt, allow-list tool destinations, and never let retrieved text redefine the action policy.
How do you preserve trust during the conversation?
A useful agent makes its state visible. Show which filters are active, which cart changed, and whether an answer came from live inventory or general guidance. When the cart updates, announce the new state through an accessible status message. W3C guidance recommends programmatically exposing status changes so assistive technology can report them without moving focus.
Also provide clear escape routes:
- let the customer inspect and edit the cart directly;
- offer a human handoff with conversation context;
- preserve the original product page and policy links;
- explain why an item was excluded;
- make undo available for reversible actions.
Trust falls quickly when the interface hides agent actions behind fluent prose.
What should you measure?
Do not begin with “messages per session.” Measure whether the system improves customer outcomes without increasing operational risk:
- recommendation acceptance;
- qualified add-to-cart rate;
- checkout completion after agent assistance;
- out-of-stock or price-mismatch incidents;
- tool failure and retry rates;
- duplicate-action prevention;
- human escalation rate;
- returns connected to incorrect recommendations.
Break these metrics down by traffic source, device, customer status, and product category. An average can hide a system that works well for simple products and fails on high-consideration purchases.
A production rollout plan
Start with read-only guidance
Connect search, product details, policies, and delivery estimates. Evaluate factuality and constraint satisfaction before enabling writes.
Add reversible cart actions
Allow add, remove, and update operations. Verify the tool response after every action and make undo obvious.
Introduce approval boundaries
Require confirmation for account changes, checkout, payment, subscription, and any irreversible operation. Display the exact action rather than asking for a vague “yes.”
Expand only from evidence
Use traced failures and evaluation cases to decide which capability to add next. A smaller reliable agent usually creates more value than a broad agent customers cannot trust.