AWS Builder Center

Weekend Agent Challenge: Rehab Recovery Agent

Built an AI agent over the weekend that helps me follow my own physio program

1. Vision & What the Agent Does

A physio program is easy to start and easy to drift from. You get a plan after an assessment, you're motivated for the first week, and then life happens between appointments. By the time you're back in the clinic, you're relying on memory to answer "how has it actually been going?"
I built an always-on agent to close that gap, using my own real physio program as the test case: a mix of mobility work, stability drills, and strengthening for a few weak areas, prescribed after an assessment.
The agent runs on a schedule and on events, not on a button click:
  • Reminds. A daily check runs every morning. If two or more days have passed since my last logged session, it emails a nudge. If I'm on track, it stays silent, correctly, not because it failed to run.
  • Logs. A simple form captures which exercises I completed, a free-text note per side, and three ratings: pain, stiffness, and confidence.
  • Tags. Amazon Bedrock (Nova Lite) reads each note and classifies it into exactly two fields: symptom type and severity. Nothing else. More on why that matters below.
  • Tracks. Plain code, no AI, checks my adherence against a 3-4x/week target and watches for a pattern of one side of my body struggling more than the other across single-leg exercises.
  • Summarizes. Weekly and monthly emails compile anything worth flagging into a physio-ready summary.
One rule was locked before a single line of code got written, and it never moved: this agent never gives medical advice. It doesn't recommend, modify, or skip a prescribed exercise. Anything it flags gets phrased as a question for my physio to weigh in on, never as a suggestion. That boundary shaped almost every architecture decision that followed.


2. How You Built It

I split the system on a principle I trust: the AI does judgment, plain code does the math. Bedrock's only job is classifying a note into a symptom type and severity level. Everything else, adherence math, pattern detection, deciding what's worth flagging, is deterministic code with no model involved. That split is what makes the "no advice" rule a structural guarantee instead of a policy I'm hoping holds.
A few decisions worth calling out specifically:
  • Forced tool-use on Bedrock's Converse API. The model's response is constrained to a fixed two-field schema. There's no field in the response shape where free-text advice could even appear. I tested this against an adversarial input, a real pain report bundled with a manipulative embedded question, and the model correctly classified the real symptom while giving zero response to the question.
  • A deterministic keyword backstop. Certain words in a note ("sharp," "locked," "gave way") force a review flag regardless of what severity the model assigned, so a single model call is never the only thing standing between a real red flag and it getting missed.
  • Escalation text built from structured fields only, never the raw note. This means the "no advice" guarantee can be checked programmatically against a banned-word list, not just read over by eye and trusted.
I didn't get everything right on the first pass, and I think that's worth being honest about:
  • A public endpoint returned a 403 error even with public access configured. My first theory was an account-level AWS restriction, which sent me down a dead end chasing a CLI command that didn't even exist in my environment. The real cause was simpler: a second, separate permission grant was missing. The correction mattered more than the mistake.
  • During a later test, a live write used today's date instead of a safe placeholder and overwrote a session I'd genuinely logged that day. I caught it within minutes and recovered the exact data through AWS's point-in-time recovery, decided months earlier "just in case." The real fix wasn't a note to be more careful, it was removing the ability to make that mistake at all: a fixed, obviously-fake test date that every script now has to use.
Both incidents are logged in the project's build history rather than quietly cleaned up, because catching and correcting a mistake in real time is a more honest engineering story than pretending everything worked the first time.

3. AWS Services Used / Architecture Overview

  • Amazon EventBridge Scheduler triggers the daily nudge check and the weekly/monthly digest, no manual button click involved.
  • AWS Lambda (five functions) handles tagging, logging a session, the daily nudge, the weekly/monthly digest, and the dashboard's read API.
  • Amazon Bedrock (Nova Lite) classifies free-text notes into a symptom type and severity, and only that.
  • Amazon DynamoDB holds two tables: the prescribed program (versioned, so a real change from my physio becomes history instead of an overwrite) and the session log (raw notes kept permanently alongside their AI tags).
  • Amazon SES sends the nudge and digest emails.
  • A Vercel-hosted React frontend provides the on-demand deep view: a logging form and a dashboard with trends, flags, and session history, gated by an access key entered once in the browser and never baked into the shipped code.


4. What You Learned

This project leans on a skill I use professionally: sorting what actually matters from what doesn't, and building a system around that judgment. Seeing that pattern hold up in a completely different domain, my own recovery, not a work queue, was a good confirmation that it's a transferable skill, not a one-off.
I leaned on two real AWS reference patterns while designing this rather than inventing the shape from scratch:  aws-samples/serverless-patterns 's EventBridge-to-Bedrock pattern, and a threshold-based alerting pattern from  aws-samples/sample-amazon-bedrock-ops-alert  for the "only notify when something actually crosses a line" logic.
One honest limitation: all three email types work correctly end to end, but they currently land in Gmail's spam folder rather than the inbox, since a brand-new sending address has no reputation with mail providers yet. The real fix, a verified sending domain with DKIM, is a known next step, not something I solved this weekend.
If I keep building on this, the next real feature is auto-parsing an updated program when my physio issues a new one, reusing the same classification pattern built for session notes, instead of updating the plan by hand.

5. Link to App or Repo

  • Live app: not shared here, this handles real personal health data. Screenshots and a short demo below instead.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article