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

# browserSessions

> The managed browsers driven beside a computer, and a live view of an active one — client.browserSessions.

Every browser driven beside a computer — by an agent's `browser` tool or by [`client.browser`](/docs/sdk/browser) — leaves a `browser_session` row. Two methods read them. API detail: [Browser sessions](/docs/api/browser-sessions).

## list

```ts theme={"system"}
client.browserSessions.list(computerId: string): Promise<Page<BrowserSession>>
```

`GET /v1/computers/{computerId}/browser_sessions`. Every browser session opened beside the computer, newest first — `creating`, `active`, `closed` or `error`. The list is not paginated: `has_more` is always `false`.

```ts theme={"system"}
const { data } = await client.browserSessions.list("cmp_…");
for (const s of data) console.log(s.id, s.status, s.session_id, s.allowed_domains);
```

## liveView

```ts theme={"system"}
client.browserSessions.liveView(computerId: string, id: string): Promise<BrowserLiveView>
```

`POST /v1/computers/{computerId}/browser_sessions/{id}/live_view`. Mints a short-lived URL that shows the browser as it runs. Dashboard session only (an API key gets `forbidden`); a session that is not `active` answers `not_found`.

The URL is a bearer credential — whoever holds it drives the browser until `expires_at`. Do not log or store it; render it and let it expire. Each mint is audited as `browser.live_view_opened`, without the URL.

```ts theme={"system"}
const view = await client.browserSessions.liveView("cmp_…", "brw_…");
iframe.src = view.url; // valid until view.expires_at
```
