Skip to content

feat: add Recipe AI Agent template#91

Open
krishmm02 wants to merge 3 commits intoLamatic:mainfrom
krishmm02:recipe-ai-agent
Open

feat: add Recipe AI Agent template#91
krishmm02 wants to merge 3 commits intoLamatic:mainfrom
krishmm02:recipe-ai-agent

Conversation

@krishmm02
Copy link

@krishmm02 krishmm02 commented Mar 22, 2026

  • New "Recipe AI Agent" template added (conversational flow for recipes, meal plans, grocery lists, cooking Q&A)
  • Files added:
    • recipe-ai-agent/README.md — documentation, example I/O, end-to-end control flow, node descriptions, setup/testing/deployment notes
    • recipe-ai-agent/config.json — workflow graph: API trigger → Recipe Supervisor agent (maxIterations: 5) → Intent Detector → conditional routing → four specialized LLM branches → agentLoopEnd → InstructorLLM response formatter → API response
    • recipe-ai-agent/inputs.json — GEMINI_API_KEY placeholder
    • recipe-ai-agent/meta.json — template metadata, tags, and sample testInput
  • Workflow highlights:
    • Intent Detector classifies user_message into one of: RECIPE, MENU, GROCERY, GENERAL
    • Conditional routing to four branches that produce structured outputs (recipe, menu, grocery list, or short cooking Q&A)
    • InstructorLLM formats the structured output into a plain-text formatted_response returned by the GraphQL response node
    • Explicit node types used: triggerNode, agentNode, LLMNode, conditionNode, InstructorLLMNode, agentLoopEndNode, graphqlResponseNode
  • Setup: import config.json, set GEMINI_API_KEY in inputs.json, run test input from meta.json

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2fcd6e55-cb9d-46c0-b94d-5cf2b9b085d6

📥 Commits

Reviewing files that changed from the base of the PR and between 9a52490 and 5a72850.

📒 Files selected for processing (2)
  • recipe-ai-agent/README.md
  • recipe-ai-agent/config.json
✅ Files skipped from review due to trivial changes (1)
  • recipe-ai-agent/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • recipe-ai-agent/config.json

📝 Walkthrough

Walkthrough

Adds a new Recipe AI Agent template: documentation, workflow config, sample inputs, and manifest. The workflow defines an API-triggered supervisor agent that intent-classifies food-related user messages and routes them to specialized LLM branches (recipe, menu, grocery, or cooking Q&A), formats the response, and returns an API response.

Changes

Cohort / File(s) Summary
Documentation
recipe-ai-agent/README.md
New README describing the Recipe AI Agent conversational flow, node architecture, node types, example I/O pairs, setup/testing, and deployment notes.
Workflow Configuration
recipe-ai-agent/config.json
New JSON workflow implementing an API-triggered Recipe Supervisor agent loop with an intent detector (LLMNode), a condition router to four dynamic LLM branches (LLMNode_401..LLMNode_404) producing structured outputs, an agentLoopEndNode, and an InstructorLLMNode response formatter that maps to a graphqlResponseNode.
Setup & Metadata
recipe-ai-agent/inputs.json, recipe-ai-agent/meta.json
inputs.json adds GEMINI_API_KEY placeholder. meta.json provides template metadata, tags, sample testInput, and author contact.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Client
participant API as "API Trigger\n(triggerNode)"
participant Supervisor as "Recipe Supervisor\n(agentNode)"
participant Intent as "Intent Detector\n(LLMNode)"
participant Router as "Route by Intent\n(conditionNode)"
participant Recipe as "Recipe Generator\n(LLMNode_401)"
participant Menu as "Menu Planner\n(LLMNode_402)"
participant Grocery as "Grocery Builder\n(LLMNode_403)"
participant QA as "Cooking Q&A\n(LLMNode_404)"
participant Formatter as "Response Formatter\n(InstructorLLMNode)"
participant Response as "API Response\n(graphqlResponseNode)"

Client->>API: POST user_message
API->>Supervisor: start agent loop (user_message)
Supervisor->>Intent: classify intent
Intent-->>Supervisor: intent label (RECIPE/MENU/GROCERY/GENERAL)
Supervisor->>Router: route by intent
Router-->>Recipe: route to Recipe (if RECIPE)
Router-->>Menu: route to Menu (if MENU)
Router-->>Grocery: route to Grocery (if GROCERY)
Router-->>QA: route to Cooking Q&A (if GENERAL)
Recipe-->>Supervisor: structured recipe output
Menu-->>Supervisor: structured menu output
Grocery-->>Supervisor: structured grocery output
QA-->>Supervisor: general answer
Supervisor->>Formatter: format selected sub-agent output
Formatter->>Response: produce finalResponse
Response-->>Client: return finalResponse

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add Recipe AI Agent template' directly and clearly describes the main change: introducing a new Recipe AI Agent template with all supporting configuration files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
recipe-ai-agent/config.json (1)

197-208: Teach Menu Planner to honor arbitrary day counts.

The README example at recipe-ai-agent/README.md Lines 121-135 advertises a 3-day plan, but this prompt only spells out 1-day and 7-day behavior. Add an explicit N-day rule so requests like “3 days” or “5 days” don't collapse to the nearest hard-coded case.

🗓️ Prompt tweak
- - If user asks for a week, return 7 days. If a day, return 1.
+ - If the user asks for N days, return exactly N days.
+ - If the user asks for a week, return 7 days. If the user asks for a day, return 1 day.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c9819868-899a-4721-9bb7-761d80d21586

📥 Commits

Reviewing files that changed from the base of the PR and between e1ceb47 and f52533d.

📒 Files selected for processing (4)
  • recipe-ai-agent/README.md
  • recipe-ai-agent/config.json
  • recipe-ai-agent/inputs.json
  • recipe-ai-agent/meta.json

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (2)
recipe-ai-agent/README.md (1)

24-24: ⚠️ Potential issue | 🟡 Minor

Add language identifiers to these fenced code blocks.

Lines 24, 114, 142, and 164 use unlabeled fences, which keeps triggering MD040 (fenced-code-language).

🧹 Minimal fix
-```
+```text

Apply the same change to each of the four unlabeled output/diagram fences.

Also applies to: 114-114, 142-142, 164-164

recipe-ai-agent/config.json (1)

133-149: ⚠️ Potential issue | 🟠 Major

Intent routing is brittle with exact raw-string comparisons.

This route depends on exact equality of free-form LLM text. Any extra whitespace/newline/case drift from the Intent Detector will miss recipe/menu/grocery and fall into Else.

🔧 Recommended hardening
- "nodeId": "LLMNode",
+ "nodeId": "InstructorLLMNode",
+ "schema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"intent\": {\n      \"type\": \"string\",\n      \"required\": true,\n      \"enum\": [\"RECIPE\", \"MENU\", \"GROCERY\", \"GENERAL\"]\n    }\n  }\n}",

- "{{LLMNode_201.output.generatedResponse}}"
+ "{{LLMNode_201.output.intent}}"

This makes routing depend on a typed field instead of raw generation text.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9e4240dd-0d79-4608-a8ec-2771c9281fa2

📥 Commits

Reviewing files that changed from the base of the PR and between f52533d and 9a52490.

📒 Files selected for processing (3)
  • recipe-ai-agent/README.md
  • recipe-ai-agent/config.json
  • recipe-ai-agent/inputs.json
✅ Files skipped from review due to trivial changes (1)
  • recipe-ai-agent/inputs.json

Copy link
Author

@krishmm02 krishmm02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agentkit-challenge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants