Use CaseMarch 17, 2026·8 min read

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.

How does the handoff work? When AI confidence drops below a configurable threshold, or the user requests to speak with a human, Citai automatically escalates the conversation. An agent claims the session using SELECT FOR UPDATE (no concurrency conflicts) and connects via real-time SSE.

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:

  1. AI detects low confidence — score is below the threshold (default 0.4)
  2. Escalation request is created — session moves to waiting state
  3. Agent receives notification — sees the conversation in their panel
  4. Claim with locking — the first agent to claim gets the session (SELECT FOR UPDATE prevents conflicts)
  5. 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

~85%of queries resolved by AI without human intervention
<3saverage AI response time
24/7availability with no additional staffing costs
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 eventstoken, sources, done, error, agent_joined
Live chat best practices:
  • 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 account