Support Triage Lab
Paste a support ticket - category, priority, and draft reply via generateObject; Redis rate limit when available.
Run this experiment yourself
Demos are not embedded on this site. Deploy a standalone copy on Vercel or run the experiment app locally.
Local development
cd apps/experiments/support-triage-lab pnpm install pnpm dev
Then open http://localhost:3010.
This is an experimental demo. Use it as a starting point for your own projects.
Support Triage Lab turns a pasted ticket into { category, priority, reply } with generateObject. When Upstash Redis is configured it rate-limits requests; otherwise it skips the limit and shows a note. Missing AI keys return 503.
Features
- Ticket - triage – category, priority, draft reply.
- Redis rate limit – per-IP window when configured.
- Honest
503/429– no fabricated model output; clear limit errors.
Server Reference
POST /api/triage
{ "ticket": "..." }| Status | Cause |
|---|---|
503 | No AI provider |
429 | Rate limit exceeded |
400 | Empty ticket |
Implementation Details
Rate limit
Redis INCR + EXPIRE when available.
Triage
generateObject with Zod schema for category/priority/reply.
Use Cases
- Prototype support automation.
- Learn rate-limit + AI composition.
Limitations
- Heuristic categories are demo-scoped.
- No ticket persistence.
Use in your project
Copy handlers from apps/experiments/support-triage-lab/.
Deployment
Local Development
cd apps/experiments/support-triage-lab
pnpm install
pnpm devConfiguration
| Variable | Required | Purpose |
|---|---|---|
AI_GATEWAY_API_KEY | Yes (or OPENAI_API_KEY) | Triage |
UPSTASH_REDIS_REST_URL / TOKEN | No | Rate limit |
Vercel / Next.js Features Used
- AI SDK
generateObject - Upstash Redis
- Route Handlers
- Zod