Skip to main content
A browser session is a cloud browser that stays open between runs, so tasks and agents can share cookies and page state. Pass its browser_session_id (pbs_…) to run_task or run_workflow. Every method here also accepts request_options (Python) or a final requestOptions argument (TypeScript) to override the timeout, retries or headers for one call; see request options.

create_browser_session

Create a browser session that persists across multiple runs
Parameters Returns BrowserSessionResponse · TypeScript Promise<BrowserSessionResponse>
Example

get_browser_session

Get details about a specific browser session, including the browser address for cdp connection.
Parameters Returns BrowserSessionResponse · TypeScript Promise<BrowserSessionResponse>
Example

get_browser_sessions

Get all active browser sessions for the organization
Returns list[BrowserSessionResponse] · TypeScript Promise<BrowserSessionResponse[]>
Example

update_browser_session

Update a live browser session. Currently supports toggling generate_browser_profile, which is read when the session ends to decide whether to save its browser profile.
Parameters Returns BrowserSessionResponse · TypeScript Promise<BrowserSessionResponse>
Example

extend_browser_session

Extend a live browser session by a number of minutes. Sessions are created with a timeout of at most 240 minutes and can be extended, one or more times, up to a total lifetime of 360 minutes (6 hours). The minutes are added to the session’s current deadline. A request for more than the remaining headroom is granted the remainder, and the response carries a warning. The response’s timeout is the session’s new total budget in minutes, counted from when the session started.
Python only: the TypeScript SDK has no equivalent.
Parameters Returns BrowserSessionResponse
Example

close_browser_session

Close a session. Once closed, the session cannot be used again.
Parameters Returns Any \| None · TypeScript Promise<unknown> Example