Fairy â Hackathon Submission
Inspiration
Trying to conceive is a two-person project, but the work rarely splits evenly. Before a couple ever sees a specialist, there's a maze of insurance calls, missing lab work, and clinic scheduling, and that load usually falls on one partner. The numbers make the case: roughly 1 in 6 people worldwide experience infertility (WHO, 2023), about 1 in 5 married U.S. women trying for a first child are affected (CDC), and a single IVF cycle runs $12kâ$23k, mostly out of pocket. Yet coverage is a patchwork only the patient can untangle. We wanted to give that agency back to the couple by handing the phone-and-paperwork grind to an agent.
What it does
Fairy is a mobile-first app that treats fertility prep as a shared workflow with Her, His, and Together views. From one intake, it:
- Computes a trying window and confidence label, and flags missing or borderline labs with plain-language reasons.
- Runs an autonomous agent that places a real outbound call via AgentPhone; Grok drives the conversation turn-by-turn over a webhook, then extracts a structured result (coverage, slot, bring-list) into tasks and a calendar.
- Produces a copyable, doctor-ready summary grounded only in real reference data.
The trying window uses the irregular-cycle rule from our reference data:
$$\text{ovulation}_{\min} = \text{lastPeriod} + \text{cycleMin} - 14$$
$$\text{ovulation}_{\max} = \text{lastPeriod} + \text{cycleMax} - 14$$
$$\text{window} = [\ \text{ovMin} - 5,\ \text{ovMax} + 1\ ]$$
How we built it
Two people on parallel branches in one day, with Cursor in the loop throughout.
- AgentPhone for real outbound voice; xAI Grok as the conversational brain on each webhook turn, plus reasoning, structured extraction, and grounded chat.
- Inngest for a durable, event-driven workflow: parallel fan-out/fan-in, a
waitForEventapproval gate, astep.sleepcheck-in, and a reactive summary function, all driven by four events. - Call-time RAG: xAI embeddings + a Redis vector KNN retrieve the exact reference knowledge (CPT codes, coverage terms) into the agent's prompt, off the Supabase hot path.
- Supabase for data, Vercel for deploy, Next.js App Router + Tailwind for the phone-frame UI.
A core design rule: a pure rules core (trying window, missing-data, extractors) with no I/O, wrapped by an impure shell, so correctness is testable in isolation.
Challenges we ran into
- Live voice is messy. Humans answer out of order, vaguely, or not at all. We treated the call as a checklist of objectives rather than a script, and parse the transcript regardless of order, marking unresolved fields instead of inventing them.
- Demos can't stall. Any live failure (no key, bad webhook, dropped call) falls through to a deterministic Mock_Fallback that returns identical schema and values, so the demo always completes.
- No fabricated medicine. Every clinical value comes from
/reference-data/; if it isn't sourced, it isn't shown. - Keeping two parallel branches coherent under a tight clock without stepping on each other's seams.
Accomplishments that we're proud of
- A voice agent that makes a real phone call and writes back structured, grounded results.
- An Inngest graph that is visibly more than a one-shot function: parallel branches, a human-in-the-loop pause, and a scheduled follow-up.
- 201 tests with the rules core covered by property-based tests (any-order extraction, idempotent approval, parallel fan-in),
tscclean and build green. - A polished, native-feeling phone UI, not a desktop dashboard.
What we learned
- Determinism is a feature, not a fallback. A reproducible mock made the live path safe to demo.
- Agentic â linear. Modeling the flow as events with pauses and parallelism matched the real-world process far better than a sequential pipeline.
- Grounding every claim in source data is what makes health AI trustworthy, and it's a constraint worth designing around from the start.
What's next for Fairy
- Real telephony and identity verification (with a signed BAA and HIPAA compliance) to move beyond demo numbers.
- Multi-couple support with secure, per-partner data ownership.
- Deeper personalization from labs, cycle history, and biometrics, plus expanded coverage-comparison across plans and clinics.
Built With
- cursor
- grok
- inngest
- vercel
- xai
Log in or sign up for Devpost to join the conversation.