close

IQ-Stream · one job, done properly

Stream LLM tokens.
Nothing else.
Better than anything else.

IQ-Stream is a streaming server built for one job: carrying the tokens of an LLM answer from your application backend to your users’ browsers, in real time.

On the same CPU, it delivers 17 to 85 times as many events as the best-known event broadcasting servers.

Works with

  • Neuron AI
  • LangChain
  • LangGraph
  • Mastra
  • Agno
  • CrewAI
  • LlamaIndex
  • Haystack
  • Vercel AI SDK
  • AG-UI
  • CopilotKit
Official libraries →

2,500

Concurrent agent runs on one vCPU

161,917/s

Peak events per second on one vCPU

0

Events lost on reconnect

Two shapes of real-time traffic

Agent streaming is not event broadcasting.

Broadcasting an event and streaming an agent’s answer look like the same job: pushing data from the server to the browser, in real time. But a broadcasting service sends small, occasional events from one publisher to many subscribers, while an agent sends a dense, continuous flow of tokens to a single subscriber, sometimes for minutes. The two shapes are almost mirror images.

Pusher, Laravel Reverb, Soketi and Mercure were built, and priced, for the left column. Put an agent through them and it shows, all at once: in the bill, in the CPU graph, and in answers that freeze, then land as a wall of text. IQ-Stream was built from the right column.

Event broadcastingAI agent streaming
For exampleA live football score: one small event, to 10,000 viewers at onceAn agent’s answer: about 70 tokens a second, to one user, for minutes
Fan-outOne event reaches many browsersOne stream reaches one browser, rarely more
FrequencyOccasional eventsDozens of events per second, without pause
Event sizeSmall and predictableFrom a few bytes (a token) to tens of KB (a tool result)
LifecycleIndependent events, with no beginning or endA session, with a start and an end
A missed eventUsually harmless: the next update replaces itA hole in the middle of a sentence
Read why they need different infrastructure →

What IQ-Stream is

Doing one thing is what makes it fast.

IQ-Stream is a streaming server specialized in a single task: relaying LLM output from application backends to browsers. Its central idea is the stream: one answer from one agent, with a beginning and an end.

  1. Publish

    Your agent runs in a queue worker, with no browser attached. It sends each chunk of model output to IQ-Stream as it arrives, over one plain HTTP request per answer, from any language: no request per token, no batching.

  2. Fan out

    IQ-Stream fans it out to the browsers watching that answer over Server-Sent Events, the standard the browser already knows. The built-in EventSource is the whole client.

  3. Replay

    While the answer is being generated, IQ-Stream keeps it in memory, so any browser that reconnects resumes exactly where it left off. When it ends, IQ-Stream drops it: your database stays the source of truth, as it already is.

Official libraries

Ready for the framework you use.

For PHP, JavaScript and Python, an official library signs the tokens, holds the connection while the model writes and closes each answer for you. Its adapters publish the runs of the most used agent frameworks in a few lines.

  • PHP

    composer require neuron-core/iq-stream-php

    Tokens, tickets and a publisher for PHP 8.1 and later, with no dependencies.

    Built into

    • Neuron AI
    GitHub repository →
  • JavaScript and TypeScript

    npm install @neuron-core/iq-stream

    Tokens, tickets and a publisher for Node.js backends, used directly or through an adapter.

    Adapters for

    • LangChain JS
    • LangGraph.js
    • Mastra
    GitHub repository →
  • Python

    pip install iq-stream

    Tokens, tickets and a publisher, in synchronous code or asyncio, used directly or through an adapter.

    Adapters for

    • LangChain
    • LangGraph
    • Agno
    • CrewAI
    • LlamaIndex
    • Haystack
    GitHub repository →
  • In the browser

    npm install @neuron-core/iq-stream

    Optional: a subscriber that tells your page how each answer ended, and bridges that plug the stream into your chat UI.

    Bridges to

    • Vercel AI SDK
    • AG-UI
    • CopilotKit
    The package on npm →

Stream replay

The connection will drop. The answer won’t.

Mobile users change networks. Laptops sleep. Corporate proxies cut idle connections. On a ten-second answer, some of your users will lose their connection mid-stream every day.

