Project: AI Customer Support

Triage agent classifies incoming tickets by type and urgency → Specialist agents handle each category → Escalation agent routes tickets requiring human judgment.

Project: AI Support Team

What you'll build

A Paperclip support team that classifies, triages, and responds to support tickets — handling 80% autonomously and routing the rest to humans.

Company Blueprint

Company: AI Support Team
Monthly budget: $30
Target: <2 min response time, 80% automation rate

Agents:
1. Classifier    ($4)   — fast, cheap; labels ticket type + priority
2. Knowledge Bot ($6)   — answers from knowledge base (FAQ + docs)
3. Billing Agent ($6)   — handles refund/billing queries with policy rules
4. Technical Bot ($10)  — troubleshoots technical issues step-by-step
5. Escalator     ($2)   — formats handoff notes for human agents
6. QA Checker    ($2)   — validates response quality before sending

The Triage Flow

Ticket arrives (email/webhook)
     ↓
Classifier: {type: "billing|technical|account|abuse", priority: "low|medium|high|critical", confidence: 0.0-1.0}
     ↓
Router (deterministic, shell adapter):
  confidence > 0.85 → send to specialist agent
  confidence ≤ 0.85 → send to human queue
     ↓
Specialist Agent:
  produces draft response + {can_auto_send: boolean}
     ↓
QA Checker:
  can_auto_send=true + score ≥ 8: auto-send
  else: human queue with draft attached

Classifier System Prompt

You are a Support Ticket Classifier.

Classify the following support ticket. Output ONLY JSON:
{
  "type": "billing" | "technical" | "account" | "abuse" | "feature_request" | "other",
  "priority": "low" | "medium" | "high" | "critical",
  "confidence": 0.0 to 1.0,
  "summary": "one sentence description of the issue",
  "sentiment": "positive" | "neutral" | "negative" | "angry",
  "requires_human": boolean
}

Label as critical only if: data loss, security breach, payment fraud, or legal threat.

Router (Shell Adapter)

#!/usr/bin/env python3
import sys, json

data = json.loads(sys.stdin.read())
classification = json.loads(data.get('result', '{}'))

type_to_agent = {
    'billing':   'Billing Agent',
    'technical': 'Technical Bot',
    'account':   'Knowledge Bot',
}

if classification.get('requires_human') or classification.get('confidence', 0) < 0.85:
    print(json.dumps({'route_to': 'human_queue', 'reason': 'low_confidence'}))
elif classification.get('priority') == 'critical':
    print(json.dumps({'route_to': 'human_queue', 'reason': 'critical_priority'}))
else:
    agent = type_to_agent.get(classification.get('type'), 'Knowledge Bot')
    print(json.dumps({'route_to': agent, 'can_auto_route': True}))

Metrics Dashboard

SELECT
  date_trunc('day', i.created_at)                       AS day,
  COUNT(*)                                              AS total_tickets,
  COUNT(*) FILTER (WHERE i.metadata->>'auto_sent' = 'true') AS auto_resolved,
  ROUND(100.0 * COUNT(*) FILTER (WHERE i.metadata->>'auto_sent' = 'true')
    / NULLIF(COUNT(*), 0))                              AS automation_rate_pct,
  ROUND(AVG(EXTRACT(epoch FROM (i.resolved_at - i.created_at)) / 60))
                                                        AS avg_resolution_min
FROM issues i
WHERE i.company_id = (SELECT id FROM companies WHERE slug = 'ai-support')
GROUP BY day ORDER BY day DESC LIMIT 14;

Checkpoint ✓

Sign in for progress tracking & Q&A →