Skip to content

feat: add Period & Wellness AI Agent #425 - #466

Open
Shreeyukta2806 wants to merge 2 commits into
AditthyaSS:mainfrom
Shreeyukta2806:feat/period-wellness-agent
Open

feat: add Period & Wellness AI Agent #425#466
Shreeyukta2806 wants to merge 2 commits into
AditthyaSS:mainfrom
Shreeyukta2806:feat/period-wellness-agent

Conversation

@Shreeyukta2806

@Shreeyukta2806 Shreeyukta2806 commented Jun 5, 2026

Copy link
Copy Markdown

What does this PR do?

Adds a Period & Wellness AI Agent that answers menstrual
health and wellness questions in a friendly,
science-informed tone — like advice from a knowledgeable
friend, not a doctor. The agent handles questions about
cycle phases, symptoms, nutrition, exercise, sleep, and
hormonal wellness, with a clear medical disclaimer on
every response.

Type of change

  • New agent

Checklist

For every PR:

  • I was assigned to this issue before starting
  • I have read CONTRIBUTING.md
  • This PR is linked to issue [Agent]: Period & Wellness AI Agent #425
  • I tested this locally with npm run dev
  • No API keys are anywhere in my code
  • I did not add any new packages without discussing it first

For new agent PRs:

  • I tested the agent with a real API key
  • I created a new file in src/agents/definitions/
    with the agent config
  • The agent id is lowercase and uses kebab-case
    (period-wellness-agent)
  • The icon name is from lucide.dev/icons
  • The system prompt clearly describes the format
    of the output
  • This agent is not a duplicate of one that
    already exists

Screenshots

Will add screenshots once tested locally with API key.

Anything else I should know?

This agent is being built as part of GSSoC 2026
under the AI/Agents + Healthcare track.

V1 is intentionally kept simple — one solid agent file
with a dynamic system prompt (no hardcoded FAQs),
following the existing agent structure exactly.

V2 is planned to include full RAG + Vector DB support
for deeper, research-backed responses — already
discussed and approved by maintainer @AditthyaSS
in the Discussions thread.

Closes #425

Summary by CodeRabbit

  • New Features
    • Added a Period & Wellness AI Agent that provides personalized guidance on menstrual health and wellness topics.
    • Users can submit health questions and optionally specify their current cycle phase for more targeted responses.

@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

@Shreeyukta2806 is attempting to deploy a commit to the aditthyass' projects Team on Vercel.

A member of the Team first needs to authorize it.

@mergify

mergify Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Hey @Shreeyukta2806! 👋
Wow — your first contribution to iloveAgents! This is a big deal and I want you to know it means a lot. 🎊
Every agent on this platform started exactly like this — someone like you deciding to spend their time building something useful for everyone. That is something to be proud of.
A few things while you wait for the review:

  • Star the repo if you haven't already. Star it here
  • 📖 Check the Contributing Guide
  • 💬 Drop a comment if you get stuck — I reply within 24 hours
    Can't wait to ship this with you. 🚀
    Welcome to the iloveAgents family. 🙏
    @AditthyaSS

@mergify

mergify Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

hey @Shreeyukta2806! 👋
It looks like package-lock.json was changed but package.json was not.
This is usually unintentional — it happens when npm install is run locally with a different npm version.
Please revert it by running:
git checkout package-lock.json
Then push again. 🙏
@AditthyaSS

@mergify mergify Bot added the needs-fix label Jun 5, 2026
@mergify

mergify Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

hey @Shreeyukta2806! 👋
Your PR doesn't seem to be linked to an issue.
Please add this line to your PR description:
Closes #issue_number
Replace issue_number with the actual issue number you are solving.
This helps us track what each PR is fixing! 🔗
@AditthyaSS

@mergify mergify Bot added the new agents label Jun 6, 2026
@mergify mergify Bot added the new agent label Jun 6, 2026
@mergify mergify Bot added the new agent label Jun 6, 2026
@AditthyaSS
AditthyaSS marked this pull request as ready for review June 10, 2026 17:25
@AditthyaSS
AditthyaSS self-requested a review as a code owner June 10, 2026 17:25
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a new Period & Wellness AI Agent definition that answers user questions about menstrual health, cycle phases, and wellness guidance. The agent includes metadata, user input schema with cycle-phase selection, example queries, and a comprehensive system prompt that instructs the agent to respond in a warm, friendly tone while including required medical disclaimers on every response.

Changes

Period & Wellness AI Agent Definition

Layer / File(s) Summary
Agent metadata and model configuration
src/agents/definitions/period-wellness-agent.js
Core agent identity (id, name, description, category, icon), provider set to OpenAI, and model specification for the Period & Wellness AI Agent.
Input schema and example queries
src/agents/definitions/period-wellness-agent.js
User inputs include a required question textarea and an optional cycle-phase select field with follicular, ovulatory, luteal, and menstrual options; example queries demonstrate agent capabilities.
System prompt and behavior definition
src/agents/definitions/period-wellness-agent.js
System prompt instructs the agent on role (friendly wellness companion), scope (menstrual/hormonal/cycle questions), response format (markdown), handling of sensitive questions, and mandatory medical disclaimer ending every response.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested Labels

level:beginner, quality:clean, gssoc:approved

