System design
Multi-agent customer support
Design an AI support system for an e-commerce company that answers questions and can take actions such as order changes and refunds.
45:00
45 minutes in five phases. Talk out loud the whole time.
Ask first
Which channels (chat, email, voice), and what daily volume?
Which actions can the AI take, and up to what value?
When must a human take over?
Which languages?
Targets for containment, resolution time and CSAT?
Core design
Triage classifies intent, urgency and risk.
Specialist agents (orders, billing, technical) call backend systems through MCP tools.
A policy and FAQ knowledge base served through RAG.
An action layer with limits: small refunds auto-approved, larger ones sent to a human.
Handoff to a human with a summary and the full context.
Memory for the conversation and the customer’s history, with tracing and evals on every conversation.
Trade-offs to raise
One agent with many tools versus specialists.
Fixed workflows for risky actions versus agent freedom.
Response latency versus the number of agent hops.
Curveballs
Per-action limits, idempotency keys, approval above a threshold, a full audit trail and a way to reverse it.
Enforce policy inside the tools, not in the prompt. The model can ask; only the tool decides.
Containment and resolution rates, CSAT, the quality of escalations, and cost per conversation.
Numbers to state
Cost per conversation = turns × tokens per turn × price.
First response within 2 to 3 s at p95.