Capstone 1: An AI Feature for a SaaS App
Add AI ticket triage to a help-desk app: classification, summaries, and drafted replies with structured outputs, evals, cost tracking, and a staged rollout.
Most AI features ship into an existing product, not a blank repo. There's already a database, a queue of real users, a support team with opinions, and a finance person who will ask what this costs. That's the setting for this capstone: you'll add AI ticket triage to Deskmate, the help-desk app we've used throughout the course, and take it all the way from first prompt to a staged rollout.
By the end you'll have a background pipeline that classifies every new ticket, writes a catch-up summary, routes it to the right team, and drafts a reply grounded in the help center, plus the parts that make it shippable: business rules in code, an eval suite that gates changes, a per-ticket cost ledger, and a rollout plan you can reverse in seconds.
What you'll build
When a customer opens a ticket, Deskmate will, within a few seconds and without anyone waiting on it:
- Classify the ticket into a category and priority.
- Summarize it into a headline and a list of distinct requests.
- Route it to a team, using rules you control in code.
- Draft a reply from matching help articles, for an agent to review and edit. Nothing is ever sent automatically.
Then you'll wrap it in the operational layer: a cost record for every model call, an eval runner with release gates, and a four-stage rollout (off, shadow, suggest, auto) controlled by configuration.
Customer creates ticket
│
▼
tickets ──insert──▶ ai_jobs (queued) same transaction
│
▼ worker claims job (FOR UPDATE SKIP LOCKED)
┌──────────────────────┐
│ triageTicket() │ Haiku 5.5, structured output
│ └─ applyRules() │ priority + team rules in code
├──────────────────────┤
│ draftReply() │ full-text search → Sonnet 5.5
│ └─ check article IDs│
└──────────┬───────────┘
▼
ticket_ai (results) ai_calls (tokens, cost, latency)
│
rollout mode decides: store only │ show suggestion │ auto-routeThis is deliberately a workflow, not an agent: the steps are fixed, each model call has one job, and your code decides what happens with the output. That makes it predictable, cheap, and easy to evaluate. If you're curious where the line sits, the Agent Builder Course has a good breakdown of agents vs. workflows; for triage, a workflow is the right tool.
You'll lean on earlier lessons rather than re-learn them: Classification, Tagging, and Routing, Summarization Features Users Trust, Structured Outputs in Practice, Background and Bulk AI Jobs, Code-Based Checks and Assertions, Understanding Your AI Bill, and Feature Flags and Gradual Rollouts for AI.