With IQ-Stream, the browser simply reconnects, and IQ-Stream replays exactly the tokens it missed, then continues live. No gaps, no repeats, nothing for your frontend or backend to rebuild. The browser’s standard EventSource does it on its own: it reconnects and tells IQ-Stream the last event it received.

0

Events lost on reconnect

In the benchmark, one browser in ten lost its connection mid-answer. At 4,100 concurrent runs, 4,801 browsers reconnected, and every one of them got back every event it had missed: 0 events lost.

Why it matters for AI products

Built-in streaming replay.

Experience

The experience users expect, out of the box.

Replay is built into the server: an answer that loses its connection simply continues where it stopped, without you building anything.

Code

No reconnection logic to build.

No buffering tokens in Redis, no “resume from offset” endpoints, no client-side state machines.

Support

Fewer complaints about a UI that keeps breaking.

Users can switch between chats and see their agents pick up exactly where they left off.

A complete contract for every answer.

Replay is only half of it. IQ-Stream also guarantees that every browser learns how the answer ended, even one that reconnects too late.

  • Every event, whole, in order, exactly once.

    All browsers watching an answer see the same events in the same order. Tool results of up to 128 KiB, depending on the plan, arrive in one piece: nothing to split in your worker, nothing to reassemble in the browser.

  • A clear ending.

    Each browser receives a final signal: the answer finished, or it failed and why.

  • An honest “it’s over”.

    A browser that comes back after the answer ended is told so right away, and loads the final result from your backend, instead of hanging or showing half an answer.

  • Connect in either order.

    The browser can follow an answer before your worker starts writing it, or after. Either way it gets every event from the first one: no subscription race to lose the opening tokens to.

  • Slow devices never slow down others.

    Each browser is served at its own pace. A slow phone never holds back the other viewers, and is never dropped for being slow.

  • Connections stay alive while the model thinks.

    Regular heartbeats keep proxies and load balancers from closing a stream while an agent waits on a tool.

Specialized, not general purpose

Why broadcasting servers can’t replay at full speed.

Broadcasting servers have channels, or topics, which live indefinitely, and events, which are delivered and forgotten. They have no idea where an answer begins or ends, so a browser that comes back has nothing to catch up from, unless every event also goes into a history.

When a browser reconnects mid-answer

IQ-Stream

Resumes from the exact event it missed, from memory, at full speed: up to 161,917 events/s on one vCPU.

Mercure, Laravel Reverb, Soketi (default)

Keep nothing. The browser loses everything sent while it was away: about 51 events of a 429-event run in the benchmark, the middle of the answer.

Mercure with history

Can resume, but writes every event to a database file before relaying it. It never passed 463 events per second, and at just 100 concurrent runs its p99 latency was 57 seconds. And the conversation stays in that history for as long as it is kept: one more place to secure, and to declare in your privacy policy.

Broadcasting servers make you choose: speed without replay (expensive), or replay without speed (even more expensive).

IQ-Stream keeps every running answer in memory, for as long as it is being written and no longer, so replay costs nothing on the hot path: no disk, no database, no broker, and no conversation log to keep. That is how it resumes a browser within milliseconds of reconnecting while relaying over a hundred thousand events per second on a single vCPU.

Broadcasting vs streaming, measured →

When broadcasting is still the right choice

Notifications, presence and live dashboards, where one event reaches many browsers, are what broadcasting services do best, and IQ-Stream doesn’t try to replace them. Many apps run both: a broadcaster for what happens around the chat, IQ-Stream for the agent’s answers.

Performance and scalability.

IQ-Stream is one process that puts every CPU of the machine to work, and scales with them.

161,917/s

Peak events relayed on one vCPU

9µs

CPU per event, without TLS

220,744/s

Peak events relayed on two vCPUs

23×

What Mercure, the fastest of the others, moved on the same vCPU

See the full benchmark →

One endpoint for any language

One endpoint. Any language.

Deliver the agentic experience your users expect.

IQ-Stream is the streaming layer AI products should have had from the start: built for tokens, fast on a single CPU, resilient to every dropped connection, and ready to host one app or thousands.