Live Chat: How AI and Human Agents Work Together in Citai
Citai Team
March 17, 2026 · 8 min read
Why Do You Need a Hybrid Approach?
AI is incredibly efficient for repetitive questions and documentation-based queries. But there are moments when a customer needs human empathy, negotiation, or context that no model can provide. Citai’s hybrid approach combines the best of both worlds.
Automatic Escalation by Confidence
Citai calculates a confidence score for every response. If the score falls below the threshold defined in your knowledge base configuration, escalation triggers automatically:
- AI detects low confidence — score is below the threshold (default 0.4)
- Escalation request is created — session moves to
waitingstate - Agent receives notification — sees the conversation in their panel
- Claim with locking — the first agent to claim gets the session (SELECT FOR UPDATE prevents conflicts)
- Real-time chat — agent and user communicate via SSE streaming
Session States
Each widget session goes through well-defined states:
| State | Description | Who responds |
|---|---|---|
active |
Normal conversation with AI | AI automatically |
waiting |
Escalated, waiting for agent | No one (waiting message) |
claimed |
Agent connected | Human agent |
resolved |
Conversation closed | No one |
AI vs Hybrid vs Human Only
| Aspect | AI Only | Hybrid (Citai) | Human Only |
|---|---|---|---|
| Speed | Instant | Instant + wait if escalated | Depends on availability |
| Cost per query | ~$0.01 | ~$0.01 (AI) / ~$5 (human) | ~$10-25 |
| Empathy | Limited | AI + human when it matters | High |
| Scalability | Unlimited | Unlimited for AI, limited for humans | Limited |
| Availability | 24/7 | 24/7 (AI) + business hours (human) | Business hours |
Real-Time SSE Streaming
Both AI and human agents use Server-Sent Events (SSE) to communicate with the widget. This means:
- Token-by-token responses — the user sees the answer form in real time
- No polling — persistent connection, no wasted resources
- Typed events —
token,sources,done,error,agent_joined
- Set the confidence threshold between 0.3 and 0.5 to balance automation and quality
- Define human support hours — outside hours, AI captures data and notifies via webhook/email
- Train your knowledge bases first: the better your documentation, the fewer escalations you'll need
- Use the RAG Playground to identify low-confidence questions and add FAQs to cover them
When to Use Each Mode?
- AI Only: Technical documentation, product FAQs, basic 24/7 support
- Hybrid: E-commerce (returns, negotiation), SaaS (complex onboarding), healthcare (triage + specialist)
- Human Only: Enterprise sales, legal situations, emergencies
Conclusion
The hybrid approach isn’t a compromise — it’s the optimal strategy. Citai lets AI handle 85% of routine queries while reserving human intervention for the moments that truly matter. The result: reduced costs, instant response times, and satisfied customers.
Set up live chat with automatic escalation in minutes. Try Citai free →
Try Citai for free
Create your intelligent knowledge base in minutes. No credit card required.
Create free accountRelated articles
Smart Escalation: When AI Should Hand Off to a Human
How to configure confidence-based, manual, and schedule-based escalation. Webhooks with full context to Slack, email, or Zendesk.
Read article → ProductEmbeddable Chat Widget: From Zero to Production in 5 Minutes
Install an AI assistant on your website with one line of code. Shadow DOM, SSE streaming, themes, pre-chat forms, and smart escalation.
Read article → Use CaseAI for E-commerce: Automate Product, Shipping, and Returns Support
Complete use case: how an online store can resolve 90% of queries automatically with AI and cut support costs.
Read article →