Every SaaS is adding AI features in 2026. Most teams burn the first two weeks on the same five pieces of plumbing — none of which are the actual product. Here's each one, with working TypeScript for Next.js 15.
1. A streaming endpoint (not a blocking one)
Users won't stare at a spinner for 20 seconds. Stream tokens as they generate with server-sent events:
// app/api/chat/route.ts
const runner = anthropic.beta.messages.toolRunner({







