Inspiration

A supplement can look ordinary on a shelf and still deserve a conversation about the medicines someone takes. Remembering the bottle name, finding a reliable source, and preparing that conversation are separate chores. We wanted to connect them without letting a model decide what is safe.

The question became: can an agent collect useful evidence while keeping label confirmation and medical decisions with people?

What it does

MedGuard guides a person through a focused supplement review. Start with an optional medicines-and-conditions profile or a clearly labeled synthetic sample. Enter text from the bottle. A Strands agent queries the live NIH Dietary Supplement Label Database and returns candidates; the person compares the brand and ingredients before choosing one.

A second real agent run validates the selected catalog label and gathers openFDA food and drug enforcement records, cited interaction prompts and adult dosage references. The app shows what came back, which calls completed, and where the sources are limited. FDA results are potential text matches requiring a product/lot comparison, not a declaration that the person's bottle is recalled. The interaction rules and dosage table are small curated references, explicitly labeled as such.

The person can save a completed review in the browser's cabinet. Each review stays dated; changing the profile marks earlier checks stale. A pharmacist note can be reviewed, downloaded or printed with source links and unknown dose, frequency and lot fields.

MedGuard is not medical advice. It does not diagnose, prescribe, guarantee safety or send the note automatically.

How we built it

The backend uses the Strands Agents SDK with Amazon Bedrock Nova Pro (us.amazon.nova-pro-v1:0, us-west-2). The model invokes real tools: identify_supplement, check_recall, check_interactions and check_dosage.

Each request gets its own context and trace. Tool functions take no model-supplied factual arguments: they use the submitted profile, original query and freshly retrieved catalog ingredients. The server validates label selection and checks that required evidence calls completed. Source failures remain incomplete. The displayed summary is built from structured evidence so unsupported model prose cannot become a safety verdict.

The React/Vite frontend uses Radix Dialog and Accordion, Lucide icons, locally bundled Nunito Sans and a shared CSS design system. It has guided onboarding, explicit confirmation, bottom navigation, browser persistence and local note export. The public-data CLI and agent share the same source helpers.

Challenges we ran into

Our strict baseline evaluation caught a serious bug: an unquoted Fish Oil search attached a real tea-tree balm recall to the wrong product. The model repeated it confidently. We fixed the query and preserved product descriptions, firms, lots, record status and dates. A result being from FDA is not enough; it must be interpreted within its matching limits.

The baseline also treated source errors as no recall, chose the first catalog result automatically, and displayed completed tool rows before the response arrived. We replaced those shortcuts with explicit states, user selection and actual trace data.

A tiny interaction set missed St. John's Wort with warfarin. NCCIH explicitly describes that interaction. We added a cited rule and removed "no interactions" or "safe dose" conclusions when limited references return nothing. These are bounded engineering improvements, not clinical validation.

Accomplishments we're proud of

We connected an actual model-driven workflow to live official data and a consumer interface, then tested the places where a polished demo could mislead. The person controls label selection and saving; the app keeps uncertainty visible. The output is a dated, portable starting point for a pharmacist conversation.

Our strongest artifact is the evidence trail: a scored baseline evaluation, preserved live counterexamples, regression tests, real browser responses and screenshots, and coherent commits showing the repairs.

What we learned

Official data, a model and a friendly interface do not automatically produce trustworthy conclusions. Search candidates need confirmation, recalls need product/lot context, and a missing rule is not an absence of risk. The architecture must enforce these distinctions rather than relying on a disclaimer.

Competitor research also changed our pitch. Medisafe and MyTherapy already offer useful records and sharing; ChatGPT Health can use personal context. We focus on the supplement-label confirmation and inspectable evidence workflow, without claiming that live search or exports are unique.

What's next

Real camera label capture with human confirmation; broader clinically reviewed references; whole-cabinet duplicate/interaction checks; consent-based scheduled recall checks; authenticated storage and caregiver sharing; and an AgentCore deployment. These are roadmap items, not features of this local prototype.

Attribution and prior work

MedGuard pivoted from our prior project, The Missing 20, a warehouse-receiving agent. We reused the initial scaffold and the discipline of keeping tool evidence and human decisions separate. The repository history records the supplement workflow, source fixes and consumer redesign. Prior warehouse integrations and video are not submitted as MedGuard capabilities.

Built With

Share this project:

Updates

Submission history