How to Let an AI Agent Shop and Check Out for You
Most "AI shopping" still stops at the cart. The agent finds the product, then hands you a link and asks you to finish the purchase yourself. Agentcard's buy tool removes that last step: you describe what you want in plain English and the agent does the whole thing — search, cart, delivery details, and checkout — paying from a virtual card after you confirm.
This is one tool, not a toolbox. There is no separate search, add-to-cart, or pay function for the agent to orchestrate. It just calls buy and has a conversation.
How the buy tool works
The whole shopping experience — searching a merchant, building a cart, collecting a delivery address, checking a budget, and checking out — runs in a server-side agent loop at Agentcard. Your agent passes your request to the buy tool and relays the assistant's reply back to you. Because the flow is conversational, the tool returns a conversation id, and each follow-up ("add a Coke," "yes, place it") continues the same order rather than starting over.
One rule the agent follows: it calls get_instructions first, which fetches the current usage guide so its behavior stays in sync with the live shopping flow instead of relying on stale, hardcoded steps.
Prerequisites
- An Agentcard account funded with a payment method, and the CLI installed (see How to Give an AI Agent a Credit Card).
- The Agentcard MCP server connected to your agent.
- A merchant linked to your account (the tool lists the merchants you have connected; today that includes DoorDash and Good Eggs, with more on the way).
Step 1: Describe the purchase
Tell the agent what you want, naming the merchant if you have a preference:
"Order a Caesar salad and a sparkling water from Zuni on DoorDash."
From the CLI:
agent-cards buy "a Caesar salad and a sparkling water from Zuni on DoorDash"Step 2: Let it build the cart and ask for details
The tool searches the merchant, assembles the cart, and asks for anything it needs — most often the delivery address. It then shows you the cart and the total and waits. Nothing is charged yet. You can keep editing in plain language:
"Deliver to 123 Main St, and add a side of fries."
Step 3: Confirm to check out
Checkout — which charges a one-time virtual card — happens only after you explicitly confirm. The agent relays your confirmation on the same conversation, places the order, and reports back:
"Looks good — place the order."
The order is paid by a virtual debit card funded for that purchase, so the merchant only ever sees a single-use number with a hard limit — never your real card. If something about the total looks off, the limit protects you: the card declines rather than letting the charge run over.
Why a virtual card is the right payment method here
- Hard ceiling per order. The card is funded with a fixed amount, so a bad cart or a runaway loop cannot overspend. See When AI Agents Overspend.
- Explicit confirmation. The agent shops freely but cannot check out until you say so.
- Per-purchase isolation. Each checkout uses its own card, so a single number leaking does not expose anything else.
Next steps
- Have the same tool book travel in How to Let an AI Agent Book Flights.
- Cap what any agent can spend in How to Give Your AI Agent a Budget.
- Understand the payment model end to end in How AI Agents Make Payments.