Inspiration
Grocery prices in Canada are rising fast, and food inflation is at an all-time high. With the recent rise in import costs and soaring oil prices, the outlook is clear: groceries aren't getting cheaper anytime soon. The common advice to “just buy what’s on sale”? It sounds simple, but in reality it demands constant effort: tracking inventory at home, comparing flyers across dozens of stores, and planning meals around what is available and affordable. The result is a frustrating cycle that many of us have experienced. Fresh produce goes to waste because you forgot it in the fridge. You overbuy because you are not sure what you already have at home. You miss savings because comparing flyers across stores takes too much time. We believe the grocery cycle - buying, storing, cooking, and restocking - should be managed as one connected system rather than a set of disconnected chores.
What it does
Smart Appetite Manager is a multi-agent AI platform designed to manage the grocery cycle as one connected workflow. From tracking pantry inventory to discovering recipes and optimizing grocery shopping, the platform helps users make better decisions at every stage. Powered by teams of specialized agents, custom Python tools for real time data, and a user-focused interface, it transforms grocery management from a set of disconnected chores into a coordinated, intelligent experience. Here are some of the features that are available on our platform.
How we built it
Pantry Management
Our platform uses AI agents to make pantry management faster and easier. You can snap a photo of a grocery receipt and let the pantry management agent automatically extract each item and update your pantry. You can also talk directly to the agent with requests like “add 2 kg of chicken, a dozen eggs, and a 12 kg bag of rice,” and it will automatically categorize and turn that into structured inventory data. As you use ingredients, you can simply tell the agent to adjust the quantities. The agents handle the bookkeeping in the background, so you always know what you have on hand. link
Recipe Discovery & Cooking
Once you know what you have in your fridge, the next challenge is deciding what to cook with it. The RecipeAssistant helps by looking at your current pantry, prioritizing perishables that need to be used soon, and finding meals you can actually make right now. You can also browse freely, search by cuisine or dietary preference, or simply ask an agent for something random. Once you are actively cooking, the RecipeCookingSpecialist is there as your companion, suggesting substitutions when you are missing an ingredient, converting units, and walking you through timing and temperature adjustments so nothing goes wrong.
Smart Shopping
Lastly, and perhaps most importantly, buying those ingredients efficiently is a challenge of its own. For most people, finding the best deal across multiple stores is too time-consuming to do regularly. It means opening flyers from 20+ stores, comparing prices item by item, and figuring out which combination of stores actually saves the most without wasting time on travel.
With Smart Appetite Manager, you can hand your shopping list to the ShopperAgent, and it orchestrates the entire process for you. Behind the scenes, specialized agents scan weekly flyers, check live prices across 13 Canadian grocery chains, and identify the most efficient route based on both savings and distance. The result is a practical shopping plan that helps you save money without spending hours comparing stores manually.
The Event-Driven Workflow: Leveraging Solace Agent Mesh to solve our engineering challenges
Building a platform of this scale with dozens of specialized agents, complex agent tools and handling asynchronous data across domains is not easy. Each agent has its own tools, workflows, and response times. We needed a way to coordinate these communications asynchronously, and reliably without creating a tangled system of dependencies.
Solace Agent Mesh gave us that foundation. It provided the event-driven layer for agent discovery, communication, and data flow, so we could focus on building Smart Appetite Manager instead of spending our time wiring infrastructure. Here is how we used its key features.
Phase 1: Inventory Ingestion (The Fridge)
When a user provides a list of items, the Orchestrator triggers the flow.
- Event:
inventory/update/request - Action: The Inventory Agent consumes the list and updates a SQL-based "Fridge Table" using the
sam_sql_databaseplugin. - Output: An
inventory/state/updatedevent containing the current stock.
Phase 2: Recipe Intelligence (The Chef)
The Chef Agent is a reactive "Brain" subscribed to inventory changes.
- Trigger: As soon as the fridge is updated, the Chef generates 3 Recipe Suggestions.
- Human-in-the-Loop: The system pauses to let the user select a recipe (e.g., Carbonara).
- Gap Analysis: The Chef compares the chosen recipe against the Inventory Table to identify "Missing Ingredients."
Phase 3: Frugal Fulfillment (The Shopper)
The Shopper Agent handles the "last mile" of the journey.
- Delegation: The Chef publishes a
shopping/task/neededevent with the missing items. - Scraping: The Shopper Agent executes the
find_best_deals_batchtool, scraping real-time flyers for Metro, Loblaws, and Walmart in the Ottawa area. - Verification: Every deal is cross-referenced with Google Maps to ensure the store is physically located in Ottawa (filtering out online-only or out-of-town results).
Key Features
Agent-to-Agent (A2A) Communication
We configured the inter_agent_communication protocols to allow agents to bypass the Orchestrator for data-heavy handoffs. This reduces latency and mimics a real-world microservices environment.
Localized Ottawa Intelligence
Unlike generic shopping assistants, our agent is "location-aware." It uses the K1N postal code and canonical location strings to find flyers specifically for downtown Ottawa grocers.
Robust Monitoring with Sentry
We integrated Sentry across our Python tools. This provides us with:
- Distributed Tracing: Tracking a request from the UI to the deepest API call.
- Automatic Breadcrumbs: Seeing exactly which "thought" the agent had before an API timeout..
Challenges We Ran Into
1. Your agent is only as good as the data you feed it!
This was one of the most important lessons we learned. Early in development, we were using frontier models, yet the results were still poor. At first, we assumed the model was the problem. In reality, the issue was upstream: we were passing raw, noisy data into the agent and expecting the model to clean, interpret, and optimize it all at once.
- The Fix: The model performs best when it receives data that is already clean, structured, and relevant, allowing it to focus on higher-value tasks like reasoning, comparison, and optimization.
2. Geographical "Drift"
Early tests suggested deals in Toronto because flyers are often provincial.
- The Fix: We built a Spatial Verification Layer that cross-references store names with Google Maps to verify the physical address contains "Ottawa" before showing it to the user.
3. Product Noise (The "Blood Banana" Problem)
General searches returned non-grocery items like artificial plants and specialty trees.
- The Fix: We implemented a Trusted Grocer Blocklist and keyword filters to reject anything containing "plant," "seed," or "chocolate" when searching for fresh produce.
4. Human-in-the-Loop Orchestration
Syncing the Inventory, Chef, and Shopper agents required complex state management so the Chef wouldn't "skip" asking the user for their recipe choice.
- The Fix: We used Solace’s asynchronous events to create a "Pause and Prompt" state, ensuring the mesh only proceeds after a user provides a "Choice Event."
5. API Latency vs. UX
Scraping real-time flyers is slow.
- The Fix: We used
asyncioto run store lookups in parallel and added LLM-generated Status Updates to keep the user engaged while background events were processed.
What We Learned
1. The Superiority of Event-Driven Over Sequential Logic
Moving away from a linear "if-this-then-that" script to an Event-Driven Architecture (EDA) was a major turning point. We learned that by using the Solace Agent Mesh, we could decouple our agents. This meant the Chef Agent didn't need to know how the Inventory Agent worked; it just needed to react to the state change. This asynchronous approach made the system significantly more resilient and easier to scale.
2. Localized Grounding is a "Hard" Problem
We learned that LLMs are excellent at reasoning but struggle with the "last mile" of local data. Finding a deal on eggs is easy; finding a deal on eggs at the Metro on Rideau St specifically requires strict canonical location strings and spatial verification. We learned that for an AI agent to be useful in the real world, it must be grounded in precise, verified geographical data.
3. The Necessity of "Human-in-the-Loop"
Our early prototypes tried to automate everything from the fridge to checkout. We quickly learned that in complex decision-making (like choosing a meal), the user wants a seat at the table. Designing the mesh to "pause and prompt" for a recipe choice was a lesson in building AI that acts as a copilot, not a black box that makes decisions without consent.
4. Observability is Not Optional
In a multi-agent system, when something goes wrong, it’s hard to tell if the LLM hallucinated, the API timed out, or the event was routed incorrectly. Integrating Sentry and using the Solace Visualizer taught us that observability is the most critical component of agentic development. Being able to trace a single "Carbonara" request through four different agents was the only way we could effectively debug the mesh.
5. System Design > Prompt Engineering
While prompts are important, the most significant improvements to our project came from architectural changes (like adding a caching layer for addresses or creating specialized sub-agents) rather than just tweaking the wording of the instructions. As CS students, this reinforced that building reliable AI products is a software engineering challenge as much as it is a linguistic one.
What's next for Smart Appetite Manager
Future improvements include:
- Integrating native camera input where platform support allows
- Adding nutrition and expiration analysis agents
- Supporting multiple data sources such as barcode scans and APIs
- Expanding the agent mesh to include meal planning and health insights
Smart Appetite Manager is designed as a scalable foundation for intelligent food management systems.
Built With
- agent-based-systems
- ai/llm-text-processing
- docker
- event-driven-architecture
- postgresql
- python
- rest-apis
- solace-agent-mesh
- yaml
Log in or sign up for Devpost to join the conversation.