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

# Stream a run

> Opens an SSE connection to an already-started run. Replays events from the `Last-Event-ID` header (or from offset 0 if absent), then blocks for new events until the run reaches a terminal state (`done`/`error`/`cancelled`) or the client disconnects.

Supports multi-device watching: multiple simultaneous connections to the same `runId` all receive the same event sequence from the shared Redis Stream.

**Requires:** `workflows:read`



## OpenAPI

````yaml https://api.getmodus.com/openapi.json get /agent/v1/runs/{runId}/stream
openapi: 3.0.3
info:
  title: Modus Public API
  version: 1.0.0
servers: []
security:
  - bearerAuth: []
tags:
  - name: Scopes
    description: Create, configure, deploy, and manage scopes.
  - name: Scopes · Conversations
    description: Read scope conversation threads.
  - name: Scopes · Supervision
    description: Scope supervision sub-resource.
  - name: Scopes · Memories
    description: Long-term memory stored per scope.
  - name: Scopes · Chat
    description: Chat with a published scope.
  - name: Scopes · Context
    description: Compose a scope’s context without an LLM call.
  - name: Modus · Chat
    description: Chat with Modus — your org-wide assistant.
  - name: Modus · Conversations
    description: Read Modus and cross-scope conversation threads.
  - name: Modus · Context
    description: Compose full-environment context without an LLM call.
  - name: Workflows
    description: Create, configure, deploy, and manage workflows.
  - name: Workflows · Runs
    description: Inspect workflow run history.
  - name: Workflows · Interfaces
    description: Slack / MCP / Teams interface management.
  - name: Connections
    description: Read connected integrations.
  - name: Tools
    description: Catalog of tools/integrations a scope can select in its toolset.
  - name: Suggestions
    description: Approved suggested questions and first-party suggestion usage events.
  - name: Context
    description: Create and manage organization context items.
  - name: Usage
    description: Organization LLM usage reporting.
  - name: Users
    description: Organization and membership management.
  - name: Runs · Streaming
    description: 'Run lifecycle: stream, poll, resume, interrupt, and cancel executions.'
  - name: Scopes · Runs
    description: Run a published or draft scope.
  - name: Modus · Runs
    description: Run the Modus home agent.
paths:
  /agent/v1/runs/{runId}/stream:
    get:
      tags:
        - Runs · Streaming
      summary: Stream a run
      description: >-
        Opens an SSE connection to an already-started run. Replays events from
        the `Last-Event-ID` header (or from offset 0 if absent), then blocks for
        new events until the run reaches a terminal state
        (`done`/`error`/`cancelled`) or the client disconnects.


        Supports multi-device watching: multiple simultaneous connections to the
        same `runId` all receive the same event sequence from the shared Redis
        Stream.


        **Requires:** `workflows:read`
      operationId: RunLifecycleController_stream
      parameters:
        - name: runId
          required: true
          in: path
          description: Run identifier returned by POST /agent/runs.
          schema:
            type: string
        - name: Last-Event-ID
          in: header
          description: >-
            Resume cursor. Set to the `id` field of the last received SSE frame
            to replay only new events. Omit (or set to "0") to replay the full
            event history from the start.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: SSE stream of run events from the requested cursor onward.
          content:
            text/event-stream:
              schema:
                type: string
                description: >-
                  W3C Server-Sent Events stream. Same frame format as POST
                  /agent/runs. Ends with a terminal RunEvent
                  (done/error/cancelled).
              example: |+
                id: 1717000000002-0
                data: {"type":"token","content":" world"}

                id: 1717000000003-0
                data: {"type":"done","runId":"abc-123"}

        '404':
          description: Run not found or does not belong to the authenticated org.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto1'
      security:
        - bearerAuth: []
      servers:
        - url: https://agent.getmodus.com
components:
  schemas:
    ErrorResponseDto1:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorEnvelopeDto1'
      required:
        - error
    ErrorEnvelopeDto1:
      type: object
      properties:
        code:
          description: Modus-specific machine code.
          allOf:
            - $ref: '#/components/schemas/ApiErrorCode'
        status:
          description: Canonical status string for the error.
          allOf:
            - $ref: '#/components/schemas/ApiErrorStatus'
        message:
          type: string
          example: Run was not found or you lack permission.
        requestId:
          type: string
          example: req_01HQ7K8ABCDEFGHIJKLMNOPQRS
        info:
          type: object
          description: Optional domain-specific context. Shape varies per endpoint.
          additionalProperties: true
          example:
            runId: run_abc123
      required:
        - code
        - status
        - message
        - requestId
    ApiErrorCode:
      type: string
      enum:
        - VALIDATION
        - BAD_REQUEST
        - UNAUTHORIZED
        - FORBIDDEN
        - NOT_FOUND
        - CONFLICT
        - RATE_LIMITED
        - INTERNAL_ERROR
      description: Modus-specific machine code.
    ApiErrorStatus:
      type: string
      enum:
        - INVALID_ARGUMENT
        - UNAUTHENTICATED
        - PERMISSION_DENIED
        - NOT_FOUND
        - ALREADY_EXISTS
        - RESOURCE_EXHAUSTED
        - INTERNAL
      description: Canonical status string for the error.
  securitySchemes:
    bearerAuth:
      scheme: bearer
      bearerFormat: Modus PAT (modus_<orgUuid>_<prefix>_<secret>) or OAuth 2.1 access token
      type: http
      description: >-
        A Modus personal access token (`modus_<orgUuid>_<prefix>_<secret>`) or
        an OAuth 2.1 access token, sent as `Authorization: Bearer <token>`.

````