UGDSAI 29 · Problem 9 · Group 9

SupportEscalator

A LangGraph support-ticket agent that resolves routine SaaS tickets automatically and pauses for a human supervisor when policy, sentiment, or unresolved work demands escalation.

Human-in-the-Loop + Conditional Routing for high-volume SaaS support operations

Team

Divyam Jindal · Bhanu Uday · Ishaan Bansal · Harman Manik

LangGraphPydantic v2Streamlit30/30 tests
Segment 1 · Problem framing

Mosaic Cloud needs faster support without unsafe automation.

2,000+
tickets per day
Volume from the brief
40%
current unassisted
Starting point
75%
target auto-resolution
Business goal
$200+
refund approval gate
Supervisor threshold

The risk is not just slow support. It is sending routine work to humans while risky refunds, angry customers, and unresolved bugs do not get structured human review.

Segment 1 · User and KPIs

The user is a support operations lead.

Jobs to be done

  • Resolve routine tickets in seconds.
  • Escalate risky tickets with evidence.
  • Preserve an audit trail for supervisor review.
  • Measure whether automation is behaving correctly.

KPIs from the brief

  • Auto-resolution rate: target 75%.
  • Mean time to resolution.
  • CSAT by category.
  • Escalation appropriateness.
  • Refund exposure routed to supervisors.
Segment 2 · Solution overview

One graph, four specialist paths, one escalation gate.

01 Ticket input
Customer issue
Message, title, account id, requester email.
02 Classify
Choose route
Bug, billing, feature, or general.
03 Sentiment
Score risk
Frustration score influences escalation.
04 Solve
Use tools
KB search, account lookup, refund calculation.
05 Escalate
Pause if risky
Angry tone, refund threshold, unresolved attempt.
06 Respond
Compose reply
Customer response plus ticket metadata.
Segment 2 · LangGraph architecture

The required graph pattern is explicit.

classifiersentiment_monitorbug_solverbilling_solverfeature_solvergeneral_solverescalation_gateinterrupt() for supervisorresponse_composer

Committed at assets/support_escalator_graph.svg

Why this fits LangGraph

  • Conditional edges route by category.
  • interrupt() creates a real human checkpoint.
  • SqliteSaver persists paused runs.
  • Pydantic state makes transitions inspectable.
Segment 2 · Typed state

The state schema is the product contract.

State fieldWhy it matters
ticketOriginal customer issue.
categoryControls the conditional route.
resolution_attemptsAudit trail of solver outputs.
sentiment_scoreRisk signal for escalation.
supervisor_inputHuman decision used on resume.
final_responseCustomer-facing output.

Engineering proof

  • OpenAI structured output for classifier and sentiment.
  • Deterministic fallback when no API key is set.
  • UI normalization prevents Pydantic/dict shape crashes.
  • Checkpoint tests verify pause and resume behavior.
30 / 30 tests6 evaluation cases
Segment 3 · Demo flows

The demo proves all required behaviours.

1. Password reset

General ticket resolves automatically.

Routegeneral_solver
EscalationNone
OutcomeFinal response ready

2. Duplicate billing

Refund exceeds the supervisor threshold.

Routebilling_solver
Trigger$499 refund above $200
OutcomeInterrupt and resume

3. Angry upload bug

Tone and unresolved bug create risk.

Routebug_solver
TriggerSentiment at least 0.67
OutcomeSupervisor guidance included
Segment 4 · Evaluation and results

Evaluation covers the required behaviours.

30/30
tests passing
Verified test suite
6
evaluation cases
Representative scenarios
4
solver routes
Bug, billing, feature, general
3
escalation triggers
Sentiment, refund, unresolved
Representative caseExpected behaviourEvidence
Password resetGeneral route, no interrupt.Graph test
Duplicate billingBilling route, refund interrupt, resume.Graph test
Angry upload bugBug route, sentiment interrupt.Graph test
Unknown accountUnresolved billing escalates.Evaluation suite
Segment 4 · Streamlit operations console

The UI lets evaluators exercise the pattern directly.

Customer and agent workspace

  • Ticket intake and demo queue.
  • Customer/account snapshot.
  • Resolution timeline and solver evidence.
  • Final response copy/download.

Supervisor and manager workspace

  • Pending escalation reason.
  • Refund exposure and account context.
  • Approve or reject with guidance.
  • Analytics for resolution and escalation trends.
Segment 4 · Bonus coverage

Bonus coverage and roadmap.

Completed bonus coverage

  • LangSmith tracing setup via environment variables.
  • Evaluation framework with six representative cases.
  • Prompt iteration documented in README.
  • Supervisor-ready escalation summary.

Production roadmap

  • SLA timers and breach-triggered escalation.
  • Zendesk sandbox adapter for ticket ingest.
  • Multilingual response drafting.
  • Postgres checkpointer and supervisor assignment queue.
Segment 4 · Risks and learnings

Reliability risks were addressed.

Risk discovered

  • Mixed Pydantic and dictionary payloads can break dashboards.
  • Memory-only state would make interrupted workflows fragile.
  • External graph rendering can be unreliable in restricted environments.

Mitigation shipped

  • Added UI state normalization and regression tests.
  • Switched default graph persistence to SqliteSaver for durable resume.
  • Shipped a stable SVG diagram artifact in the repository.
Segment 5 · Close + Segment 6 · Q&A

SupportEscalator is ready for review.

Our prototype shows how Mosaic Cloud can move routine support work toward the 75% auto-resolution target while preserving human control for refunds, angry customers, and unresolved technical issues.

What we are submitting

  • Working LangGraph agent with conditional routing and supervisor interrupts
  • Streamlit ticketing console with customer, supervisor, analytics, and architecture views
  • Persistent checkpointing, LLM-backed classification/sentiment, and deterministic fallback
  • Architecture SVG, business memo, PDF deck, demo script, and 30 passing tests

Discussion themes

  • Why this problem needs LangGraph instead of a single chatbot
  • How supervisor approval changes the final customer response
  • How KPI tracking supports support-ops decisions
  • How the design scales with real KB data and helpdesk integrations
Deck: divyamjindal.github.io/deploying-ai-agents-exam/deck/ 30 / 30 tests Repository: GitHub public