There are people in the world who love poring over recipes, taking in the stories behind how they came to be. They enjoy shopping for ingredients and cooking meals for the people they love.
I have many of these people in my life, which is how I know I’m not one of them. I live in a meal-prepping dietary requirements household with the same recipes on repeat. Even so, my partner and I would spend a decent amount of time every week trying to decide what we were going to eat. These back-and-forths were so tedious. How was it that we ate the same 20 or so recipes on repeat in the name of simplicity, and still ended up in these long back-and-forths about whether we wanted to do the salmon patties and if we still had garlic in the pantry? Why couldn’t I automate this process and use the saved time and mental space to have fun and touch grass?
The Goal
Reducing cognitive load and running this project leanly (within reason) were my two guiding principles. If it didn’t save us time and brain space or cost too much, it wasn’t worth doing.
1. Designing the agent UX
Nothing here is too different from how I’d design a website or app flow. You need to know your users, your scope and your limits. I wanted this bot’s process to be influenced by how my partner and I do this process now: messaging rather than a web app, “pushing” rather than pulling.
This helped me ditch ideas that didn’t serve the goal. For this reason, the agent had to be more of a pull experience – it sending messages to remind us, or generating full meal plans without knowing how many days of food we’d need was a no-go.
Core flow and happy path
- Bot gives recipes and shopping list for the week, using seasonal produce, recipe history and dietary requirements to guide its suggestions. Bot updates pantry list going off suggested recipes.
Secondary flows
- Ingests new recipes supplied by user
- Answer user questions about in-season produce, whether we have an item in the pantry/fridge already
- User tells the bot an item is in or out of stock, and it updates the pantry list accordingly
Error states
- Server is down
I didn’t go too into the weeds with the error states, as there were only so many ways this agent could go wrong.
2. Figuring out the tech and context stacks
In order to work, this agent needed:
- Somewhere to live
- Instructions on what to do
- Context to reference
- A channel for us to communicate with each other
- LLM to power the chat and reasoning
I broke this down into tech and context stacks.
Context stack
At a high level:
- Recipes we regularly cook
- Knowledge of what ingredients we already had in the house, which of those ingredients were in season and our dietary preferences
- Instructions on what to do, and not do
This became:
- A database containing information on the recipes we cook, as well as what ingredients we have in our fridge and pantry, and whether any of those ingredients are in season in Melbourne.
- Python scripts and other files with prompts and tools to do the work
Tech stack:
- VPS server to host the agent
- Telegram messaging app for communications
- Gemini 3.5 flash as the LLM for the chat.
This involved a few compromises:
- Keeping this hosted on my local machine would have been cheaper, but I didn’t want to keep my laptop on 24/7.
- Initially I used Sonnet 4.5 as the chat LLM because it has a really nice conversational feel, but after a few rounds of testing I realised it was more powerful and expensive than I needed and Gemini Flash would do the job just as well. Interestingly, Claude Code tried to dissuade me from rebuilding the agent to use Gemini by saying it wouldn’t work as well. I knew it was wrong – I know a walled garden when I see one!
- I wanted to make this in WhatsApp or Signal, but WhatsApp charges you and Signal won’t let you (fair). Telegram has a nice, easy-to-use bot to help you set up your own bot.
Note: If this was a production agent, I’d look at logs and/or traces with Langfuse and set things up accordingly. Since this agent only operated in a chat I have access to, I could see when things went wrong and correct them myself.
3. “Building” aka burning tokens and checking the results
Once I’d figured out the UX and the context and tech stacks, I jammed back and forth with Claude to generate a plan and spec sheet for Claude code to build. The better a brief you can give it, the better chance you have of a decent output.
I did this by typing it out using my hands and brain, and asking Claude to help me fill in the blanks with things Claude Code would need to build.
I fed that into Claude Code, and off we went. This is called spec-based building, and it’s much more efficient than typing “hey claude make me a bot” “no not like that” for hours.
I won’t deep dive into the whole process, but I did want to talk more about the database (stay with me!)
Instructions
In order to work, the agent needed to know:
- How to communicate
- How to act
- What and how to remember
These instructions were mostly in the system instructions and tool descriptions. Here’s an example:
You are a household food assistant for Sophie and Partner Name.
You live in a Telegram group chat with both of them.
Your job is to manage their food admin: propose weekly meals, track what's in the pantry, know what produce is in season, generate shopping lists, and learn their food preferences over time. They should never have to initiate the thinking — just approve or tweak your suggestions.
You can:
- Suggest meal plans based on preferences and edit them by request
- Update inventory based on user inputs
Rules:
- Be concise and friendly. Write like you're texting. Don't use emoji. Use British English.
- Address the sender by the name in the "<NAME> says:" prefix of their message — NOT by the names in this system prompt. If the sender's name doesn't match any known person, still use the name they sent from.
- Measurements are metric and Australian (grams, ml, 250ml cups).
- Formatting: Telegram parses HTML. Use <b>bold</b> for headings. Use <a href="URL">label</a> for links.
4. Testing and iteration
I ran automated tests on the agent using Claude Code. Of all the engineers I’m not, I’m extremely not a backend engineer, so I just had to trust it was ok. I did spend time on forums and Google learning how to make sure my bot was only accessible from the group chat, as Claude missed this one.
From there, it was a loop of test-fix-test-fix. The agent lied, the agent yapped, the agent didn’t know where to look. I expected this part.
I also got feedback from my partner, the other user. A lot of it was around style and communication.
5. Final thoughts
We’re still using it three months on. It’s costing us around $8 a month between API use and hosting, which is a touch more than what I’m paying for coffee at the moment. Well worth it.
Realistically though, right now this isn’t going to be something everyone can or would want to set up. Some people like doing this manually. Most people don’t want to spend hours of their weekend coding something like this. Most people don’t want to do a full inventory of the pantry. This last issue is the biggest hurdle, particularly for the likes of Coles and Woolworths who I’m sure are looking into an AI solution like this for their customers.
Leave a Reply