Skyvern client, get a SkyvernBrowser, then a page.
Launch or connect
skyvern.launch_cloud_browser
Launch a new cloud-hosted browser session. This creates a new browser session in Skyvern’s cloud infrastructure and connects to it.
Returns
SkyvernBrowser · TypeScript Promise<SkyvernBrowser> — A browser instance connected to the new cloud session.
Example
skyvern.use_cloud_browser
Get or create a cloud browser session. This method attempts to reuse the most recent available cloud browser session. If no session exists, it creates a new one. This is useful for cost efficiency and session persistence.
Returns
SkyvernBrowser · TypeScript Promise<SkyvernBrowser> — A browser instance connected to an existing or new cloud session.
Example
skyvern.connect_to_cloud_browser_session
Connect to an existing cloud-hosted browser session by ID.
Returns
SkyvernBrowser · TypeScript Promise<SkyvernBrowser> — A browser instance connected to the cloud session.
Example
skyvern.connect_to_browser_over_cdp
Connect to an existing browser instance via Chrome DevTools Protocol (CDP). Use this to connect to a browser that’s already running with CDP enabled, whether local or remote.
Returns
SkyvernBrowser · TypeScript Promise<SkyvernBrowser> — A browser instance connected to the existing browser.
Example
skyvern.launch_local_browser
Launch a new local Chromium browser with Chrome DevTools Protocol (CDP) enabled. This method launches a browser on your local machine with remote debugging enabled, allowing Skyvern to control it via CDP. Useful for development and debugging.Python only: the TypeScript SDK has no equivalent.
Returns
SkyvernBrowser — A browser instance with Skyvern capabilities.
Example
skyvern.aclose
Close Playwright, embedded server resources, and release all handles.None · TypeScript Promise<void>
Example
Pages
browser.get_working_page
Get the most recent page or create a new one if none exists. This method returns the last page in the browser context, or creates a new page if the context has no pages. This is useful for continuing work on an existing page without creating unnecessary new tabs.SkyvernBrowserPage · TypeScript Promise<SkyvernBrowserPage> — The most recent page wrapped with Skyvern capabilities.
Example
browser.new_page
Create a new page (tab) in the browser context. This method always creates a new page, similar to opening a new tab in a browser. The new page will have both Playwright’s standard API and Skyvern’s AI capabilities.SkyvernBrowserPage · TypeScript Promise<SkyvernBrowserPage> — A new page wrapped with Skyvern capabilities.
Example
browser.get_page_for
Wrap an existing Playwright Page with Skyvern capabilities. Use this to create a SkyvernBrowserPage for a specific tab when you already have a reference to the raw Playwright Page object.Python only: the TypeScript SDK has no equivalent.
Returns
SkyvernBrowserPage
Example
browser.close
Close the browser and optionally close the browser session. This method closes the browser context. If the browser is associated with a cloud browser session (has a browser_session_id), it will also close the browser session via the API, marking it as completed.
Returns
None · TypeScript Promise<void>
Example

