Skip to main content

Description

UI stream types configure which data a node streams to the user interface during execution. This controls what users see in real-time as the agent processes their query.

Syntax

Configure UI streaming via ui_stream_types on a node:
generate_response:
  type: ResponseGenerationStep
  ui_stream_types:
    generation: true
    retrievals: true
  input_mapping:
    retrievals: search#retrievals
    query: __inputs__#query

Supported Stream Types

Stream TypeDescription
RETRIEVALSSearch results and citations
GENERATIONLLM response text (streams as it’s generated)
QUERY_REFORMULATIONQuery transformations and expansions
ATTRIBUTIONCitation attribution data
GROUNDEDNESSGroundedness scores for the response

Example: Full Response Pipeline

nodes:
  search:
    type: SearchUnstructuredDataStep
    ui_stream_types:
      retrievals: true
      query_reformulation: true
    input_mapping:
      query: __inputs__#query

  generate:
    type: ResponseGenerationStep
    ui_stream_types:
      generation: true
      attribution: true
      groundedness: true
    input_mapping:
      retrievals: search#retrievals
      query: __inputs__#query

Multiple Nodes with Same Stream Type

Multiple nodes can have the same UI streaming type. Events stream sequentially in execution order:
nodes:
  research:
    type: AgenticResearchStep
    ui_stream_types:
      retrievals: true
    # ... config

  generate:
    type: GenerateFromResearchStep
    ui_stream_types:
      generation: true
    # ... config

Multi-Output Workflows

For workflows with multiple outputs, use ui_output at the root level to designate which output displays in the UI:
outputs:
  response: str
  metadata: Dict[str, Any]
  debug_info: str

ui_output: response

Default Behavior

Each step type has default UI stream types. Check the Step Reference Catalog for defaults. Common defaults:
Step TypeDefault Streams
SearchUnstructuredDataStepQUERY_REFORMULATION
ResponseGenerationStepRETRIEVALS, GENERATION, ATTRIBUTION, GROUNDEDNESS
AgenticResearchStepRETRIEVALS
GenerateFromResearchStepGENERATION