← Back to articles

NewsBy: vibe codingagentstelegram bot

AI agents built a bot in 4 days that does your grocery shopping

A self-described vibe coder used AI agents to build a Telegram bot that tracks the fridge, plans meals to a budget and calorie goal, and fills a grocery cart on its own.

AI news faster than on the site — on Telegram KARMAZIN MEDIA

AI agents built a bot in 4 days that does your grocery shopping
Photo: KARMAZIN MEDIA
Media: KARMAZIN MEDIA

A developer who openly calls himself a vibe coder spent four days with AI agents building a family Telegram bot that does the grocery run. Tell it "3 days, two people, 5,000 rubles, about 2,000 kcal a day" and it plans a menu with recipes, using up what is already in the fridge first, then fills a cart in Yandex Lavka, a Russian grocery delivery app. A human still pays, with one tap in the app.

The fridge is tracked in plain text: type "2 kg potatoes, 10 eggs, milk until Nov 10" and the model converts it to grams and pieces and guesses expiry dates. Perishables go into the menu first, and salt, sugar and spices are never bought. There is also an octopus chef called Osma: type "borscht" and it picks a recipe and puts everything for it in the cart.

The agents wrote the code, the author set tasks and said yes or no. The result: 143 commits, about 4,400 lines of Python, a Mini App in HTML and JS, and 498 tests, with almost as much test code as working code. The routine never changed: a short spec where the agent asks questions one at a time, a plan of small tasks, a test before the code, then a review by a different agent on a different model. The very first review found 8 serious problems.

Memory between agents lives in a single STATE.md file: what is done, what is next and a "Traps" section. A cheap model handled routine work, an expensive one designed and reviewed, and every session started by reading that file.

The core rule: the model proposes, the code checks. The AI invents dishes and picks products from search results, while calories (within 15% of the target), budget, pack counts and stock are handled by ordinary code. Without that, things got silly: a 1,000 kcal menu of six products with the same lunch five days in a row, or three packs of onions for two people.

The worst bugs only showed up on real orders. Every test ran on mocks, but Lavka's warehouse depends on the delivery address: the agent grabbed the wrong address and half the cart turned out sold out, even though the API cheerfully said in stock. Now the bot checks the price of a reference item against the app and rereads the cart after every addition.

By design the bot never spends money: checkout and payment tools do not exist even in the code. Lavka has no public API, so the bot uses the same web API as the site with the owner's cookies, which is why the code stays private. The whole process is written up, though, so you can build your own in a couple of evenings. Next on the list are more grocery chains.

Verdict: the best vibe coding tutorial of the week, and it is about a chicken in the fridge.

original