Skip to content
Back to full roadmap
topiccore

Streaming Responses

SSE / partial JSON — answer streams token-by-token, user sees output before the 10-sec wait.

2 hours2 resources1 prereqs

Server-Sent Events (SSE) push each token to the client immediately. UX revolution: a 30-sec answer starts rendering within 1 sec.

Implementation:

  • Backend: stream: true parameter
  • Frontend: EventSource or ReadableStream
  • Vercel AI SDK / LangChain streaming helpers

Structured streaming: parse partial JSON — Claude with stop_sequences + manual parse, OpenAI with response_format + partial schema validation. Zod streaming mode is mature on the TS side.

Prerequisites

Resources(2)