Intermediate9 min
Agents for Customer Support
Design patterns for production customer support agents: multi-tier routing, RAG knowledge bases, account action tools, HITL escalation, session memory, and satisfaction tracking.
Quick Reference
- →Multi-tier routing: triage → specialized handlers (billing, technical, general, escalation)
- →RAG knowledge base: product docs, FAQ, known issues — hybrid search + reranking
- →Account action tools: lookup, refund, ticket creation — gated by HITL for destructive ops
- →Customer memory: Store cross-session preferences, history, and interaction patterns
- →Escalation: interrupt() for human handoff when confidence is low or customer requests it
- →Metrics: resolution rate (>75%), CSAT (>4.0/5), escalation rate (<20%), AHT (<3 min)
Support Agent Architecture
| Layer | Component | Purpose |
|---|---|---|
| Input | Router (structured output classification) | Classify query type: billing, technical, general, escalation |
| Knowledge | RAG over product docs + FAQ | Answer product questions with citations |
| Actions | Account tools (lookup, refund, ticket) | Perform account operations with HITL gates |
| Memory | Store (cross-session per customer) | Remember preferences, history, past issues |
| Safety | PIIMiddleware + guardrails | Redact PII, block harmful requests |
| Escalation | interrupt() + human handoff | Transfer to human when needed |