Stream session output in real time

Changed on

Server-Sent Events stream of session transcript updates. Streams turns (conversation format), raw messages (JSONL format), or structured messages based on the format query parameter. Emits activity and pending events for tool approval prompts.

get/v0/city/{cityName}/session/{id}/stream

Request

  • The document declares no server URL.
  • Auth: none declared

Path parameters

cityNamestring required

City name.

idstring required

Session ID, alias, or runtime session_name.

Query parameters

format'conversation' | 'raw' | 'structured'

Transcript format: conversation (default), raw, or structured.

include_thinkingboolean

Include thinking block text and signature in structured stream frames. Defaults to false; both are redacted otherwise.

after_cursorstring

Opaque structured transcript resume cursor from the REST snapshot. Last-Event-ID takes precedence on automatic SSE reconnect.

Headers

Last-Event-IDstring

Opaque structured transcript resume cursor from the last received SSE frame. Takes precedence over after_cursor.

Response

OK

Changes

    • ▲

      the query request parameter format was restricted to a list of enum values

    • ▲

      added subschema #5: Event pending_cleared subschema #6: Event structured to the response property oneOf list for the response status

    • ▲

      the // response's property type changed from integer to string for status

    • ▲

      the // response's property type changed from integer to string for status

    • ▲

      the // response's property type changed from integer to string for status

    • ▲

      the // response's property type changed from integer to string for status

    • ▲

      the // response's property type changed from integer to string for status

    • ○

      added the new optional header request parameter Last-Event-ID

    • ○

      added the new optional query request parameter after_cursor

    • ○

      added the new optional query request parameter include_thinking

    • ○

      added the new enum value conversation to the query request parameter format

    • ○

      added the new enum value raw to the query request parameter format

    • ○

      added the new enum value structured to the query request parameter format

    • ○

      added the optional property //// to the response with the status

    • ○

      added the optional property //// to the response with the status