- Project Summary
- Technology Stack
- Architecture & Design
- Key Features
- Use Cases
- Benefits
- Live Demo
- Future Roadmap
An intelligent customer service platform that combines:
- 🤖 AI Voice Agent — Handles customer calls with natural conversation
- 👤 AI Copilot — Assists human representatives in real-time
- 🔄 Seamless Switching — Toggle between AI and human without dropping calls
Traditional customer service systems force a choice:
- Pure AI: Fast but impersonal, can't handle complex issues
- Pure Human: Personal but expensive, long wait times
This platform bridges both worlds:
- AI handles routine inquiries instantly
- Humans step in for complex cases with full context
- Switch happens in real-time without interruption
| Technology | Purpose |
|---|---|
| Node.js + Express | API server, webhook handlers |
| TypeScript | Type-safe development |
| PostgreSQL + pgvector | Data storage + vector search |
| Redis | Session state, real-time context |
| Prisma ORM | Type-safe database access |
| Technology | Purpose |
|---|---|
| React 18 | UI components |
| Vite | Fast development & bundling |
| Socket.io | Real-time updates |
| TypeScript | Type safety |
| Service | Purpose |
|---|---|
| Retell AI | Voice agent (STT + LLM + TTS) |
| Google Gemini | Text chat AI + Copilot |
| Telnyx | Phone network & telephony |
| OpenAI | Vector embeddings (RAG) |
┌─────────────────────────────────────────────────────────────┐
│ CUSTOMER │
│ (Phone / Browser Chat) │
└─────────────────────────────────────────────────────────────┘
│
┌─────────────┴─────────────┐
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ VOICE CALL │ │ TEXT CHAT │
│ (Telnyx + │ │ (Gemini AI) │
│ Retell AI) │ │ │
└────────┬────────┘ └────────┬────────┘
│ │
└───────────┬───────────────┘
│
▼
┌─────────────────────┐
│ UNIFIED BACKEND │
│ (Node.js) │
│ │
│ • Session Manager │
│ • Copilot Engine │
│ • Switch Controller │
│ • Analytics │
└──────────┬───────────┘
│
┌────────────┴────────────┐
│ Socket.io │
└────────────┬────────────┘
│
▼
┌─────────────────────┐
│ AGENT DASHBOARD │
│ (React) │
│ │
│ • Live Transcript │
│ • Copilot Sidebar │
│ • Control Panel │
│ • Queue Management │
└─────────────────────┘
The Secret to Seamless Switching
Traditional call forwarding = drops the call
Our approach:
- Customer joins a digital conference room
- AI Agent joins (speaking)
- Human Rep joins (muted, listening)
- Switch = Mute/Unmute — No reconnection needed!
Result: Zero interruption, full context preserved
- Ultra-low latency (<500ms response time)
- Natural conversation — Handles interruptions, backchannels
- Utility-focused — Trained on billing, outages, payments
- Emergency detection — Gas leaks trigger immediate escalation
- Context-aware responses — Remembers conversation history
- Knowledge base integration — RAG-powered answers
- Dynamic switching — Customer can request human anytime
- Multi-turn conversations — Handles complex inquiries
- Real-time suggestions — Appears as conversation progresses
- Sentiment detection — Alerts when customer is frustrated
- Policy snippets — Quick reference for reps
- Knowledge search — Find answers in seconds
- One-click handoff — AI ↔ Human instantly
- Context preserved — Full transcript shared
- Customer-initiated — Say "speak to human"
- Agent-initiated — Take over complex cases
- Live metrics — Active calls, queue depth
- Switch tracking — AI vs Human resolution rates
- Performance — Average handle time, CSAT
- Real-time updates — via Socket.io
Primary Use Case: Specialized for utility customer service
| Scenario | AI Handles | Human Handles |
|---|---|---|
| Bill inquiries | ✅ Automatic | Complex disputes |
| Payment options | ✅ Automatic | Hardship cases |
| Outage reports | ✅ Automatic | Safety emergencies |
| Service changes | ✅ Automatic | Special requests |
| Account lookup | ✅ Automatic | Identity verification |
- Customer calls: "My bill is way too high!"
- AI Agent: Explains seasonal usage, offers comparison to last year
- Customer: "This is ridiculous, I want to speak to someone"
- AI Agent: "Of course, connecting you now..."
- Human takes over — Copilot shows:
- Customer sentiment: Frustrated
⚠️ - Suggestion: "Consider goodwill credit ($25)"
- Account history at a glance
- Customer sentiment: Frustrated
- AI handles appointment booking
- Humans handle medical questions
- HIPAA-compliant context sharing
- AI handles order status, returns
- Humans handle escalations, VIP customers
- Full order history in copilot
- AI handles balance inquiries, FAQs
- Humans handle fraud, complex transactions
- Compliance-ready audit trails
| Benefit | Impact |
|---|---|
| No wait times | AI answers instantly |
| 24/7 availability | Help anytime |
| Seamless escalation | Human when needed |
| Consistent quality | AI doesn't have bad days |
| Benefit | Impact |
|---|---|
| AI Copilot | Answers at their fingertips |
| Context on arrival | No "please repeat your issue" |
| Handle complex cases | AI filters easy ones |
| Reduced burnout | Focus on meaningful work |
| Benefit | Impact |
|---|---|
| 60-70% AI resolution | Dramatic cost savings |
| Improved CSAT | Faster resolution times |
| Scalability | Handle volume spikes |
| Analytics | Data-driven optimization |
| Compliance | Full conversation logs |
Traditional Contact Center:
100 agents × $45K/year = $4.5M
With AI Platform (70% AI resolution):
30 agents × $45K/year = $1.35M
+ AI platform = $XXX K
Annual Savings: ~$3M+ 💰
- Customer asks about bill
- AI provides detailed response
- Customer asks to speak to human
- Seamless handoff demonstrated
- Queue panel shows incoming chats
- Agent selects a conversation
- Copilot provides real-time suggestions
- Agent takes over from AI
- Customer mentions "gas smell"
- AI immediately provides safety instructions
- Auto-escalation to emergency team
- Copilot alerts: 🚨 CRITICAL
- Voice Web Calls — Browser-based voice using Retell WebRTC
- Customer Portal — Account self-service
- Mobile App — Agent dashboard on mobile
- Multi-language — Spanish, French support
- Predictive Routing — AI decides best agent for case
- Proactive Outreach — AI calls customers before they call you
- Training Mode — AI learns from human corrections
- Integration Hub — Connect to CRM, billing systems
- Video Support — Face-to-face when needed
- Sentiment-Based Pricing — Dynamic wait times
- AI Quality Assurance — Auto-review all conversations
- White-label Platform — Resell to other utilities
- Instant AI Response — No more hold music
- Seamless Human Backup — When complexity arises
- Context Preservation — Nothing lost in transition
- Agent Empowerment — Copilot makes reps superhuman
- Business Intelligence — Data on every interaction
"The best of AI and human service, working together in perfect harmony."
github.com/[your-org]/Customer-Service-App
- Backend: Node.js + TypeScript + PostgreSQL + Redis
- Frontend: React + Vite + Socket.io
- AI: Retell (Voice) + Gemini (Chat) + OpenAI (Embeddings)
- Telephony: Telnyx
Questions?
| Endpoint | Method | Description |
|---|---|---|
/api/chat |
POST | Send chat message |
/api/chat/switch |
POST | Switch AI ↔ Human |
/api/voice/web-call |
POST | Create voice call |
/api/copilot/search |
POST | Search knowledge base |
/api/analytics/dashboard |
GET | Get live metrics |
| Event | Direction | Description |
|---|---|---|
transcript:update |
Server → Client | New message |
copilot:suggestion |
Server → Client | AI suggestion |
call:state_update |
Server → Client | Mode changed |
call:request_switch |
Client → Server | Request handoff |
Intelligent AI Customer Service Platform