API reference

Parse response streams by `data.type`.

HarnessRouter streams Server-Sent Events in an OpenAI Responses-style wire format with `data:` frames only.

Wire format

There are no event: lines. Every frame arrives as a default SSE message, and the event name is the type field inside the JSON payload.

First frame
data: {"type":"response.created","sequence_number":0,"response":{"id":"resp_...","status":"in_progress","metadata":{"session_id":"hsess..."}}}

Important events

response.created
Save response.id and response.metadata.session_id immediately.
response.output_text.delta
Append visible answer text.
response.output_item.added
Show sanitized tool or activity progress.
response.completed
Finalize successful UI state.
response.incomplete
Show partial result and offer Continue when appropriate.
response.failed
Show the classified failure or cancellation state.