Streaming Is Not a UI Feature Anymore

Most agent frameworks treat streaming as a UX feature.

The model generates text, tokens arrive incrementally, and the user sees the answer appear faster.

That is useful — but in Mozaik, streaming has a different role.

In Mozaik, streaming is part of the runtime.

Mozaik is a TypeScript framework for building reactive agents inside a shared AgenticEnvironment. Participants — humans, agents, tools, observers — do not just wait for a final answer. They emit and react to semantic events as they happen. The framework is built around participants observing typed events in real time instead of being coordinated by a central scheduler. (reactive agents post)

That changes what “streaming” means.

When an agent is producing output, that stream can be exposed as semantic events. Another participant can listen to those events while inference is still running:

agent.ts
async onInternalEvent(event: { type: string; data: unknown }) {
if (event.type === 'response.output_text.delta') {
process.stdout.write(String((event.data as { delta?: string }).delta ?? ''));
}
}
async onExternalEvent(
source: Participant,
event: { type: string; data: unknown },
) {
// Same SemanticEvent shape when another participant is streaming.
}

Caption:

A Mozaik agent can listen to both its own provider stream and streams coming from other participants through the same semantic event shape.

This is the key idea:

Streaming is no longer just “show tokens as they arrive.”

It becomes a live signal inside the agent environment.

Once streams are events, other participants can react before the final model response exists. That opens up a much more interesting design space:

1. Inference interception

A participant can observe another agent’s stream and step in while the answer is still being generated.

For example, an observer can detect that the model is drifting, producing unsafe output, leaking implementation details, or going in the wrong direction — and react before the entire response completes.

That reaction could be:

intercept.ts
if (shouldIntercept(event)) {
await source.abort();
await reviewerAgent.respond("Stop. The current direction is wrong.");
}

That is runtime intervention, not passive streaming. A participant watches inference as it happens and can stop or redirect it before the response completes. In this run, a safety reviewer aborts a planner mid-stream and starts corrective inference:

Console output: planner stream events, safety reviewer aborting the planner, then corrective inference
Inference interception: another participant can observe a live inference stream and decide to intervene before completion.

2. Abort and redirect

If streaming is part of the environment, cancellation becomes a runtime behavior, not just a user clicking “stop.”

An agent can abort another process because it has enough information already.

Examples:

A guard participant stops an answer that violates project rules.
A planner stops a worker agent because the implementation path is wrong.
A cost controller stops a long-running inference once the answer is clearly not useful.
A human participant interrupts an agent and redirects the task.

This matters because most agent systems only evaluate outputs after the model finishes. By then, tokens, time, and tool calls may already be wasted.

3. Live handoff between agents

Streaming events also make handoff more natural.

Imagine a coding agent starts explaining an implementation. While it streams, a reviewer agent notices that the task touches database migrations. The reviewer does not need to wait for the final response. It can join the flow immediately:

“I see this is becoming a schema-change task. Hand this to the database agent.”

In a reactive system, behavior emerges from participants reacting to the environment. Mozaik’s newer framing is exactly this: agents declare what they care about and respond when those events appear. (reactive agents post)

4. Observability while the system is thinking

Streams can also become a debugging surface.

Instead of only logging final messages, you can watch the live semantic flow:

Model output deltas.
Reasoning events.
Function calls.
Tool results.
Messages from other participants.

That gives developers a way to understand not just what the agent answered, but how the agent system behaved while the answer was forming.

5. Multi-agent collaboration without a central pipeline

This is where streaming fits naturally into Mozaik.

Mozaik is not designed around one rigid pipeline where step A finishes, then step B starts, then step C validates. It is designed around participants sharing an environment and reacting to typed events concurrently. Earlier Mozaik posts describe this as humans, agents, observers, and tools collaborating inside an AgenticEnvironment by emitting and reacting to typed context items in real time. (Agentic Environment post)

Streaming becomes the heartbeat of that environment.

Every partial output can be observed.
Every participant can decide whether it cares.
Every reaction can happen while the system is still alive.

That is the difference between token streaming and reactive streaming.

Token streaming improves the interface.

Reactive streaming changes the runtime.

For Mozaik, this means features like inference interception, abort, redirect, handoff, live monitoring, and policy enforcement are not bolted on top of the framework.

They fall naturally out of the architecture.

A stream is just another semantic event.

And once agents can react to streams, they can collaborate while inference is still happening.

Miodrag Vilotijević

Miodrag Vilotijević

Co-founder @ JigJoy

Building the future of agentic systems

To answer the question of what is going to happen next, we need to work out what has already happened; that is, to understand where we will be tomorrow, we need to understand what it was that got us to where we are today.