---
title: "streamSession"
---

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

# streamSession

Path: agenthold API › streams

`GET /sessions/{sessionId}/stream`

URL: `/api/v1/sessions/{sessionId}/stream`

WebSocket. The server sends every event after `after` as a JSON text
message (a SessionEvent), then live events as they happen. After a
reconnect, pass the last seq received to continue without gaps.
`{"type":"status","running":bool}` messages report whether a turn runs;
`{"type":"presence","viewers":[{id,name,avatarUrl,role}]}` lists who is watching.

## Authentication

Requires one of the following:

- `session`, apiKey, in cookie
- `token`, http bearer, header `Authorization`

## Path parameters

- `sessionId` (`streamSession.path.sessionId`; string, required)

## Query parameters

- `after` (`streamSession.query.after`; integer, optional)
  - format: `int64`

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/api/v1/sessions/<sessionId>/stream' \
  --cookie 'agenthold_session=<agenthold_session>'
```

### TypeScript

```typescript
const url = '<base-url>/api/v1/sessions/<sessionId>/stream';
const options = {
  method: 'GET',
  headers: {cookie: 'agenthold_session=<agenthold_session>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/api/v1/sessions/<sessionId>/stream"

headers = {"cookie": "agenthold_session=<agenthold_session>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 101

Switching to WebSocket.

### 404

Error.

#### Example

```json
{
  "error": "string"
}
```

- `error` (`streamSession.response.404.error`; string, required)


Source: https://agenthold.dev/api/stream-session/index.md