Suggested Reviewers

  • AditthyaSS

Poem

🐰✨ A wellness companion hops into view,
Cycle phases explained, wellness tips too!
Warm, friendly guidance without medical fuss,
Clear disclaimers protect every one of us! 💚

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add Period & Wellness AI Agent #425' accurately and concisely describes the main change: adding a new AI agent for period and wellness guidance.
Linked Issues check ✅ Passed The implementation fully addresses all requirements from issue #425: creates agent with correct metadata, implements system prompt for dynamic responses covering cycle phases and wellness guidance, uses warm friendly tone with medical disclaimer, follows existing agent structure, and uses OpenAI provider.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the Period & Wellness AI Agent as specified in issue #425; no unrelated modifications or scope creep detected.
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

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

@AditthyaSS

Copy link
Copy Markdown
Owner

@Shreeyukta2806 Plz revert the Package file

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/agents/definitions/period-wellness-agent.js`:
- Around line 9-11: The agent configuration in period-wellness-agent.js
currently sets provider: "any" and defaultProvider: "anthropic", which conflicts
with the PR objective to use OpenAI; update the agent config (provider,
defaultProvider, and model fields in the agent definition) to use OpenAI (e.g.,
provider: "openai", defaultProvider: "openai") and select an appropriate OpenAI
model name compatible with your codebase, and verify any metadata or
provider-switch logic referencing provider/defaultProvider or model in this file
aligns with the OpenAI-only requirement.
- Around line 81-91: The prompt-only disclaimer is non-deterministic; add a
post-generation enforcement step in the agent runtime that inspects and, if
missing, appends the exact STANDARD DISCLAIMER string in italics to every final
output. Locate the response creation/dispatch flow (e.g., functions named
generateResponse, handleAgentOutput, sendResponse or runAgent in
period-wellness-agent.js) and implement a PostProcessResponse step that: 1)
checks the final text for the exact disclaimer substring, 2) appends the
disclaimer in italics if absent, and 3) normalizes spacing/newlines so it
appears at the end of the message; also add a unit/validation log entry when the
disclaimer was auto-appended for traceability.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e3466a71-ae44-480c-81f5-4128e54578a4

📥 Commits

Reviewing files that changed from the base of the PR and between 241c43c and ecbe1c7.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • src/agents/definitions/period-wellness-agent.js

Comment on lines +9 to +11
provider: "any",
defaultProvider: "anthropic",
model: "claude-sonnet-4-6",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Provider configuration conflicts with the stated implementation objective.

The linked objective says this agent should use the OpenAI provider, but this config sets provider: "any" and defaultProvider: "anthropic". That breaks the declared contract for this PR scope.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/agents/definitions/period-wellness-agent.js` around lines 9 - 11, The
agent configuration in period-wellness-agent.js currently sets provider: "any"
and defaultProvider: "anthropic", which conflicts with the PR objective to use
OpenAI; update the agent config (provider, defaultProvider, and model fields in
the agent definition) to use OpenAI (e.g., provider: "openai", defaultProvider:
"openai") and select an appropriate OpenAI model name compatible with your
codebase, and verify any metadata or provider-switch logic referencing
provider/defaultProvider or model in this file aligns with the OpenAI-only
requirement.

Comment on lines +81 to +91
- Always end with the medical disclaimer

## HANDLING SENSITIVE QUESTIONS
- If someone describes severe, unusual, or worsening symptoms: acknowledge their concern with empathy, give general context, and firmly recommend seeing a doctor
- If someone seems distressed or anxious: lead with empathy before information
- Never make someone feel their symptoms are "just normal" if they sound serious

## STANDARD DISCLAIMER
Always end EVERY response with this disclaimer in italics:

*⚕️ This information is for general wellness awareness only and is not a substitute for professional medical advice. If you have concerns about your health, please consult a qualified healthcare provider.*

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Mandatory disclaimer is prompt-only, so “every response” is not guaranteed.

Requiring the model to append the disclaimer in the prompt is not deterministic. Given the requirement is strict (“every response”), add an explicit post-generation append/check in the runtime output path, not only in prompt instructions.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/agents/definitions/period-wellness-agent.js` around lines 81 - 91, The
prompt-only disclaimer is non-deterministic; add a post-generation enforcement
step in the agent runtime that inspects and, if missing, appends the exact
STANDARD DISCLAIMER string in italics to every final output. Locate the response
creation/dispatch flow (e.g., functions named generateResponse,
handleAgentOutput, sendResponse or runAgent in period-wellness-agent.js) and
implement a PostProcessResponse step that: 1) checks the final text for the
exact disclaimer substring, 2) appends the disclaimer in italics if absent, and
3) normalizes spacing/newlines so it appears at the end of the message; also add
a unit/validation log entry when the disclaimer was auto-appended for
traceability.

@Shreeyukta2806

Copy link
Copy Markdown
Author

Hey @AditthyaSS, I've reverted
package-lock.json as requested!

Quick question — Coderabbit flagged
the provider config (currently set to
provider: "any", defaultProvider: "anthropic").
Should I change this to OpenAI instead?
Wanted to confirm before making changes.

Also flagged the disclaimer enforcement
as non-deterministic — is this needed
for V1 or can we plan it for V2?

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.

[Agent]: Period & Wellness AI Agent

2 participants