What the agent can do
The things the shopping agent can do for a shopper - and the safety check behind each one.
The shopping agent works through a small, explicit set of actions. Every action checks who's asking before doing anything, so the agent can only ever do what the current shopper is allowed to do.
Browsing the catalog (open to everyone)
Anyone browsing the store can use these - no sign-in needed.
Search the catalog
Returns a list of products (title, image, price, stock) matching a free-text query. It understands what the shopper means, not just exact keywords. Limited to the store the shopper is on.
View a product
Full detail for one product: description, all images, variants, average rating, and recent reviews. Useful when the shopper asks "tell me more about this".
Cart (signed-in shoppers)
Add to cart
Adds a product (and variant and quantity) to the shopper's cart. Not available to anonymous shoppers. It runs the same stock and variant checks as the regular checkout flow.
Orders (signed-in shoppers)
Look up orders
Lists the shopper's own orders at this store - status, total, line items, and tracking links. Only available to a signed-in shopper, and only for their own orders.
Order detail
Full breakdown of one order - every line item, addresses, fulfillment, refund history, invoice link. Same checks as above, plus a check that the order really belongs to that shopper.
Preferences (signed-in shoppers)
Read preferences
Returns the shopper's saved preferences (size, color, dietary, whatever). The agent uses these to filter recommendations without asking every time.
Remember a preference
Saves a new preference. The agent uses this when the shopper says "I usually buy Medium", "I'm allergic to nuts", "I prefer organic cotton".
Conversation history
For signed-in shoppers, conversations are saved to their account. For anonymous shoppers, history stays in their own browser. When an anonymous shopper signs in, the agent can carry their history into their account - but only with explicit consent.
Why check every action?
A single "is this person allowed in?" check at the door wouldn't work, because the same agent serves anonymous browsers, signed-in shoppers, and (in the future) admins. Checking each action individually lets the agent attempt anything it wants - the action either runs or comes back "not authorized". The agent sees that, apologizes, and tries a different path. A shopper can never reach another shopper's data, or another store's.