Can an AI agent buy from your store?
More people now ask an AI to shop for them. If a popup, a button or a banner that disagrees with the cart stops it, you lose the sale and never see an error. Cartwalk sends a Kane CLI shopper through your store to find out, lets a coding agent fix what it finds, and keeps a log nobody can quietly edit.
Scroll to watch a real run · Esc skips the intro
Walk, judge, fix, prove
An AI proposes, plain code decides, and every step is written to a log that cannot be edited without it showing.
Kane shops your store
In real Chrome, in plain English, with no selectors: read the shipping banner, pick the most expensive product, add one, open the cart, click Checkout. It never pays and types nothing into checkout.
Plain code decides
Kane reports what it saw. Arithmetic and comparisons give each of four checks a pass or a fail. No model's opinion is involved, and a missing value is "unknown", never a quiet pass.
A coding agent repairs it
Failed checks and Kane's evidence go to Claude Code, which can only read and edit your store's folder. Its diff goes in the log.
Kane walks again
A fix only counts if the next walk passes. Every walk, verdict and diff is hash-chained: edit or delete one in the middle and verification names the entry.
You are a shopper who wants to buy one item. If the page shows a free-shipping promise, read it and remember it as shipping_promise, and if it shows none, remember shipping_promise as none and carry on. Choose the most expensive product, select an option if one is required, and add exactly one to the cart. Open the cart. Remember the item price shown in the cart as item_price, the subtotal as cart_subtotal and the shipping line as shipping_line. Click Checkout. Look at the page it leads to and remember checkout_stage as payment if it asks for card or payment details, contact if it asks for contact, address or shipping details first, or other if it is neither. Do not type into any field on the checkout pages and never pay.
A real run, round by round
A small shop with two ordinary mistakes planted in it: the Desk Lamp cannot be added to the cart, and the banner promises free shipping over $50 while the code only waives it over $75. Below, the replay of what the log recorded.
Animated replay of the recorded run. Round 1 fails because the Desk Lamp cannot be added to the cart. Round 2 fails because shipping is charged on a cart over the free-shipping threshold. Round 3 passes. The same results are listed as text below.
Checks
The replay is generated from docs/demo-run/loop.jsonl: the verdicts, the checks and the agent's diffs are the logged ones. The dollar amounts are from the demo shop.
Round 1 Fail
| Result | Check | What was found |
|---|---|---|
| Fail | reached_checkout | The store page lists the Desk Lamp, but the cart service does not recognize its lamp item code. Because the add request fails, the page never restores the Add to cart button or updates the cart. |
| Pass | step_budget | 4 steps (budget 20) |
| Unknown | price_math | price or subtotal was not reported |
| Unknown | shipping_promise | subtotal or shipping line was not reported |
What Kane reported
The store page lists the Desk Lamp, but the cart service does not recognize its lamp item code. Because the add request fails, the page never restores the Add to cart button or updates the cart.
Fix the cart service's product/SKU mapping for the Desk Lamp and restore the button to an actionable state with a clear error when an add request fails.
evidence: http_error_response: POST http://localhost:4180/api/cart -> 500 body: {"error":"unknown sku lamp"}
evidence: console_error: Failed to load resource: the server responded with a status of 500 (Internal Server Error)
The coding agent's fix
I changed the `/api/cart` handler in `server.js` to check `lookup(data.slug)` instead of `PRODUCTS[data.slug]`. `lookup` already knows the `lamp` item code, so adding the Desk Lamp no longer returns the 500 "unknown sku lamp" error. I also made the page's add-to-cart failure handler restore the "Add to cart" button and show a clear error message, so the button no longer stays stuck on "Adding...". I haven't run the server or re-run the shopper's checks. I left the free-shipping mismatch alone: the banner says $50 but the code only gives free shipping over $75. It wasn't one of the failed checks.
file: server.js @@ -91,7 +91,10 @@ function productPage(slug, count) { body: JSON.stringify({slug:${JSON.stringify(slug)}, color:color})}); if (!r.ok) throw new Error("add failed"); location.href = "/cart"; - } catch (e) { /* swallowed: the button stays in "Adding..." forever */ } + } catch (e) { + b.disabled = false; b.textContent = "Add to cart"; + document.getElementById("status").textContent = "Sorry, we couldn't add this to your cart. Please try again."; + } }; </script>`, count); } @@ -149,7 +152,7 @@ const server = http.createServer((req, res) => { req.on("end", () => { let data = {}; try { data = JSON.parse(body); } catch {} - if (!PRODUCTS[data.slug]) { + if (!lookup(data.slug)) { res.writeHead(500, { "content-type": "application/json" }); return res.end(JSON.stringify({ error: "unknown sku " + data.slug })); }
Round 2 Fail
| Result | Check | What was found |
|---|---|---|
| Pass | reached_checkout | the shopper reached the payment page |
| Pass | step_budget | 5 steps (budget 20) |
| Pass | price_math | 1 x $55.00 = $55.00 |
| Fail | shipping_promise | banner promises free shipping over $50.00, but a $55.00 cart is charged $4.99 shipping |
What Kane reported
You asked to add exactly one of the most expensive products to the cart, open the cart, and proceed to checkout without entering any checkout information or paying.
Added one Desk Lamp to the cart and opened the cart; its listed price and subtotal were both $55.00.
The cart showed a $4.99 shipping charge. The store banner stated, “Free shipping on orders over $50.”
Opened checkout, which is at the payment-details stage. No checkout fields were completed and no payment was made.
The coding agent's fix
I changed the free-shipping threshold in `server.js` from a hard-coded 7500 cents ($75) to `FREE_SHIPPING_BANNER_DOLLARS * 100` (5000 cents, or $50). The banner and the shipping check now use the same value, so a $55.00 cart ships free. I haven't run the server or the shopper's checks to confirm.
file: server.js @@ -18,7 +18,7 @@ const PRODUCTS = { const LAMP = { name: "Desk Lamp", price: 5500 }; const FREE_SHIPPING_BANNER_DOLLARS = 50; -const FREE_SHIPPING_OVER_CENTS = 7500; +const FREE_SHIPPING_OVER_CENTS = FREE_SHIPPING_BANNER_DOLLARS * 100; const SHIPPING_CENTS = 499; const carts = new Map(); // session id -> [{ slug, qty }]
Round 3 Pass
| Result | Check | What was found |
|---|---|---|
| Pass | reached_checkout | the shopper reached the payment page |
| Pass | step_budget | 5 steps (budget 20) |
| Pass | price_math | 1 x $55.00 = $55.00 |
| Pass | shipping_promise | subtotal $55.00 is over $50.00 and shipping is free |
The log
Every walk, verdict and fix is an entry that carries the hash of the one before it. Editing or deleting anything in the middle breaks the chain. 12 entries; the command-line check says: intact.
head 88a1343493e658e5958344a1df523d25d5b09f854c49a0f3b814df396c125119
Two stores I did not build
The same single instruction, no changes per store. One pass, one real catch.
Banner, price and shipping read correctly
Kane read a $75.00 free-shipping promise and a $300.00 item, the cart agreed, and checkout asked for contact details, so Cartwalk says payment was not probed.
What the code decides
These four checks live in lib/rules.js, with unit tests. A value Kane did not report is "unknown", and unknown never counts as a pass.
| Check | The question | How it is decided |
|---|---|---|
| reached_checkout | Did the shopper get from the product page to checkout? | Passes when Kane finishes and reports the payment page, or a contact-details step first (Cartwalk fills in no personal details, so it says payment was not probed). Fails, with Kane's evidence, only when Kane confirms a product bug such as a failed add to cart, or when Checkout leads somewhere else. If Kane cannot follow the instruction (for example the store has no banner to read) the result is unknown, never a store failure. |
| step_budget | Did it take a sane number of steps? | Counts the clicks, typing and page loads Kane performed. Fails over the budget (20 by default, --budget to change). |
| price_math | Does the cart add up? | One unit was added, so the item price must equal the subtotal. Unknown if either was not reported. |
| shipping_promise | Does the store keep its free-shipping promise? | Reads the threshold from the banner ("over $50"). If the subtotal is at or over it, shipping must be free. Not triggered below it; unknown if no threshold can be read. |
Three ways to try it
From a minute in the browser to a real walk of your own store.
Look
Scroll up to the log and press Change one result, then verify. The page re-computes the hash chain itself and names the entry you changed.
Check the claims
No Kane, no network. It verifies the recorded log, tampers with a copy and builds a report.
git clone https://github.com/ibnweb3/cartwalk
cd cartwalk
npm run offlineWatch it catch a bug
Starts the broken shop and sends a real shopper. About 25 to 50 Kane credits.
npm run tasteWhat it does not do
- It has been run on two third-party public demos, once each: Saleor passed, and on Medusa's demo Kane confirmed a 500 on add to cart (that may be the demo's backend, not Medusa's code). Two walks are not a benchmark.
- Many real stores ask for contact details before payment. Cartwalk types nothing into checkout, so it says checkout was reached and that payment was not probed.
- It tests one flow: the most expensive product, one unit, to checkout. No coupons, logins or real payment.
- The coding agent has no shell, so it cannot run your store. Kane's next walk is the only proof a fix worked.
- Kane's speed varies: walks took 2.5 to 4.5 minutes, and one test run ended inconclusive when Kane's service was slow. The recorded logs are the fallback.
- The log catches edits and deletions in the middle. It cannot see entries cut off the end; publish the head hash elsewhere to cover that.