Live demo

AI Chat Widget

Drop-in chat component for any Next.js site. Streaming responses, prompt caching, and proper error handling out of the box.

Real-time streaming

Tokens render as they arrive — sub-second time-to-first-token via ReadableStream.

Prompt caching

System prompt cache_control is set — caches automatically once your context grows past 4K tokens.

Typed error handling

Rate limits, auth failures, and API errors surface as friendly messages, not stack traces.

Mobile responsive

Full-screen on phones, floating panel on desktop. Keyboard-friendly.

Try it

Click the chat bubble at the bottom right. Suggested prompts:

  • · What can you help me with?
  • · Explain prompt caching in 2 sentences.
  • · Write a TypeScript function that debounces a callback.
Powered by Claude · Next.js 14 · TypeScript · Tailwind