In short.
This tutorial is for Python developers who want OpenAI to control a hosted browser through Playwright, but its example exposes only four actions on one page. OpenAI runs the model loop, the application runs Playwright and the OpenAI SDK, and Browser Use Cloud hosts Chromium. The page supplies setup commands and runner code, while the adapter implementation is linked separately. Runtime behavior was not assessed, and the page does not establish total usage costs or redistribution rights.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete captured page at the exact source address: documentation-index text, general Cloud and library notices, tutorial prose, image descriptions, setup commands, displayed Python runner, integration comparison and hosting footer. Linked pages, downloaded file bodies and remote image files are excluded. General notices are distinguished from behavior demonstrated by this standalone browser example. No code, browser session, API request or benchmark was executed.
The overview
Identity
OpenAI integration with Playwright is a Browser Use Cloud documentation tutorial at [https://docs.browser-use.com/cloud/tutorials/integrations/openai.md]. It explains how an application can expose a small set of Playwright actions to an OpenAI model while connecting Playwright to a remote Chromium browser.
Assessment
The tutorial is a useful starting point for applications that already use Playwright and need model-controlled page reading and basic interactions. It shows the connection, tool registration, model request and cleanup in one runner. Adoption still requires inspecting the separately linked adapter and assessing whether its limited controls cover the intended websites; compatibility and reliability were not established by execution.
Users
The intended audience is Python developers combining OpenAI with existing Playwright code. Beginners receive a concrete setup sequence but still need to understand API keys, environment variables and asynchronous Python. Experienced developers can use the example to assess how a narrow browser tool interface fits their application. Workflows requiring multiple pages, extensive browser controls or host command execution exceed the demonstrated adapter.
Capabilities
The example exposes read_page, click, type and select_option through AsyncBrowserToolset. These let the model request page content, click elements, enter text and choose supported options. Playwright methods become model-callable only when the adapter implements them; connecting Playwright does not expose its entire API.
The adapter retains element references from page reads. The documentation says to read the page again after navigation or when references become stale. Its stated scope is one page and a limited set of visible form controls.
Using it
Requirements
The documented environment uses uv, Python 3.12, openai==3.31.0, browser-use-sdk==3.11.3 and playwright==1.63.0. It requires Browser Use and OpenAI API keys, plus an OpenAI model supporting Responses function tools. The environment variables are BROWSER_USE_API_KEY, OPENAI_API_KEY and OPENAI_MODEL.
The example requires neither a local Chromium installation nor the open-source browser-use library. The application still runs the OpenAI SDK and Playwright, and imports AsyncBrowserUse explicitly from browser_use_sdk.v4. The hosted SDK and open-source library have different APIs.
Mechanism
The application creates a Cloud browser, receives its CDP URL and connects Playwright through Chrome DevTools Protocol, the browser's remote control interface. It opens a page in the browser's first context and wraps that page with PlaywrightBrowser.
AsyncBrowserToolset exposes the adapter's four actions to AsyncResponsesToolRunner. OpenAI requests tool calls, the adapter translates supported calls into Playwright operations, and Playwright controls the hosted browser. Browser Use supplies browser infrastructure in this example; the OpenAI model loop runs through the application's OpenAI client.
Setup
The page initializes a Python 3.12 project with uv, installs the three pinned packages and sets the API keys and model environment variables. It then downloads playwright_browser.py and playwright_cloud.py from browser-use/sdk commit e4048eafa0dc61d8afc112a2d2d09f97022e1677 and runs uv run python playwright_cloud.py.
The download addresses are [https://raw.githubusercontent.com/browser-use/sdk/e4048eafa0dc61d8afc112a2d2d09f97022e1677/examples/openai/playwright_browser.py] and [https://raw.githubusercontent.com/browser-use/sdk/e4048eafa0dc61d8afc112a2d2d09f97022e1677/examples/openai/playwright_cloud.py]. The page displays the runner code, but the linked files were not separately inspected.
Example
The runner opens [https://example.com] and asks the model to read the page, click Learn more and summarize the destination. It takes the model from OPENAI_MODEL, sets store to false, limits the runner to ten steps and prints response.output_text. These are documented behaviors and intended output; no observed execution result is supplied.
The confirmation callback returns True for every request. Cleanup blocks close the runner, toolset, adapter and Playwright browser connection, then explicitly stop the Cloud browser. The documentation warns that closing a CDP connection alone does not stop the hosted browser.
Assessment & evidence
Limitations
This is a small adapter rather than a general Playwright driver. Its four tools, single-page scope and limited visible controls do not establish support for arbitrary JavaScript execution, coordinate actions, file tools or multiple tabs. Element references can become stale and require another page read.
The example's callback approves all actions, so application-specific authorization needs additional implementation. The page supplies no measured accuracy, latency, reliability or target-site compatibility results. Nothing was executed, and the request's store setting alone does not establish data retention terms across the complete integration.
Fit rationale
The main architectural benefit is keeping existing Playwright code while exposing a deliberately small set of actions to a model and moving Chromium hosting to Browser Use Cloud. This removes the example's local Chromium installation requirement but introduces dependencies on remote browser access and two API services.
Model selection belongs to the OpenAI request through OPENAI_MODEL. The page's broader notices about Browser Use Cloud agent-model defaults do not choose the OpenAI model used by this runner. Likewise, broader Cloud agent-session behavior should not automatically be attributed to this standalone browser integration.
Alternatives
The page describes a broader Browser Use library driver offering all 28 browser tools plus Bash on the application host. Its link is explicitly for browser-use 0.x and requires browser-use<1: [https://docs.browser-use.com/open-source/legacy/0.x/customize/integrations/openai.md].
That is a separate integration with a wider action surface and a legacy version constraint. Although the page also mentions open-source browser-use 1.0, it does not establish an equivalent OpenAI integration for that version. No independent comparison or assessment of the linked driver is available here.
Evidence
The evidence is the complete captured documentation page from [https://docs.browser-use.com/cloud/tutorials/integrations/openai.md]. It contains explanatory prose, architecture image descriptions, dependency commands, runner code, an integration comparison and general Cloud/library notices.
The adapter's source body, linked documentation, pricing page, repository licenses and service terms are not included. The page supports an explanation of the intended architecture and setup, but does not establish successful operation or measured performance.
Access & freshness
Costs
The integration involves Browser Use Cloud usage and OpenAI API usage. The page describes Cloud as pay as you go, with a one-time signup credit grant and purchased top-up credits that do not expire. It does not specify the signup credit amount or OpenAI model prices.
The general Cloud notice lists 10 concurrent browsers at $0 in qualifying project payments and 50 after a $100 one-time top-up. These describe concurrency capacity rather than free browser runtime. It also quotes $3 plus traffic for 50 browsers running for one hour, but provides no complete tariff or end-to-end price for this tutorial. Actual project limits can differ, and the page points to [https://browser-use.com/pricing] for current rates. Total workflow cost remains unknown.
Rights
The captured page contains no license text or explicit redistribution grant for the tutorial, displayed code or linked adapter files. Public documentation and GitHub download links do not establish those permissions. Licensing for the linked files and dependencies is unknown from this evidence; linked repository licenses and service terms are outside the available material.
Freshness
The documentation snapshot was captured on 2026-11-25 at 21:20:15.572 UTC. No tutorial-specific last-updated date or changelog is provided. The dependency versions and GitHub commit identify the documented example precisely, but do not prove that those versions are the latest or that they work together.
The legacy 0.x warning belongs to the linked library-driver alternative. The captured page does not identify the Playwright tutorial itself as deprecated or superseded.
Next steps
Before adoption, inspect the pinned adapter and its license, confirm that the chosen OpenAI model supports Responses function tools, and check Cloud rates and project limits. Replace the always-approve callback with the permissions your application needs, and retain explicit Cloud browser shutdown during cleanup.
Use the documented example.com task as an initial evaluation, then assess the navigation and form controls required by the intended workflow. Check behavior after stale references and errors before relying on external actions. These are suggested evaluations; none were performed.
