Storyden
Robots

Read a Robot session event stream

Read persisted events after an offset and optionally remain attached to the live session tail. The stream remains open while the session is idle so turns started by other members or background work are observable.

GET
/robots/sessions/{session_id}/stream

Read persisted events after an offset and optionally remain attached to the live session tail. The stream remains open while the session is idle so turns started by other members or background work are observable.

Authorization

cookiestoryden-session<token>

Path Parameters

session_id*string

Robot session ID

Formatxid

Query Parameters

offset?string

Read events after this stream offset. Use -1 to start at beginning.

Default"-1"
live?"sse"

Attach to the live stream tail after catching up.

Value in"sse"

Response Body

Persisted Robot session events, optionally followed by a live SSE tail.

  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/api/robots/sessions/string/stream'
Example Response
[  {    "sequence": 0,    "turn_id": "string",    "input_ids": [      "string"    ],    "event_kind": "message",    "message": {      "id": "string",      "role": "system",      "parts": [        {          "type": "text",          "text": "string",          "state": "streaming"        }      ],      "metadata": {},      "created_at": "2019-08-24T14:15:22Z",      "queued": true,      "assets": [        {          "id": "string",          "filename": "string",          "path": "string",          "mime_type": "string",          "width": 0,          "height": 0,          "parent": {}        }      ],      "robot": {        "id": "string",        "name": "string"      },      "author": {        "id": "string",        "joined": "2019-08-24T14:15:22Z",        "suspended": "2019-08-24T14:15:22Z",        "handle": "string",        "name": "string",        "signature": "string",        "roles": [          {            "badge": true,            "default": true,            "id": "string",            "name": "string",            "colour": "string",            "meta": {}          }        ]      },      "branch": "string",      "isolation_scope": "string"    },    "parts": [      {        "type": "start",        "messageId": "string"      }    ]  }]