Neon Functions now support unlimited-duration streaming connections, letting AI agents keep a live channel open for seconds, minutes or longer without hitting the timeout limits that shut down most serverless workloads. The change matters for anyone building chat-style assistants or tool-using bots, because a broken stream stalls a conversation and ruins the user experience.
Why serverless and AI agents have been at odds
Most serverless platforms are built for quick, fire-and-forget tasks. They enforce hard execution caps—often 10 seconds on free tiers and 60 seconds on paid plans—to keep resources predictable. An AI agent, however, spends time thinking, calling external tools, and emitting tokens as they are generated. That “thinking” phase often stretches into tens of seconds, and the token stream can continue as long as the model produces output. When the platform’s timer expires, it closes the connection and the client sees a broken stream.
Neon’s answer: long-lived streaming by default
Neon Functions flips the script. A function call can stay open indefinitely, delivering data over WebSockets or Server-Sent Events (SSE) without any special configuration. The platform treats a long stream as a normal request, so developers write the logic that generates the stream and let Neon handle the rest.
In a recent test, two endpoints demonstrated the behavior:
- Heartbeat endpoint – the function emitted a “tick” once per second for 90 seconds. Typical serverless tiers would have terminated the request after 10 or 60 seconds; Neon kept the connection alive until the function finished on its own.
- Token-relay endpoint – the function streamed tokens from an AI model to the client as soon as each token was produced. Users saw the answer appear word by word instead of waiting for the entire block of text.
Both examples required only a single request from the client; no polling or keep-alive tricks were needed.
Who benefits, and who stays cautious
Teams building conversational assistants, tool-using agents, or any service that needs to push incremental results gain an immediate win: the timeout disappears. The result is simpler code, lower latency, and a smoother user experience.
The trade-offs are worth noting:
- Request-only model – Neon Functions handles streams that stay attached to an active request. Background jobs that must outlive the request still need a separate scheduler such as Inngest or a similar workflow engine.
- Cold starts – Functions that are idle can scale to zero, so the next request may incur a cold-start delay. An active stream prevents scaling down, but the first request after inactivity still pays the start-up cost.
What to watch next
The bottom line: Neon Functions removes the timeout ceiling that has long forced AI developers into workarounds. By letting a request stay open as long as the agent needs to think and talk, Neon makes streaming AI agents as simple to deploy as any other serverless function.
