AI demo
Portfolio Assistant
A live, streaming chat assistant built on Claude Opus 4.8. Ask it anything about Kevin's experience and it answers in real time, grounded in the same résumé data that powers this site, through a Next.js Route Handler that streams tokens straight to your browser.
How it works
Streaming responses
A Next.js Route Handler opens a streaming connection to the Anthropic SDK and pipes tokens to the browser through a ReadableStream, so answers render word-by-word instead of after a long pause.
Grounded, not generic
The system prompt is built from the same résumé data that powers the rest of this site, so the assistant answers as a guide to Kevin's real background. It is also told not to invent employers, dates, or metrics.
Prompt caching
The large, unchanging system prompt is marked with cache_control, so repeat questions reuse the cached prefix. That is cheaper and faster than re-processing it on every turn.
Graceful degradation
With no API key configured, the same UI falls back to a keyword 'demo mode' over the résumé, so the feature works on a public deployment without exposing or spending a key.