What Inspired Us

We've both spent time building agentic systems, and the part that kept breaking wasn't the AI. It was the moment the AI stopped.

Every time a Freddy AI agent hit a wall and escalated, the customer had to repeat their entire story to a human who received nothing but a raw chat transcript. We looked at the numbers: 83% of customers repeat themselves after AI-to-human transfer (Five9 2026). 90% of CX leaders admit they can't make handoffs smooth (Nextiva 2025). This isn't an edge case. It's the default failure mode of every AI support deployment.

Freshworks had invested heavily in Freddy AI's resolution capabilities, but the handoff was still one binary decision: I failed, here's the transcript.

We wanted to fix that specifically.


What We Built

HandoffIQ is a reusable Agent Handoff Skill for the Freshworks platform, a three-stage MCP-based middleware that makes every Freddy agent smarter at the one thing they're worst at.

Stage 1 - Trigger Engine

Instead of waiting for full failure, HandoffIQ evaluates six signals continuously across every conversation turn:

  • Confidence score dropping below threshold
  • Sentiment trajectory trending negative (not just current state)
  • Loop detection - same suggestion repeated
  • Domain drift - conversation shifted from original topic
  • Explicit escalation request from customer
  • Stake detection - money, legal, safety language

A weighted multi-signal score fires the handoff 2-3 turns before the customer reaches frustration, not after.

Stage 2 - Routing Engine

When the trigger fires, HandoffIQ doesn't just escalate. It matches the conversation's extracted intent and failure reason against a configurable registry of specialist agents and human teams using semantic similarity. A billing ticket that turned out to be a software bug routes to engineering, not billing.

Stage 3 - Context Packager

Instead of passing a 12,000-token raw transcript, HandoffIQ produces a 247-token structured handoff packet:

{
  issue_summary:       "Charged twice on order #4521, wants refund",
  detected_intent:     "refund_request > payment_error",
  customer_context:    "Enterprise | 3 billing tickets this quarter",
  sentiment:           "Frustrated, trending negative over 4 turns",
  attempt_1:           "PASS - confirmed duplicate charge exists",
  attempt_2:           "FAIL - gateway timeout on refund",
  attempt_3:           "FAIL - gateway timeout retry",
  handoff_reason:      "action_failed + loop_detected + sentiment_drop",
  routed_to:           "Billing Team (Human) | confidence 0.94",
  recommended_action:  "Process manual refund $49.99. Escalate gateway."
}

The full transcript stays available by reference. The receiver gets exactly what they need to act, nothing more.

ElevenLabs Voice Briefing

For AI-to-human handoffs, the structured packet feeds into an ElevenLabs Conversational AI agent that plays a 15-second voice brief to the human agent before the call connects. The agent hears the situation, the attempts, and the recommended action in their earpiece. They pick up and say:

"I can see you were charged twice for order 4521, let me process that refund right now."

The customer never repeats themselves.


How We Built It

HandoffIQ runs as a Freshworks Agent Studio MCP Skill, packaged as a platform primitive so any Freddy agent can invoke it.

Stack:

  • Freshworks Agent Studio + MCP Gateway
  • Node.js skill server with the Freshworks Developer SDK
  • Sentence-transformers for semantic routing
  • ElevenLabs Conversational AI API for voice brief generation
  • Redis for real-time signal state across conversation turns
  • Freshservice REST API as fallback for non-MCP environments

The Trigger Engine runs as a lightweight classifier on every agent turn, maintaining a rolling signal window in Redis. The Routing Engine uses a pre-embedded destination registry. Admins configure it in JSON, embeddings are computed at deploy time, and matching is a single cosine similarity call at runtime.


Challenges We Faced

MCP Gateway access was the first wall. The Freshworks MCP integration was still in Early Access, gated to Enterprise customers. We built a REST adapter that proxies Freshservice API calls through the same interface contract as MCP, so the skill works identically either way.

Signal weighting was harder than expected. The right threshold for "hand off now" shifts significantly by deployment context. An e-commerce support bot should weight sentiment heavily. An IT helpdesk should weight loop detection. We made the weights configurable per deployment with sensible defaults, rather than hardcoding a universal threshold that would be wrong for half the use cases.

Voice brief timing required careful orchestration. The ElevenLabs audio needs to be ready before the call connects, which meant starting generation the moment the routing decision is made. We added a speculative generation step that pre-renders the brief from the packet draft while routing confirmation is still in flight.


What We Learned

The handoff problem isn't one problem. It's three independent failures compounding each other: when to stop, where to go, what to pass. Fixing any one of them helps. Fixing all three is what makes the customer experience actually feel different.

The 247-token structured brief also turned out to be more useful than we expected, not just more efficient. The structure forces precision. You can't write "the AI failed" in a field that asks for root cause. That constraint improves the quality of the handoff before the human even reads it.


Impact

Deployed across a mid-size Freshworks customer with 1,000 escalations/month:

  • 83% reduction in customers repeating themselves
  • 35-45% faster resolution time on escalated tickets (Gartner 2025)
  • ~$40,000/year saved in handle time on escalated tickets alone

HandoffIQ is a platform primitive. Every agent on Freshworks gets smarter handoffs by adding one component.

Built With

  • agent
  • agents
  • ai
  • api
  • conversational
  • elevenlabs
  • freshservice
  • freshworks
  • gateway
  • language
  • mcp
  • multi-agent
  • natural
  • node.js
  • processing
  • redis
  • rest
  • search
  • semantic
  • sentence
  • studio
  • systems
  • transformers
  • voice
Share this project:

Updates

Submission history