The pitch for a meal-planning agent is simple: 30 minutes of weekly menu work, gone. The trick is that meal planning is bound by hard physical constraints (allergens, what is in the pantry) and soft preferences (cuisine variety, prep time, household taste). An agent that ignores either set produces plans nobody actually cooks.

This walkthrough covers the setup most households end up with after a month of iteration. The agent reads pantry, rules, budget, and calendar. It outputs a 5 to 7 day menu and a grocery list. After the menu has stabilised, it hands the list to a grocery reorder agent. You stop thinking about Tuesday dinner.

What this agent does

The agent runs once a week (Sunday morning IST is a common slot). It reads your pantry inventory, your hard and soft dietary rules, your weekly food budget, and the week's calendar (eating-out nights, hosting, leftovers tolerance). From those it composes a 5 to 7 day menu and the grocery list needed to cook it.

The output is two artefacts: a menu document (Sunday → Saturday) and a structured grocery list. The menu lands in a shared household doc; the grocery list lands wherever the grocery agent reads it.

For the upstream pantry pattern, see AI agent for grocery reorder. For the broader pattern of read-then-write agents, see what an AI agent can actually do.

Inputs the agent reads

Limiting the recipe library is the single biggest quality lever. An agent picking from "anything on the internet" produces lots of recipes nobody wants to cook on a Tuesday.

Hard vs soft constraints

Constraints come in two distinct types and the agent must treat them differently.

The hard list is small (5 to 10 items typically) and is reviewed monthly. The soft list is longer and changes seasonally. For more on hard guardrails generally, see AI agent safety and guardrails.

Cuisine and recipe rotation

Variety is the second-biggest reason these setups fail. Without rotation rules, the agent's pick collapses to whatever is highest-ranked, which means three pasta nights in a row and a household revolt by Friday.

Rules that work:

Tag meals you do not want again. The household feedback channel feeds back into the recipe library via weekly rating.

Output: menu + grocery list

Two artefacts, both structured.

The menu is a 5 to 7 row table: day, meal, recipe link, prep time, who cooks. The agent emits this once a week into a shared doc the household reads.

The grocery list is the union of ingredients required by the menu's meals, minus the pantry inventory. It is structured so a grocery agent can consume it without re-parsing free text.

Example structured list:

The structure pays off when you wire the grocery agent in.

Handoff to a grocery agent

The meal-plan agent should not order groceries. The grocery agent should not pick recipes. They share the pantry inventory document and a shared grocery list document, and that is the entire handshake.

The flow:

  1. Sunday 09:00 IST: meal-plan agent runs. Outputs menu + grocery list.
  2. Sunday 10:00 IST: human reviews menu, accepts or swaps two meals.
  3. Sunday 11:00 IST: grocery agent reads the structured list, applies its caps and substitution policy, drafts the basket.
  4. Sunday 12:00 IST: human approves basket.
  5. Monday morning: delivery arrives.

For more on multi-agent handoffs, see multi-agent systems explained and AI agent orchestration explained.

Common mistakes

Frequently asked questions

Can an AI agent plan my weekly meals?

Yes. The agent reads your pantry inventory, your dietary rules, your weekly budget, and the household's typical week (eating in vs out, leftovers tolerance), then builds a 5 to 7 day menu. It outputs the menu plus a grocery list. The first month it lands as a draft for your approval; once the menu has stabilised it can hand the list directly to a grocery reorder agent.

What dietary rules should I configure?

Treat allergens and medical restrictions as hard constraints (no peanuts, no shellfish, no gluten). Treat preferences as soft constraints (vegetarian Mondays, low-carb dinners, no red meat twice a week). The agent rejects any meal that violates a hard constraint and ranks down meals that violate soft constraints. Soft and hard must be encoded separately, with the hard list reviewed monthly.

How does the agent know what is in my pantry?

Two methods. The lightest is a checklist you maintain in a Notion or Sheet doc and update weekly. The heaviest is image-based intake (snap a photo of your pantry on Sunday) where the agent reads the items it can see and asks you to confirm. Most households start with the checklist for two months before moving to images.

Will the meal plan get repetitive?

Only if you let the agent reuse the same recipes. Configure a no-repeat window (no recipe twice in 14 days, max one repeated cuisine per week) and a cuisine rotation (Italian one night, Indian another, simple grain-bowl mid-week). Repeats are a feedback signal too; review the weekly plan and tag meals you do not want again.

How does this connect to a grocery reorder agent?

The meal-plan agent emits a structured grocery list. The grocery agent reads that list, deduplicates against pantry inventory, applies its own caps and substitution policy, and creates the basket. The two agents share state through the pantry inventory document so neither double-buys nor under-buys.

Three takeaways before you close this tab

Sources