Streaming
With stream: true, execAgent answers with newline-delimited JSON: one object per line, written as the run produces it.
The stream
The response has content type application/x-ndjson. Each line is a JSON object with a type and, for most types, a value:
| type | value | When |
|---|---|---|
progress | A short string | Each progress command, as it runs. |
data | One output part: text, html or image | Each part the agent appends to its output, including the streamed text of an llm command. |
trace | traceType, and a value with path, duration and message | Only on validateDraftStream: the execution trace, one line per event. |
agent | The same object a non-streaming call returns, without output | Once, when the run ends. Carries resultCode, convid and askInput. |
noop | none | A heartbeat while nothing else is happening, so that proxies keep the connection open. The interval is the stream heartbeat in Runtime limits. |
end | none | The last line. |
{"type": "progress", "value": "Looking up the forecast"}
{"type": "data", "value": {"contentType": "text", "text": "Tomorrow in Boston: "}}
{"type": "data", "value": {"contentType": "text", "text": "sunny, high of 24°C."}}
{"type": "agent", "value": {"success": true, "resultCode": "success", "convid": "…", "agentName": "weather"}}
{"type": "end"}Assemble the output by appending the data parts in order. Read resultCode and askInput from the agent line; an ask is answered exactly as in a non-streaming call.
Stopping a run
Closing the connection stops the agent. The run is recorded with the result code stopped, and the conversation keeps the state it had before the run. The GUI's stop button does nothing more than this.
When to stream
Stream when a person is watching: the first output appears as soon as the agent produces it, and progress messages show that a long call is still working. Do not stream from a scheduler or a pipeline step; a single response is simpler to handle and carries the whole output.

