Inspiration
Patients with chronic or urgent medical conditions (such as diabetes, ADHD, or acute bacterial infections) frequently encounter local prescription stockouts. When a medication is out of stock, patients face hours of tedious manual calling to pharmacy after pharmacy, navigating confusing IVR phone trees, waiting on hold, and often having stock run out before they arrive.
We built RxScout to eliminate this friction. By harnessing autonomous AI voice agents powered by CALL-E, RxScout does the heavy lifting: sequentially calling nearby pharmacies, asking for specific dosages and quantities, and notifying the patient immediately via SMS once stock is located.
What it does
- Location-Aware Pharmacy Discovery: Resolves nearby retail pharmacies and community chemists within an adjustable geographic radius based on the patient's area PIN code.
- Autonomous Voice Inquiries with CALL-E: Plans and initiates AI voice calls directly to pharmacy lines. CALL-E navigates automated phone trees, presses DTMF keypad options to reach the dispensary/chemist counter, and conducts a polite, human-like voice conversation with pharmacy staff.
- Structured Stock Extraction: Converts the conversational audio transcript into structured JSON data—capturing stock status (
in_stock: boolean), available quantities/strips, backorder dates, and pharmacist notes. - Sequential Zero-Spam Dispatch: Dials pharmacies one at a time, closest first. The moment an active pharmacy confirms availability, the search terminates instantly to avoid redundant outbound calls.
- Live Visual Dashboard & Audio Monitor: Provides real-time visibility into the calling queue, live transcripts turn-by-turn, and web speech synthesis so users can monitor the agent's progress.
- Instant Patient Alert & Prescription Transfer: Sends an instant SMS alert via Twilio to the patient's mobile device with the pharmacy's address, phone, and distance, plus a 1-click prescription transfer template.
How we built it
- CALL-E Voice SDK: Powers the core outbound calling engine, telephony IVR navigation, and structured data extraction.
- Next.js 14 (App Router) & TypeScript: Modern full-stack architecture with Server-Sent Events (SSE) for streaming live transcripts and call states to the browser.
- Tailwind CSS: Sleek, minimalist dark-mode interface built for speed and clarity.
- Web Audio & Speech API: Dual-tone telephone signaling and client-side speech playback for interactive sandbox demos.
- Twilio SMS: Automated patient notification dispatch.
- Node.js Test Runner: 15 comprehensive unit and integration tests verifying prompt engineering, parser resilience, and session orchestration.
Challenges we ran into
- Telephony Carrier Compatibility: Testing live outbound calling across different international telephony carriers required adapting the prompt flow, audio cadences, and destination handling.
- Reliable Turn-by-Turn Streaming: Synchronizing external call events from asynchronous telephony runs back to the patient's browser without page refreshing required robust Server-Sent Events (SSE) buffering and state hydration.
- Minimizing Pharmacy Burden: Ensuring our AI agent speaks concisely, asks the right questions in under 45 seconds, and stops calling immediately once stock is located.
Accomplishments that we're proud of
- Successfully executing end-to-end autonomous voice calls that navigate interactive phone trees and converse with staff.
- Clean, responsive, minimalist UI with real-time live streaming of transcript turns.
- A fully deterministic sandbox mode allowing judges to test the entire experience locally without incurring telephony costs, backed by 100% passing tests.
What we learned
- How to write structured prompts for voice agents to reliably extract machine-readable JSON data from freeform phone dialogue.
- The power and speed of CALL-E's API for low-latency, goal-oriented outbound voice tasks.
What's next for RxScout
- Direct integration with pharmacy inventory management APIs for hybrid instant check before voice fallback.
- Automated electronic prescription transfer dispatch directly to clinics.
- Multi-lingual voice support for diverse patient communities.
Built With
- ai-voice-agent
- call-e
- healthcare
- nextjs
- node.js
- react
- server-sent-events
- speech-synthesis
- tailwind-css
- telephony
- twilio
- typescript
Log in or sign up for Devpost to join the conversation.