A Meal Planner & Grocery Shopping Agent in Typescript with HazelJS A developer built a meal planning and grocery shopping agent using HazelJS, a TypeScript framework for AI-native applications. The agent uses multi-agent orchestration, retrieval-augmented generation (RAG) for recipe search, and supervisor routing to handle dietary intake, meal planning, and shopping list generation. The project demonstrates production-ready patterns including retries, circuit breakers, and observability via the HazelJS Inspector. In this post, we'll build a practical AI-powered meal planning agent using HazelJS. This agent helps users create personalized meal plans, discover recipes, and generate shopping lists—all while demonstrating HazelJS's powerful agent orchestration, RAG capabilities, and production-ready patterns. What We're Building Our meal planning agent handles the complete meal planning workflow: - Dietary Intake : Extracts dietary restrictions, budget, cooking time, and preferences - Recipe Search : Finds recipes using RAG over a recipe database - Meal Planning : Creates day-by-day meal plans with balanced nutrition - Shopping Lists : Generates organized grocery lists with cost estimates - Nutrition Coaching : Orchestrates the entire workflow via supervisor routing Why HazelJS? HazelJS provides a production-ready framework for building AI-native applications. For this project, we leverage: - Multi-agent orchestration with @Agent , @Tool , and @Delegate decorators - RAG Retrieval-Augmented Generation for semantic recipe search - Supervisor routing to delegate tasks to specialized agents - Production resilience with retries, circuit breakers, and rate limiting - Built-in observability via the HazelJS Inspector - Guardrails for safer AI recommendations Project Architecture Agent Implementation Dietary Intake Agent The DietaryIntakeAgent extracts structured information from natural language: Recipe Search Agent with RAG The RecipeSearchAgent uses RAG to find recipes semantically: Nutrition Coach with Supervisor The NutritionCoachAgent orchestrates the workflow using delegation: RAG Implementation We use MemoryVectorStore and RAGPipeline for semantic recipe search: Production Configuration The AgentModule is configured with production-ready features: Running the Project Testing the API HazelJS Inspector Access the built-in inspector at http://localhost:3000/ hazel for: - Real-time agent execution traces - Tool call logs - Performance metrics - Circuit breaker status - Rate limiter status Key Takeaways - Multi-agent architecture : Each agent has a focused responsibility, making the system maintainable and testable - RAG for knowledge retrieval : Semantic search over recipe database provides accurate, context-aware results - Supervisor routing : The orchestrator agent delegates tasks to specialists, enabling complex workflows - Production resilience : Built-in retries, circuit breakers, and rate limiting ensure reliability - Observability : The inspector provides deep insights into agent behavior and performance - Guardrails : PII redaction and content safety protect users from inappropriate recommendations What's Next? For a production deployment, you would: - Replace the local LLM provider with OpenAI, Anthropic, or Google Generative AI - Add persistent storage with @hazeljs/memory for user preferences and meal history - Implement @hazeljs/flow for advanced workflow orchestration - Add @hazeljs/pubsub for async meal planning notifications - Connect to real recipe APIs for dynamic content Conclusion This meal planning agent demonstrates how HazelJS https://hazeljs.ai/ enables building sophisticated AI applications with production-ready patterns. The combination of multi-agent orchestration, RAG, and resilience features makes it easy to create reliable, observable, and scalable AI-native applications. Complete project is available here: Meal Planning Agent https://github.com/nisafatimaa/meal-planning-agent See you next time