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

# Stream Run

> Stream an existing run's execution via SSE.

Attach to a run that was created without streaming (e.g. via the create
endpoint) to receive its events in real time. If the run has already
finished, a single `end` event is emitted. Use the `Last-Event-ID`
header to resume from a specific event after a disconnect.

A periodic SSE keepalive comment is sent every
``KEEPALIVE_INTERVAL_SECS`` so idle proxies don't drop attached streams.



## OpenAPI

````yaml /openapi.json get /threads/{thread_id}/runs/{run_id}/stream
openapi: 3.1.0
info:
  title: Aegra
  description: Production-ready Agent Protocol server
  version: 0.9.24
servers: []
security: []
tags:
  - name: Assistants
    description: A configured instance of a graph.
  - name: Threads
    description: Accumulated state and outputs from a group of runs.
  - name: Thread Runs
    description: Invoke a graph on a thread, updating its persistent state.
  - name: Stateless Runs
    description: Invoke a graph without state or memory persistence.
  - name: Crons
    description: Scheduled recurring runs on a cron schedule.
  - name: Store
    description: Persistent key-value and semantic storage available from any thread.
  - name: Event Streaming
    description: Agent Protocol v2 thread event streaming and commands.
  - name: Health
    description: Server health checks and service information.
paths:
  /threads/{thread_id}/runs/{run_id}/stream:
    get:
      tags:
        - Thread Runs
      summary: Stream Run
      description: |-
        Stream an existing run's execution via SSE.

        Attach to a run that was created without streaming (e.g. via the create
        endpoint) to receive its events in real time. If the run has already
        finished, a single `end` event is emitted. Use the `Last-Event-ID`
        header to resume from a specific event after a disconnect.

        A periodic SSE keepalive comment is sent every
        ``KEEPALIVE_INTERVAL_SECS`` so idle proxies don't drop attached streams.
      operationId: stream_run_threads__thread_id__runs__run_id__stream_get
      parameters:
        - name: thread_id
          in: path
          required: true
          schema:
            type: string
            title: Thread Id
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            title: Run Id
        - name: _stream_mode
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Override the stream mode for this connection.
            title: ' Stream Mode'
          description: Override the stream mode for this connection.
        - name: Last-Event-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Last-Event-Id
      responses:
        '200':
          description: Server-Sent Events stream
          content:
            application/json:
              schema: {}
            text/event-stream:
              schema:
                type: string
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentProtocolError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AgentProtocolError:
      properties:
        error:
          type: string
          title: Error
          description: Error type
        message:
          type: string
          title: Message
          description: Human-readable error message
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: Additional error details
      type: object
      required:
        - error
        - message
      title: AgentProtocolError
      description: Standard Agent Protocol error response
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````