Inspiration

Every time someone walks into a doctor's office, they repeat themselves. Same allergies. Same medications. Same history. And if they can't get an appointment for two weeks, they're left Googling symptoms alone at 2am — anxious, uninformed, and unsupported.

We asked: what if everyone had a brilliant, always-on health companion that already knew their history, could answer their questions safely, book their appointments, and hand their doctor a clean, unbiased report — all from a single conversation?

That's Baymax.


What It Does

Baymax is a multi-agent AI healthcare assistant built on Fetch.ai's Agentverse, powered by ASI1. It runs a staged pipeline of three specialized agents:

Doctor Agent

The core of Baymax. It conducts a medically-grounded intake conversation, asking only the most useful follow-up questions, detecting red flags (chest pain, breathing difficulty, sudden severe headache), and escalating immediately when needed. It never diagnoses — it informs, guides, and protects.

Scheduling Agent

When the Doctor Agent determines a visit is needed, the Scheduling Agent takes over. It assesses urgency, recommends appointment type, and books directly into the patient's Google Calendar via the REST API — with 24-hour email reminders automatically set.

Summarizer Agent

Before ending the session, Baymax generates an objective, bias-free clinical summary for the treating physician. No subjective language. No assumptions. Just clean, structured facts the doctor can act on.

Long-Term Patient Memory

Baymax remembers everything across sessions — name, allergies, medications, past encounters, and symptom history. The second visit is smarter than the first. The tenth is smarter still.


How We Built It

Baymax is a single agent.py running on Agentverse (Fetch.ai's hosted agent platform) using the uAgents framework and Agent Chat Protocol (ACP) for all communication.

The pipeline is fully staged: User Message ↓ [Stage 1] Doctor Agent ──── ASI1 LLM call ↓ ready_to_proceed = true [Stage 2] Scheduling Agent ── ASI1 LLM call ↓ [Stage 3] Reporter / Email Agent ── ASI1 LLM call ↓ Long-term memory updated (ctx.storage)

Each stage calls the ASI1 model via structured JSON prompts, returning validated outputs with fields like choice, structured_notes, patient_summary, and urgency.

Google Calendar integrations are built using pure requests HTTP calls — no external Python libraries needed, keeping the agent fully self-contained on Agentverse.

Patient memory uses Agentverse's built-in ctx.storage — a persistent key-value store scoped per user that survives across sessions.


Challenges We Faced

1. Structured LLM output reliability Getting ASI1 to return consistent, parseable JSON across all three agent stages required careful prompt engineering — explicit format rules, field-by-field constraints, and a clean_json_text() fallback for edge-case markdown wrapping.

2. Memory architecture Separating short-term state (current intake conversation) from long-term memory (persistent patient profile) was a non-trivial design decision. We update long-term memory only after the full pipeline completes — preventing half-formed or corrected symptom data from polluting the patient record.

3. Safety first, always Medical AI has real stakes. We built explicit red-flag detection, urgency classification (low / medium / medium-high / high), and hard rules against diagnosis language — all enforced in the Doctor Agent prompt. Baymax never says "you have X." It says "this could be worth checking."

4. No extra libraries on Agentverse The hosted environment doesn't allow arbitrary pip installs. Our entire Google Calendar and Google Maps integration is written in pure HTTP requests — OAuth2 refresh flow included.


What We Learned

  • How to design a staged multi-agent pipeline where each agent has a single, well-defined responsibility
  • The power of Agentverse + ASI1 as a production-ready agentic stack
  • How to architect safe medical AI — where the hardest constraint isn't capability, it's knowing when not to answer
  • That persistent agent memory changes the entire UX of AI health tools

What's Next

  • Live Google Calendar OAuth flow for multi-user scheduling
  • Wearables integration (Apple Health, Google Fit)
  • Lab result upload and interpretation
  • Expanding to multi-provider appointment management

Built With

Share this project:

Updates

Submission history