Overview
Luna is Paw & Care’s AI-powered voice assistant that answers phone calls, triages pet emergencies, and schedules appointments—all through natural voice conversations. Built on Retell AI technology, Luna provides 24/7 phone coverage without requiring staff availability.Real Voice, Real ConversationsLuna uses advanced conversational AI to have natural phone conversations with pet owners. She listens, understands context, and responds by voice in real-time.
Key Capabilities
Live Voice Calls
Real-time voice conversations via browser with natural language understanding
Medical Triage
Automatic symptom detection and urgency scoring using P.E.T.S. protocol
Appointment Scheduling
Book appointments by voice with automatic calendar integration
Auto-Documentation
Calls are transcribed, summarized, and saved to the database automatically
Starting a Call
Configure Agent (Optional)
Click Settings to enter a custom Retell Agent ID, or use the default agent from your environment configuration (VITE_RETELL_AGENT_ID).
Click Start Call
Press the green Start Call button. Your browser will request microphone access—click Allow.
Wait for Connection
Luna connects in 2-3 seconds. You’ll see “Connecting to Luna…” then “Live Call” when ready.
Call Interface
Status Display
The call interface shows real-time connection status:- Ready (gray): Idle, ready to start a call
- Connecting (yellow): Establishing connection to Luna
- Live Call (green): Active conversation with Luna
- Call Ended (gray): Completed call, ready to start new call
- Error (red): Connection failed or technical issue
Live Controls
During an active call:- Mute/Unmute
- End Call
- Duration Timer
Click the microphone icon to mute your audio. Luna won’t hear you, but she can still speak. Muted calls show a red microphone icon.
Live Transcription
As the call progresses, you see a real-time transcript:- Luna’s messages appear on the left with a stethoscope icon (🩺)
- Your messages appear on the right with a speech icon (🗣️)
- Speaking indicator: Three animated dots show when Luna is talking
- Auto-scroll: Transcript automatically scrolls to the latest message
Live Triage Panel
The right sidebar displays AI-powered triage analysis in real-time:Urgency Score
A circular gauge shows the urgency score (0-10) with color coding:- Red border: Emergency (score 9-10)
- Orange border: Urgent (score 5-8)
- Green border: Routine (score 3-4)
- Blue border: Informational (score 0-2)
Triage Levels
- Emergency
- Urgent
- Routine
- Info
Red Badge - Immediate veterinary attention requiredDetected keywords: bleeding, seizure, unconscious, not breathing, poisoned, hit by car, choking, collapseAction: Recommend immediate emergency visit or transfer to emergency clinic
Detected Information
Luna automatically extracts and displays:- Pet Name: Detected from conversation (“My dog Bella…”)
- Species: Dog, cat, bird, rabbit, etc.
- Symptoms: Live list of detected symptoms with red badges
- Emergency Status: Yes/No indicator
How Detection WorksLuna analyzes every message in real-time, searching for medical keywords and extracting structured information. The triage panel updates automatically as new information is mentioned.
Natural Conversation Examples
Example 1: Emergency Triage
Caller: “My dog Buddy ate chocolate about an hour ago. He’s vomiting and seems really lethargic.” Luna: “I’m sorry to hear Buddy isn’t feeling well. Chocolate ingestion can be serious. How much chocolate did he eat, and what’s his weight?” Caller: “He’s about 30 pounds, and he ate maybe half a dark chocolate bar.” Luna: “Thank you. Based on what you’ve told me, Buddy needs to see a veterinarian right away. This is an emergency. Our clinic has an opening in 30 minutes at 2:00 PM with Dr. Chen. Would that work for you?” Triage Panel:- Pet: Buddy (dog)
- Symptoms: vomiting, lethargic, eaten chocolate, poisoned
- Urgency: 9/10 - EMERGENCY
- Appointment: Scheduled for 2:00 PM
Example 2: Routine Appointment
Caller: “I’d like to schedule a wellness exam for my cat Luna.” Luna: “I’d be happy to help schedule Luna’s wellness exam. How old is Luna, and when was her last visit?” Caller: “She’s 5 years old, and I think her last visit was about a year ago.” Luna: “Perfect, she’s due for her annual checkup. We have availability this Thursday at 10:00 AM with Dr. Rivera, or Friday afternoon at 3:30 PM with Dr. Chen. Which works better for you?” Triage Panel:- Pet: Luna (cat)
- Species: cat
- Urgency: 1/10 - INFO/ROUTINE
- Appointment: Pending scheduling confirmation
Example 3: Urgent Care
Caller: “My dog Max has been limping for two days and won’t put weight on his right paw.” Luna: “I’m sorry Max is limping. Has there been any swelling, or did you notice when the limping started?” Caller: “It started after we went to the dog park. His paw looks a little swollen.” Luna: “Thank you for that information. Max should be seen soon to check for sprains or injuries. I can get you in tomorrow morning at 9:00 AM with Dr. Chen, or this afternoon at 4:30 PM if it’s more urgent.” Triage Panel:- Pet: Max (dog)
- Symptoms: limping, swelling, pain, difficulty walking
- Urgency: 5/10 - URGENT
- Appointment: Offering same-day or next-day options
Automatic Documentation
When a call ends, Luna automatically:1. Saves Call Record
Creates a database entry including:- Caller information: Name, phone, owner ID (if existing client)
- Pet details: Name, species
- Call metadata: Duration, timestamp, direction (inbound)
- Triage data: Urgency level, detected symptoms, keywords
- Full transcript: Complete conversation text
- Summary: AI-generated call summary
2. Creates Appointment (If Booked)
If an appointment was scheduled during the call:- Auto-creates appointment record
- Links to pet and owner
- Sets triage level based on call analysis
- Includes symptoms and reason for visit
- Schedules for discussed date/time
- Sets status to “scheduled”
3. Logs to Audit Trail
Records the AI call event for compliance:- User: “Luna AI”
- Action: “create”
- Resource: “call”
- Details: Caller, pet, and triage summary
Configuration
Retell Agent ID
To use a custom Retell AI agent:Get Agent ID
Log in to your Retell AI dashboard and copy your agent ID (format:
agent_xxxxxxxxxxxx).Environment Configuration
Environment Configuration
The default agent ID is set via the Leave the Settings field empty to use the environment default.
VITE_RETELL_AGENT_ID environment variable in your .env file:Backend API
Luna requires a backend API endpoint at/api/retell/create-web-call that:
- Receives the agent ID
- Calls Retell AI to create a web call session
- Returns the call ID and access token
src/sections/VoiceSimulator.tsx:252
Call Status Reference
- Idle
- Connecting
- Active
- Ended
- Error
Status: Ready to start a callIndicator: Gray icon, “Ready — click Start Call to connect”Actions: Click Start Call
Troubleshooting
Can't Start Call - No Agent ID
Can't Start Call - No Agent ID
Error: “No Retell Agent ID configured”Solution:
- Set
VITE_RETELL_AGENT_IDin your.envfile, OR - Click Settings and enter your agent ID manually
- Restart the application after changing
.env
Connection Stuck on 'Connecting'
Connection Stuck on 'Connecting'
Possible Causes:
- Backend server not running
- Invalid agent ID
- Retell AI service issue
- Network/firewall blocking WebRTC
- Verify backend is running (
npm run dev:server) - Check browser console for error details
- Test agent ID in Retell AI dashboard
- Try different network (disable VPN)
Microphone Not Working
Microphone Not Working
Symptoms: Luna can’t hear you, or “No microphone access”Solutions:
- Click the lock icon in browser address bar
- Grant microphone permissions for the site
- Check no other app is using the microphone
- Test microphone in system settings
- Refresh the page and try again
Luna Can't Hear Me Clearly
Luna Can't Hear Me Clearly
Symptoms: Poor transcription, repeated “I didn’t understand”Solutions:
- Speak clearly and at normal volume
- Reduce background noise (close doors, turn off fans)
- Move closer to microphone (built-in or headset)
- Use a headset for better audio quality
- Check microphone isn’t muted at hardware level
Call Disconnects Unexpectedly
Call Disconnects Unexpectedly
Possible Causes:
- Unstable internet connection
- Browser tab backgrounded/minimized
- System sleep/standby
- Ensure stable internet connection
- Keep browser tab active during call
- Disable sleep mode during calls
- Check browser console for error messages
No Triage Data Appearing
No Triage Data Appearing
Cause: Symptoms not detected in conversationSolution:
- Use explicit medical terms (“vomiting” vs “throwing up”)
- Mention species (“my dog” or “my cat”)
- State pet name clearly
- Detection requires keywords from the predefined list (see source:
VoiceSimulator.tsx:45-56)
Privacy and Compliance
Data Security
- All calls are encrypted in transit (TLS/HTTPS)
- Transcripts stored securely in your database
- Audio recordings (if enabled) stored on Retell AI servers
- Access controlled by user authentication
- Audit trail maintained for all calls
Compliance Considerations
- HIPAA: Configure Retell AI Business Associate Agreement
- Two-Party Consent: Ensure compliance with state/local recording laws
- Data Retention: Configure retention policies in Retell dashboard
- PHI Protection: Transcripts may contain protected health information
How It Works
WebRTC Connection
When you click Start Call, the browser establishes a WebRTC connection to Retell AI servers using the access token from your backend.
Voice Streaming
Your microphone audio streams in real-time to Retell AI. Luna’s voice streams back to your speakers.
Live Transcription
Retell AI transcribes the conversation in real-time and sends transcript updates via WebSocket.
Triage Analysis
Your frontend analyzes each transcript message for symptom keywords and updates the triage panel.
Technical ReferenceLuna is built using the Retell Web Client SDK. Source code:
src/sections/VoiceSimulator.tsxKey technologies:- Retell AI for conversational voice
- WebRTC for real-time audio
- React hooks for state management
- Supabase for data persistence
Related Features
Appointments
View appointments scheduled by Luna
Patient Management
Manage pet records referenced in calls