Stream a run's events
Streams an agent run as Server-Sent Events (text/event-stream): the frames of its session’s telemetry that belong to the run, the model’s text as it streams (model_delta logs), and the run’s own events, live as the run runs. Each event’s id is its resume cursor, its event name is the frame kind (span or log), and its data is the frame JSON. The run’s events are logs: run_status (attribute axilio.run.status: running when the run starts on its phone or goes back to running), run_input_required (it paused for a person; the body is the question, with the input request’s id, reason, requested_by, response_schema and expires_at as attributes), run_resumed (a person answered; the body is the action), run_result (how it ended on the phone: axilio.ok, axilio.run.output or axilio.run.error, and the summary as the body), and user_message (a person’s message reached the run; the body is the message). The stream’s last event is a run_status with the run’s final status as the run itself has it (completed, failed or cancelled), so a run the caller cancelled ends cancelled. These events are not archived; the run itself has the result. A session started with telemetry off still streams its run’s events and the model’s text, and nothing else. A new reader (or one whose cursor is older than the live window) first receives the run’s archived frames and then the live ones, deduplicated on span id and phase, followed by an event with no data that carries the cursor the replay ended at. Reconnect with the Last-Event-ID header to resume. The model’s text is not archived: a reader that reconnects after it left the live window gets the step’s answer from the run’s steps instead. A comment line is sent every 15 seconds while the stream is idle. The stream closes after the run’s final status; a reconnect after the end with nothing left gets 204. A run that has not reached a phone yet streams only comments until it does. Authenticate with the API key header, or open the run’s stream_url, which carries a read-only token for the run’s session. Org-scoped: another org’s run reads as not found. Readers MUST ignore events with an unknown name, unknown fields, and unknown span_type or log_type values.
Authorizations
Customer API key (axl_ prefix).
Headers
Resume after this cursor (the id of the last event received).
Path Parameters
Run whose events to stream.
Query Parameters
Read-only token for the run's session, as carried by stream_url. Not needed with the API key header.
Response
The event stream. Each event's data is one frame.
- Option 1
- Option 2
One telemetry frame: a completed span or a log event, discriminated on kind. Forward-compatible raw JSON consumers should accept unknown fields within known kinds and treat unknown span_type/log_type values generically. Top-level unknown-kind handling varies by interface and SDK version; do not assume every generated SDK exposes an UnknownFrame variant. Live readers should accept either a single frame object or an array for forward compatibility; current first-party forwarding normally sends one frame object per message.
Frame kind discriminator; always "span" for span frames.
span Span name (for sdk_call spans, the SDK operation, e.g. Screen.observe).
Span phase. The archive returns completed spans only ("end"); "start" phases exist only on the live stream.
Telemetry span ID (16 lowercase hex characters). The live and archived copies of a span use the same ID.
Product span role: session (the session root), run, sdk_call, inference, file_push, media_capture. Spans stored before the 2026-08-21 vocabulary cutover carry the retired phone_session value for the session root. Unknown values MUST be rendered generically, never rejected.
Span start, nanoseconds since the Unix epoch.
Telemetry trace ID (32 lowercase hex characters), derived from the session ID; one session produces one trace.
Every attribute the producer stamped (axilio.* vocabulary), verbatim. Attributes are the contract's extension seam: new keys appear here without a version bump.
Span end, nanoseconds since the Unix epoch. Always set in the archive; omitted on the live stream's "start" phase, where the span is still in flight.
Parent span id; omitted on root spans.
Span outcome. Always set in the archive; omitted on the live stream's "start" phase, where the span has no outcome yet.