AI-powered healthcare triage & booking assistant
CarePilot turns patient symptoms into triaged guidance and real clinic bookings β in a single seamless flow.
Instead of leaving users to guess where to go, CarePilot:
- understands symptoms through conversational AI
- assesses urgency using grounded medical context
- routes patients to appropriate care
- completes booking through an automated phone call
- π§ Conversational symptom triage (Claude + lightweight RAG)
β οΈ Urgency classification (LOW,MEDIUM,HIGH)- πΊοΈ Smart routing to nearby clinics
- π Automated outbound booking via Twilio voice
- π‘ Live call transcript streamed to the UI
- π© SMS confirmation after booking
- π― Visual triage output with body heatmap
- Enter patient information and location
- Chat with Claude for symptom triage
- Receive urgency level + recommendations + heatmap
- Continue to clinic search
- Start automated booking call
- Watch live call transcript in real-time
- Receive appointment confirmation
- Receive SMS confirmation (if available)
CarePilot is built around a triage-first architecture:
- AI does not immediately route users to booking
- Instead, it performs structured triage first
- Booking is gated behind understanding urgency
This ensures:
- safer routing decisions
- reduced unnecessary emergency visits
- better patient confidence
- User submits symptoms
- Backend retrieves relevant medical triage context
- Claude receives:
- full conversation
- retrieved medical excerpts
- Claude returns:
- urgency level
- recommendations
- wait-care guidance
- emergency warnings
CarePilot uses a Retrieval-Augmented Generation (RAG) approach to ground medical responses.
- No heavy vector database
- No full-document injection
- Context retrieved only when relevant
- Claude retains primary reasoning role
- Improved accuracy of triage responses
- More consistent recommendations
- Better grounding in medical guidance
- Safer handling of edge cases
- Uses OpenStreetMap (Nominatim + Overpass)
- Finds nearby clinics based on user location
- Graceful fallback when live lookup fails
- Explicit user confirmation before booking
CarePilot integrates with Twilio Voice to automate appointment booking.
- Confirms availability
- Handles earliest available fallback
- Captures appointment time
- Verifies patient details
- Real-time transcript streamed to UI
- On-screen call monitoring
- Booking timeline visualization
After booking:
- Appointment is stored in memory
- SMS confirmation is attempted via Twilio
- UI displays:
- appointment details
- booking timeline
- SMS delivery status
- Chat-style triage interface
- Persistent multi-step navigation
- Visual urgency feedback via heatmap
- Live call monitoring panel
- Polished confirmation experience
- Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS
- AI: Anthropic Claude API
- Retrieval: Lightweight RAG-style context injection
- Voice & Messaging: Twilio
- TTS (optional): ElevenLabs
- Maps & Clinics: OpenStreetMap (Nominatim + Overpass)
cd clinic-assistant-mvpnpm installAdd this file at:
clinic-assistant-mvp/.env.local
Example:
TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_AUTH_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_PHONE_NUMBER=+1xxxxxxxxxx
PUBLIC_BASE_URL=https://your-ngrok-subdomain.ngrok-free.dev
ANTHROPIC_API_KEY=sk-ant-...
ELEVENLABS_API_KEY=sk_...
ELEVENLABS_VOICE_ID=...
ELEVENLABS_MODEL_ID=eleven_flash_v2_5Notes:
ANTHROPIC_API_KEYis required for triagePUBLIC_BASE_URLmust be publicly reachable by Twilio- ElevenLabs variables are optional if you want to fall back to Twilio voice
.env.localis ignored by git and should not be committed
npm run devBy default Next will try port 3000.
In another terminal:
ngrok http 3000Then set:
PUBLIC_BASE_URL=https://your-current-ngrok-domain.ngrok-free.devRestart npm run dev after changing .env.local.
- Start app + ngrok
- Enter patient info + symptoms
- Complete triage conversation
- Continue to clinic search
- Start booking call
- Answer phone and observe flow
- Verify confirmation page + SMS
clinic-assistant-mvp/src/app/page.tsxclinic-assistant-mvp/src/app/confirmation/page.tsxclinic-assistant-mvp/src/app/api/triage/route.tsclinic-assistant-mvp/src/app/api/clinics/route.tsclinic-assistant-mvp/src/app/api/call/route.tsclinic-assistant-mvp/src/app/api/call/transcript/route.tsclinic-assistant-mvp/src/app/api/twilio/voice/route.tsclinic-assistant-mvp/src/app/api/appointment/confirm/route.tsclinic-assistant-mvp/src/app/components/body-heatmap.tsxclinic-assistant-mvp/PROJECT_LOG.md
- Appointment storage is in memory only
- Local Twilio development still depends on ngrok
- Clinic lookup can fall back when OpenStreetMap services are slow or unavailable
- Claude triage still depends on Anthropic availability and rate limits
CarePilot does not provide diagnosis or replace professional medical judgment.
If symptoms are severe, unsafe, or rapidly worsening, patients should seek emergency care immediately or call emergency services.



