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

# Stream session events

> NDJSON event stream for the active turn. Call after POST /eve/v1/session with the same Authorization header.

<script src="/agent-playground-reply.js?v=14" defer />

<div id="webless-agent-history" />

## Try it in this order

<Steps>
  <Step title="1. Bootstrap">
    Open [Bootstrap](/api-reference/latest/agent/bootstrap). Enter your index
    ID, click **Try it**, then **Send**. The playground saves your
    `accessToken` for the next two pages. You can only use it on this site, and
    it expires in about 15 minutes.
  </Step>

  <Step title="2. Send a message">
    Open [Send a message](/api-reference/latest/agent/create-session). This page
    fills in your token and index ID. Send `Hello`. The playground saves your
    `sessionId` (`wrun_…`).
  </Step>

  <Step title="3. Stream the reply">
    Open [Stream events](/api-reference/latest/agent/session-stream). This page
    fills in your token and that `sessionId`. Click **Send** to read the reply.
  </Step>
</Steps>

To send another message, go back to **Send a message** and click **Send**
again. Then open **Stream events** once more. The playground updates the
session id to that new turn.

This is step 3. This page fills in your token and the latest `wrun_…`
session id. Click **Send** to read the reply from the message you just sent.


## OpenAPI

````yaml api-reference/openapi-agent-runtime.json GET /eve/v1/session/{sessionId}/stream
openapi: 3.1.0
info:
  title: Webless Agent Runtime API
  description: >-
    Browser-facing endpoints for Agentic mode. Call these from the visitor's
    site; bootstrap returns a short-lived access token bound to that page's
    origin.
  version: v1
servers:
  - url: https://runtime.webless.ai
    description: Agent Runtime
security: []
paths:
  /eve/v1/session/{sessionId}/stream:
    get:
      tags:
        - Agent Runtime API
      summary: Stream the agent reply
      description: >-
        NDJSON event stream for the active turn. Call after POST /eve/v1/session
        with the same Authorization header.
      operationId: agentRuntimeSessionStream
      parameters:
        - name: sessionId
          in: path
          required: true
          description: sessionId from the Send a message 202 response. It looks like wrun_…
          schema:
            type: string
            example: wrun_01EXAMPLE
          example: wrun_01EXAMPLE
        - name: indexId
          in: query
          required: true
          schema:
            type: string
          description: Your Webless index ID
          example: YOUR_INDEX_ID
      responses:
        '200':
          description: >-
            NDJSON. Each line is one event. The visitor-facing reply is
            message.appended data.messageSoFar.
          content:
            application/x-ndjson:
              schema:
                type: string
                description: Newline-delimited JSON. Each line is one StreamEvent object.
              example: >
                {"type":"message.appended","data":{"messageSoFar":"Hi! Welcome
                to Webless.","messageDelta":"Hi!"}}

                {"type":"session.waiting","data":{}}
        '401':
          description: Missing or invalid access token
        '403':
          description: Session forbidden for this visitor
      security:
        - visitorBearer: []
components:
  securitySchemes:
    visitorBearer:
      type: http
      scheme: bearer
      description: >-
        accessToken from POST /webless/v1/bootstrap. Get it on the Bootstrap
        docs page (Send in the playground) or use POST Send a message for the
        full flow.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.