This site is not affiliated with or endorsed by Vercel, Inc. Read the docs, then deploy or run each experiment yourself.
AI

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": "..." }
StatusCause
503No AI provider
429Rate limit exceeded
400Empty 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

Deploy on Vercel

Local Development

cd apps/experiments/support-triage-lab
pnpm install
pnpm dev

Configuration

VariableRequiredPurpose
AI_GATEWAY_API_KEYYes (or OPENAI_API_KEY)Triage
UPSTASH_REDIS_REST_URL / TOKENNoRate limit

Vercel / Next.js Features Used

  • AI SDK generateObject
  • Upstash Redis
  • Route Handlers
  • Zod

Next Steps

On this page