Clinic triage with handoff tools
Overview
Build a multi-assistant clinic system using handoff tools for seamless patient routing: a triage assistant assesses symptoms and routes patients to either emergency care or appointment scheduling based on their needs.
System Capabilities:
- Intelligent triage assessment with handoff routing
- Emergency detection → immediate handoff to emergency assistant
- Appointment scheduling with provider matching
- Context-preserving transfers between specialized assistants
What You’ll Build:
- Triage assistant with handoff tools for routing decisions
- Emergency assistant for urgent medical situations
- Scheduler assistant for appointment management
1. Create individual assistants
Create three specialized assistants that work together using handoff tools for seamless patient routing.
Triage Assistant
The main entry point that assesses patient needs and routes to appropriate care:
Emergency Assistant
Handles urgent medical situations with immediate care protocols. Uses the {{patientName}} variable passed from the triage handoff to provide personalized emergency care:
Scheduler Assistant
Manages appointment booking and provider coordination. Uses the {{patientName}} variable passed from the triage handoff to provide personalized scheduling service:
2. Configure handoff tools
The Triage assistant uses handoff tools to route patients to the appropriate specialist:
Handoff Configuration:
handoff_to_Emergency: Triggered when patient indicates emergency or urgent symptomshandoff_to_Scheduler: Used for routine appointment scheduling needs- Context preservation: Full conversation history transfers with
"type": "all"
Key Features:
- Seamless background transfers (users don’t see handoff mechanics)
- Context-aware routing based on patient responses
- Specialized assistant UUIDs for precise routing
- Automatic conversation continuity
- Variable extraction: Patient name is automatically extracted and passed to receiving assistants
- Personalized experience: Receiving assistants greet patients by name using
{{patientName}}variable
Replace <scheduler_assistant_uuid> and <emergency_assistant_uuid> with the actual assistant IDs after creating each assistant.
3. Test
Test the handoff system with different patient scenarios:
Routine Appointment Scenarios:
- “I need to schedule a checkup”
- “Can I reschedule my appointment?”
- “I’d like to see Dr. Smith next week”
Emergency Scenarios:
- “I’m having chest pain”
- “My child has a high fever”
- “I think I broke my arm”
Expected Flow:
- Patient calls → Triage assistant answers
- Triage collects name and assesses need
- Handoff triggers automatically based on patient response
- Patient name is automatically extracted and passed as a variable
- Emergency or Scheduler assistant takes over with full context and patient name
4. Next steps
Now that you have a working handoff-based clinic system:
- Advanced Handoffs: Handoff Tools
- Custom Tools: Scheduling Tools
- Calendar Integration: Google Calendar
- Emergency Protocols: Call Forwarding