Neon ships Durable Streams, so an agent chat survives a refresh
A new package runs a resumable stream server inside a Neon Function, so a dropped connection or a page refresh no longer loses an in-progress AI response.
Neon shipped Durable Streams on 4 December. Normally an AI chat response streams over a single HTTP connection, so refreshing the tab or losing the connection mid-answer loses the rest of the output. Durable Streams gives each stream its own URL, backed by Postgres, Neon Realtime and Object Storage inside a Neon Function, so another tab, device or background worker can resume it from where it left off.
The new package is @neon/durable-streams on npm, and it ships with ready-made transports for the Vercel AI SDK and TanStack AI, so an existing useChat session can survive a refresh without extra plumbing. A starter scaffolds the whole thing in one command:
neon functions new durable-streams
Neon’s demo, published alongside the changelog, has you refresh the browser mid-response to watch the answer pick back up where it stopped.
Why it matters: teams building chat or agent UIs usually hand-roll this kind of resumability themselves, or just accept that a flaky connection drops the response. This makes it a drop-in package instead, as long as you’re already running on Neon.
The caveat: it only works if your Postgres, Realtime and Object Storage are all on Neon. It’s not a standalone library you can point at any database.