All notesBuilding · October 27, 2026

How I taught my AI assistant to fill my Kroger cart

One of the earliest jobs I gave my AI assistant, Ginny, was the grocery run. Not checking out, just the tedious part: finding the exact items I buy and getting them into my Kroger cart for pickup. Here is how I set it up, step by step, including the parts that went wrong.

Tools Used

Start with what I already buy

The whole thing starts with a Google Sheet, not a search box. It has three columns: the item (“milk”), the exact product I prefer (“Kroger Vitamin D Whole Milk Gallon”), and its UPC (“0001111040101”). I started with my most frequent recurring items, and it grows every time I pick something new.

An easy way to get a starting list is to sign in at kroger.com and open My Recent Purchases. It lists what you’ve bought lately and item names can be given to your AI assistant to help get your list started.

A UPC is the barcode number printed on a product. Every product and size has its own, so it works like a fingerprint. That matters because names are vague: “milk” could mean dozens of products. A UPC says exactly which one, so the cart gets the right item and not a lookalike.

The sheet is the source of truth. Ginny also keeps a local copy, which just means the same list saved as a file on the computer she runs on, right next to the script. Looking things up in that file is much faster than asking Google every time. When I choose a new product, it’s saved to the local file and copied into the sheet so the two stay matched.

Can an AI help build this?

Yes, and I didn’t write it by hand. Ginny built the script with me, and the same approach should work with Claude or Claude Code: describe the goal, give it the three-column idea, and let it walk you through the Kroger setup and write the code. You can also paste in your recent purchases (see above), have it search Kroger for each item, and confirm each one. Then you only decide which product you actually want.

Give the assistant permission, and only that

Kroger offers a public developer API. I created a developer app, registered a redirect address, and approved access once through a normal Kroger sign-in.

A redirect address is simply where Kroger sends you back after you approve access. It’s how the approval gets handed from Kroger’s website to the program that asked for it. In my case it points at a small page on my own computer.

The permission is narrow. Ginny can search products and add items to my cart. She can’t see what’s already in the cart, and she can’t check out or pay. Those stay mine.

How a text becomes a full cart

The steps generally look like this:

  1. Takes a messaged list like “milk, bread, shredded cheese.”
  2. Checks each item against my preference sheet.
  3. Adds the confident matches to the cart by UPC.
  4. For anything it doesn’t recognize, searches Kroger and texts me a few options to choose from. I reply with a number, the item goes in the cart, and the choice is saved to the sheet so it never has to ask again.

The rules that came from mistakes

  • Ask when unsure. Early on, the matching was too loose and treated “buttermilk” as “milk,” so extra items landed in my cart. Now a weak match is never added. It is shown to me instead.
  • Barcodes are text. UPCs often start with zeros, and a spreadsheet will quietly delete them if it thinks they’re numbers. Store them as text and keep them at 13 digits.
  • Checkout is mine. Nothing about payment is automated, on purpose.

What it feels like now

I text her a list. She answers with what was added and a short set of choices for anything new. Then I check out myself.

What’s next: connecting it to dinner

This part isn’t fully built out yet. The idea is to link the cart to my recipe sheet, which lists each meal’s ingredients and labels each one “perishable” or “staple.” When I name a meal, Ginny adds the perishables she has preferences for and shows me options for the rest. For staples like olive oil, she asks whether I already have it at home before adding anything. Some things can’t come from Kroger at all. Vodka, for a vodka sauce, has to come from a liquor store in Texas, so she flags it.