> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ubik-agent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Streaming des événements de session

> Diffuse les événements Server-Sent (SSE) pour la session d'agent. Par défaut, diffuse la tâche actuelle ou la plus récente, en rejouant d'abord les événements passés.



## OpenAPI

````yaml /api-reference/openapi.fr.json get /agent-sessions/{session_id}/stream
openapi: 3.1.0
info:
  title: UBIK Public API
  description: Publicly accessible API endpoints for UBIK.
  version: '1.0'
servers:
  - url: https://app.ubik-agent.com/api/v1
    description: Production Server
security: []
paths:
  /agent-sessions/{session_id}/stream:
    get:
      tags:
        - Public API
        - Public API - Agent Sessions
      summary: Streaming des événements de session
      description: >-
        Diffuse les événements Server-Sent (SSE) pour la session d'agent. Par
        défaut, diffuse la tâche actuelle ou la plus récente, en rejouant
        d'abord les événements passés.
      operationId: session_events_stream_agent_sessions__session_id__stream_get
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Session Id
        - name: token
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Short-lived JWT token for authentication (alternative to header).
            title: Token
          description: Short-lived JWT token for authentication (alternative to header).
        - name: task_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              The ID of the task to stream. If omitted, streams the current or
              most recent task.
            title: Task Id
          description: >-
            The ID of the task to stream. If omitted, streams the current or
            most recent task.
        - name: include_chunks
          in: query
          required: false
          schema:
            type: boolean
            description: Whether to include partial content chunks in the stream.
            default: true
            title: Include Chunks
          description: Whether to include partial content chunks in the stream.
        - name: X-End-User-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-End-User-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-KEY

````