Gym AI Coach Agent for personalized fitness planning#119
Gym AI Coach Agent for personalized fitness planning#119harishdtu wants to merge 9 commits intoLamatic:mainfrom
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughNew Gym AI Coach Agent template added: documentation, agent-level config, and a three-node chat flow (trigger → LLM → response) plus inputs and metadata to generate Indian, budget-aware beginner fitness plans via a Gemini model integration. Changes
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@templates/gym-ai-coach-agent/config.json`:
- Line 7: Update the step string that currently reads "Provide user input
(weight, goal, diet)" to include budget so it becomes "Provide user input
(weight, goal, diet, budget)"; locate and edit the corresponding entry in
templates/gym-ai-coach-agent/config.json (the step list string literal) so the
setup steps consistently include budget across templates and docs.
In `@templates/gym-ai-coach-agent/flows/gym-coach/config.json`:
- Around line 117-118: The combined constraint "If user is vegetarian → avoid
eggs/meat If budget is low → suggest cheap foods only" should be split into two
separate bullet constraints for clarity: create one bullet reading "If user is
vegetarian → avoid eggs/meat" and another reading "If budget is low → suggest
cheap foods only" in the same constraints list in config.json so the model
treats them as independent rules.
- Around line 128-130: The config currently hardcodes workspace-specific
credential values (credentialId: 32c708a5-14de-41ff-91fe-04edcd840f2a and
credential_name: gemini) which breaks portability; update the template to remove
those concrete values by replacing credentialId and credential_name with empty
strings, null, or a configurable placeholder (e.g., ${CREDENTIAL_ID} /
${CREDENTIAL_NAME}) and keep provider_name (gemini) if needed or make it
configurable as well so users must bind their own credentials at setup; ensure
any documentation or README notes that credentialId/credential_name must be
populated during deployment.
- Around line 1-170: The file currently contains YAML (starts with triggerNode:
and definitions like triggerNode_1, LLMNode_567, responseNode_triggerNode_1) and
therefore fails JSON parsing; fix by re-exporting the flow as JSON directly from
Lamatic Studio (do not hand-edit the content), replace the existing config.json
with the fresh Studio export, confirm the exported file is valid JSON and that
nodes triggerNode_1, LLMNode_567 and responseNode_triggerNode_1 remain intact,
then commit the exported JSON as-is.
In `@templates/gym-ai-coach-agent/flows/gym-coach/inputs.json`:
- Around line 2-5: The "input" string in
templates/gym-ai-coach-agent/flows/gym-coach/inputs.json contains raw newline
characters which break JSON validation; update the "input" value to a
single-line JSON string by replacing each literal newline with the escaped
sequence \n (e.g., "Weight: 61kg,\nGoal: Muscle Gain,\nBudget: Low,\nDiet:
Vegetarian") so the "input" key contains a valid JSON string.
In `@templates/gym-ai-coach-agent/flows/gym-coach/meta.json`:
- Around line 2-5: The "input" string in meta.json contains raw line breaks
which makes the JSON invalid; update the "input" value (the "input" property) to
either a single-line string or replace each literal newline with the escaped
sequence \n (e.g., "Weight: 61kg,\nGoal: Muscle Gain,\nBudget: Low,
Diet:\nVegetarian") so the JSON parses correctly and retains the same content.
In `@templates/gym-ai-coach-agent/README.md`:
- Around line 3-25: Add a blank line after each top-level heading to satisfy
markdownlint rules: insert an empty line after the headings "Problem",
"Solution", "Features", "Setup", and "Usage" in
templates/gym-ai-coach-agent/README.md, and ensure the file ends with exactly
one trailing newline; update the sections where lists or paragraphs immediately
follow a heading so there is a single blank line separating the heading from the
following content.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: a8e1fab0-5efa-4ad0-a60c-2339442aa77e
📒 Files selected for processing (6)
templates/gym-ai-coach-agent/README.mdtemplates/gym-ai-coach-agent/config.jsontemplates/gym-ai-coach-agent/flows/gym-coach/README.mdtemplates/gym-ai-coach-agent/flows/gym-coach/config.jsontemplates/gym-ai-coach-agent/flows/gym-coach/inputs.jsontemplates/gym-ai-coach-agent/flows/gym-coach/meta.json
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Requesting maintainer to add 'mission-possible' label if required. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Requesting maintainer to add 'mission-possible' label if required. |
There was a problem hiding this comment.
Actionable comments posted: 4
♻️ Duplicate comments (1)
templates/gym-ai-coach-agent/flows/gym-coach/config.json (1)
88-98:⚠️ Potential issue | 🔴 CriticalMission compromised: Hardcoded credential identifiers detected in operational template.
Agent, this is a critical security concern. The
generativeModelNameconfiguration at lines 95-97 contains workspace-specific credential bindings:
credentialId:"32c708a5-14de-41ff-91fe-04edcd840f2a"(internal UUID)credential_name:"gemini"(workspace credential reference)These values will fail in other environments and expose internal identifiers in a distributable artifact. The corresponding
inputs.jsoncorrectly uses empty placeholders, but this flow config overrides them with hardcoded values.Your mission: Clear these credential fields to ensure template portability.
🔐 Required credential sanitization
"generativeModelName": [ { "type": "generator/text", "params": {}, "configName": "configA", "model_name": "gemini/gemini-2.5-flash", - "credentialId": "32c708a5-14de-41ff-91fe-04edcd840f2a", + "credentialId": "", "provider_name": "gemini", - "credential_name": "gemini" + "credential_name": "" } ]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@templates/gym-ai-coach-agent/flows/gym-coach/config.json` around lines 88 - 98, The flow config under generativeModelName (entry with configName "configA" and model_name "gemini/gemini-2.5-flash") contains hardcoded credentialId and credential_name values; remove or clear those fields (or replace them with the same empty placeholder tokens used in inputs.json) so the template does not embed workspace-specific UUIDs and will read credentials from inputs at runtime instead of using "32c708a5-14de-41ff-91fe-04edcd840f2a" or "gemini".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@templates/gym-ai-coach-agent/config.json`:
- Around line 6-10: The steps array items in the "steps" key are indented
inconsistently with other top-level keys; fix by aligning each string element in
the "steps" array to match the file's established indentation style (indent the
array items to the same column as other top-level values under the root object),
ensuring consistent spacing before each quoted string in the "steps" array.
In `@templates/gym-ai-coach-agent/flows/gym-coach/config.json`:
- Around line 17-27: Replace the default Lamatic branding values in the chat
configuration by updating the "botName" to a fitness-focused name (e.g., "Gym AI
Coach"), change "imageUrl" to a fitness/coach avatar, adjust "placeholder" to
something like "Ask your fitness coach...", and replace the "suggestions" array
with fitness-themed prompts (e.g., workout plans, nutrition tips, form checks);
also verify "policyUrl" points to your product/privacy page or remove if not
applicable and ensure "displayMode" and "position" remain appropriate for the
widget.
In `@templates/gym-ai-coach-agent/flows/gym-coach/README.md`:
- Line 57: Replace the plain text "Check the Lamatic documentation at
docs.lamatic.ai" with an actionable hyperlink by converting it to markdown link
syntax (for example: "Check the Lamatic documentation at
https://docs.lamatic.ai" or "[Lamatic documentation](https://docs.lamatic.ai)");
update the README entry that currently contains that exact phrase so the
documentation reference becomes clickable in rendered docs.
- Around line 1-5: Update the "## About This Flow" section under the "# 1 -
Getting Started" header to replace generic boilerplate with a precise mission
statement describing that the Gym Coach flow generates personalized fitness and
diet plans; list core capabilities (personalized workout plan generation, diet
plan tailored to preferences and restrictions, progress tracking, and suggestion
of low-cost, India-specific food/substitute options), emphasize the
India-focused, budget-friendly approach, and enumerate expected user inputs
(e.g., weight, height, fitness goal, budget, diet type/restrictions, activity
level) so integrators and agents clearly know the flow's objective and required
data.
---
Duplicate comments:
In `@templates/gym-ai-coach-agent/flows/gym-coach/config.json`:
- Around line 88-98: The flow config under generativeModelName (entry with
configName "configA" and model_name "gemini/gemini-2.5-flash") contains
hardcoded credentialId and credential_name values; remove or clear those fields
(or replace them with the same empty placeholder tokens used in inputs.json) so
the template does not embed workspace-specific UUIDs and will read credentials
from inputs at runtime instead of using "32c708a5-14de-41ff-91fe-04edcd840f2a"
or "gemini".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6bde8756-9957-42c1-bab5-03fc329c6ff7
📒 Files selected for processing (5)
templates/gym-ai-coach-agent/config.jsontemplates/gym-ai-coach-agent/flows/gym-coach/README.mdtemplates/gym-ai-coach-agent/flows/gym-coach/config.jsontemplates/gym-ai-coach-agent/flows/gym-coach/inputs.jsontemplates/gym-ai-coach-agent/flows/gym-coach/meta.json
| "steps": [ | ||
| "Provide user input (weight, goal, budget, diet)", | ||
| "Generate fitness plan", | ||
| "Return structured output" | ||
| ], |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Mission brief: Minor indentation inconsistency detected in the steps array.
Agent, while the JSON parses correctly, the steps array items use inconsistent indentation compared to other top-level values. This won't break functionality but affects readability.
🔧 Suggested formatting alignment
"steps": [
- "Provide user input (weight, goal, budget, diet)",
- "Generate fitness plan",
- "Return structured output"
-],
+ "Provide user input (weight, goal, budget, diet)",
+ "Generate fitness plan",
+ "Return structured output"
+ ],📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "steps": [ | |
| "Provide user input (weight, goal, budget, diet)", | |
| "Generate fitness plan", | |
| "Return structured output" | |
| ], | |
| "steps": [ | |
| "Provide user input (weight, goal, budget, diet)", | |
| "Generate fitness plan", | |
| "Return structured output" | |
| ], |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@templates/gym-ai-coach-agent/config.json` around lines 6 - 10, The steps
array items in the "steps" key are indented inconsistently with other top-level
keys; fix by aligning each string element in the "steps" array to match the
file's established indentation style (indent the array items to the same column
as other top-level values under the root object), ensuring consistent spacing
before each quoted string in the "steps" array.
| "botName": "Lamatic Bot", | ||
| "imageUrl": "https://img.freepik.com/premium-vector/robot-android-super-hero_111928-7.jpg?w=826", | ||
| "position": "right", | ||
| "policyUrl": "https://lamatic.ai/docs/legal/privacy-policy", | ||
| "displayMode": "popup", | ||
| "placeholder": "Compose your message", | ||
| "suggestions": [ | ||
| "What is lamatic?", | ||
| "How do I add data to my chatbot?", | ||
| "Explain this product to me" | ||
| ], |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Mission observation: Chat widget branding uses default Lamatic configuration.
Agent, the chatConfig contains default Lamatic branding (bot name, suggestions about "What is lamatic?", greeting mentioning "Lamatic Bot"). For a Gym AI Coach template, consider customizing these to match the fitness coaching context.
💪 Fitness-themed chat configuration
"chatConfig": {
- "botName": "Lamatic Bot",
+ "botName": "Gym AI Coach",
"imageUrl": "https://img.freepik.com/premium-vector/robot-android-super-hero_111928-7.jpg?w=826",
...
"suggestions": [
- "What is lamatic?",
- "How do I add data to my chatbot?",
- "Explain this product to me"
+ "Create a muscle gain plan for 70kg",
+ "Vegetarian diet plan on a budget",
+ "Beginner workout routine for weight loss"
],
...
- "greetingMessage": "Hi, I am Lamatic Bot. Ask me anything about Lamatic",
+ "greetingMessage": "Hi, I'm your Gym AI Coach! Share your weight, fitness goal, budget, and diet preference for a personalized plan.",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@templates/gym-ai-coach-agent/flows/gym-coach/config.json` around lines 17 -
27, Replace the default Lamatic branding values in the chat configuration by
updating the "botName" to a fitness-focused name (e.g., "Gym AI Coach"), change
"imageUrl" to a fitness/coach avatar, adjust "placeholder" to something like
"Ask your fitness coach...", and replace the "suggestions" array with
fitness-themed prompts (e.g., workout plans, nutrition tips, form checks); also
verify "policyUrl" points to your product/privacy page or remove if not
applicable and ensure "displayMode" and "position" remain appropriate for the
widget.
| # 1 - Getting Started | ||
|
|
||
| ## About This Flow | ||
|
|
||
| This flow automates a workflow with **3 nodes** working together to process and transform data. The flow is designed to streamline operations and can be easily integrated into your existing systems. |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Mission advisory: Generic documentation doesn't brief agents on the actual objective.
Agent, this README uses boilerplate content that doesn't describe the Gym Coach flow's actual mission: generating personalized fitness and diet plans. Users deploying this template would benefit from knowing:
- What fitness planning capabilities this flow provides
- The India-focused, budget-friendly approach
- Expected user inputs (weight, goal, budget, diet type)
Consider customizing the description to match the flow's specialized function rather than keeping generic "Getting Started" content.
📝 Suggested customization for flow description
-# 1 - Getting Started
+# Gym AI Coach Flow
## About This Flow
-This flow automates a workflow with **3 nodes** working together to process and transform data. The flow is designed to streamline operations and can be easily integrated into your existing systems.
+This flow generates personalized, budget-friendly fitness and diet plans tailored for Indian users. It processes user input (weight, fitness goal, budget, diet type) through an AI coach that creates structured workout routines, diet recommendations, and protein targets.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # 1 - Getting Started | |
| ## About This Flow | |
| This flow automates a workflow with **3 nodes** working together to process and transform data. The flow is designed to streamline operations and can be easily integrated into your existing systems. | |
| # Gym AI Coach Flow | |
| ## About This Flow | |
| This flow generates personalized, budget-friendly fitness and diet plans tailored for Indian users. It processes user input (weight, fitness goal, budget, diet type) through an AI coach that creates structured workout routines, diet recommendations, and protein targets. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@templates/gym-ai-coach-agent/flows/gym-coach/README.md` around lines 1 - 5,
Update the "## About This Flow" section under the "# 1 - Getting Started" header
to replace generic boilerplate with a precise mission statement describing that
the Gym Coach flow generates personalized fitness and diet plans; list core
capabilities (personalized workout plan generation, diet plan tailored to
preferences and restrictions, progress tracking, and suggestion of low-cost,
India-specific food/substitute options), emphasize the India-focused,
budget-friendly approach, and enumerate expected user inputs (e.g., weight,
height, fitness goal, budget, diet type/restrictions, activity level) so
integrators and agents clearly know the flow's objective and required data.
|
|
||
| For questions or issues with this flow: | ||
| - Review the node documentation for specific integrations | ||
| - Check the Lamatic documentation at docs.lamatic.ai |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Mission intel: Documentation link should be actionable.
Agent, the documentation reference at Line 57 isn't formatted as a clickable hyperlink. Field operatives need quick access.
🔗 Convert to hyperlink
-- Check the Lamatic documentation at docs.lamatic.ai
+- Check the [Lamatic documentation](https://docs.lamatic.ai)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Check the Lamatic documentation at docs.lamatic.ai | |
| - Check the [Lamatic documentation](https://docs.lamatic.ai) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@templates/gym-ai-coach-agent/flows/gym-coach/README.md` at line 57, Replace
the plain text "Check the Lamatic documentation at docs.lamatic.ai" with an
actionable hyperlink by converting it to markdown link syntax (for example:
"Check the Lamatic documentation at https://docs.lamatic.ai" or "[Lamatic
documentation](https://docs.lamatic.ai)"); update the README entry that
currently contains that exact phrase so the documentation reference becomes
clickable in rendered docs.
d-pamneja
left a comment
There was a problem hiding this comment.
This LGTM in working, but structurally is incorrect. You can keep all the files inside the gym-ai-coach-agent as they are. See the other templates
|
Thanks for the clarification! I've updated the structure to match existing
templates by flattening the flow files directly under the template folder
and removing the flows directory.
…On Tue, 31 Mar 2026 at 13:48, Dhruv Pamneja ***@***.***> wrote:
***@***.**** requested changes on this pull request.
This LGTM in working, but structurally is incorrect. You can keep all the
files inside the gym-ai-coach-agent as they are. See the other templates
—
Reply to this email directly, view it on GitHub
<#119?email_source=notifications&email_token=A2OGHB3AGKJOQWTK32MVO434TN5NZA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMBTGU2TIOBRGUY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2L24DSL5ZGK5TJMV3V63TPORUWM2LDMF2GS33OONPWG3DJMNVQ#pullrequestreview-4035548151>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2OGHBZAKVR3BEZJRKJ43XD4TN5NZAVCNFSM6AAAAACXGS4F6WVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHM2DAMZVGU2DQMJVGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Deploy on Lamatic
PR Checklist
1. Select Contribution Type
kits/<category>/<kit-name>/)bundles/<bundle-name>/)templates/gym-ai-coach-agent/)2. General Requirements
kebab-caseand matches the flow IDREADME.md(purpose, setup, usage)3. File Structure (Check what applies)
config.jsonpresent with valid metadataconfig.jsoninputs.jsonmeta.jsonREADME.md4. Validation
[template] Add Gym AI Coach Agent)Files Added
Flow Architecture & Node Types
High-level Flow Logic
Notable Details