FormingConfigclaude-codecodexcursorpublished fresh until

OpenAI SDK: how do I give my app's agent a browser or desktop?

Summary The OpenAI Python SDK (3.31.0+) and Node SDK (7.33.0+) include BrowserToolset and ComputerToolset: you supply a driver (for example Playwright), pick which actions to expose, and the SDK connects them to Responses with confirmation callbacks and step limits. It is for building apps, not a switch in a coding agent.

Not for browser checks in a coding-agent session; see browser-automation-for-ui-checks

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
AConfig · v3.31.0+wwfix.1OpenAI Python SDK 3.31.0 with BrowserToolset and Playwright
How you use itA setting in your project
What it can doinstalls software · writes files · network · secrets access · runs shell
What's inside
AConfig · v3.31.0+wwfix.1OpenAI Python SDK 3.31.0 with BrowserToolset and Playwright
How you use it
A setting in your project
What it can do
installs software · writes files · network · secrets access · runs shell
What's inside

What this thread does

As of November 2026, the OpenAI SDK connects an app-owned browser or desktop driver to a Responses tool loop. Do first: expose only the browser members the task needs and supply the approval callbacks in the official driver guide.

What it is

Kevin Whinnery (developer experience at OpenAI) walked through it on 16 October 2026; the feature shipped in openai-python 3.31.0 on 14 October. Two helpers, per the SDK docs:

  • BrowserToolset: wraps a browser driver you write or import. Each method you implement (get_page_text, read_page, find, click, type, navigate, screenshot, tab handling, and so on) becomes a function tool. Pass members to expose only what the task needs.
  • ComputerToolset: screenshots plus mouse and keyboard actions against a desktop driver.

A tool runner (ResponsesToolRunner, sync or async) runs the loop with max_steps, can stream progress and keep checkpoints. Browser changes need a confirm callback you provide; browser navigation also needs a URL policy. Python native computer actions use approve_safety_checks and optional before_action callbacks (current driver guide). The SDK does not install or launch a browser: Playwright, a local Chrome, or hosted providers (OpenAI points to Browserbase, Browser Use, Daytona and E2B) supply the environment.

The repo's Fieldwork demo books a table in a synthetic local page, asks before submitting, and has a rehearsal mode that makes no model requests.

When to use it

  • Your product needs an agent that reads or fills web pages you control (internal tools, QA flows, back-office forms).
  • You want the narrowest possible browser surface: read-only tools for a reader, a few form actions for a workflow.

Alternatives

  • Claude's computer use and browser toolset on the Claude API (generally available since August 2026; see the thread on what changed for integrations).
  • For a coding agent checking your own UI, use Playwright MCP, Chrome DevTools MCP or agent-browser instead (see the browser-automation thread).

Caveats (as of October 2026)

  • Any model call costs API credits; the model must support Responses function tools.
  • You own isolation, cleanup, credentials and page privacy; the docs warn not to expose password or file field values.
  • Page content is untrusted input. Keep write actions behind confirmation and limit members.
  • On Linux, bundled Chromium may need a local Chrome (OPENAI_EXAMPLE_BROWSER_CHANNEL=chrome) to keep its sandbox on.

Releases since introduction

openai-python 3.42.1 was published on 1 November 2026; 3.31.0 above is the introduction version. 3.36.1 (22 October) validates unavailable or incomplete browser calls before reading driver state. Marcus Wood’s PR #4142 (21 October) describes the refusal behavior; this is upstream evidence, not a WhatWorks trial. 3.38.0’s changelog also records namespace validation before runner dispatch.

If the same app uses Decisions, 3.37.0 (22 October) changes Live question instructions to a string-or-structured-parts union and broadens input types; adapt exhaustive/string-only handling when upgrading. BrowserToolset exposes function tools; ComputerToolset uses the native computer tool, as distinguished in OpenAI’s guide.

Independent source-reading report: GPTMap’s 15 October snapshot independently examines the SDK files and distinguishes browser function tools from the native computer tool. It reports source inspection, not a runtime trial.

Not for: browser checks in a coding-agent session; see browser-automation-for-ui-checks

checked 2026-11-03

Started from a post by @kevinwhinnery, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# OpenAI SDK: how do I give my app's agent a browser or desktop?
Summary: The OpenAI Python SDK (3.31.0+) and Node SDK (7.33.0+) include BrowserToolset and ComputerToolset: you supply a driver (for example Playwright), pick which actions to expose, and the SDK connects them to Responses with confirmation callbacks and step limits. It is for building apps, not a switch in a coding agent.

## Options
- A · OpenAI Python SDK 3.31.0 with BrowserToolset and Playwright · early, no verdict yet · installs software · writes files · network · secrets access · runs shell
Copy for agent
get the whatworks thread openai-sdk-browser-computer-toolsets and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread openai-sdk-browser-computer-toolsets

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · OpenAI Python SDK 3.31.0 with BrowserToolset and Playwright

The Apache-2.0 OpenAI Python SDK at 3.31.0, which adds BrowserToolset, ComputerToolset and the Responses tool runner, installed with Playwright 1.63.0 in a project virtual environment. The Fieldwork example in the same repo shows a complete confirm-before-submit flow.

Format
Config
Source
github:openai/openai-python#examples/browser-use-demo
Pinned
v3.31.0+wwfix.1 · 86cae50785fb
Content hash
86cae50785fb7b7b
Audit
scan passed
Can do
installs software · writes files · network · secrets access · runs shell
Works with
claude-code · codex · cursor
Check
OpenAI SDK 3.31.0 is installed in the project's .venv; Playwright 1.63.0 is installed for the browser driver; BrowserToolset turns a driver method into a Responses function tool (offline, no API key); BrowserToolset runs a model's function call against a stub driver and returns the driver's result (offline, no API key, no browser)
Author
@openai
Kudos
0
Are you @openai? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package openai-python-browser-toolset before installing

A · Files

Read from the package source at the pinned version. Shown as is; nothing here runs.

Loading files…

Ask your agent
show me the files of the whatworks package openai-python-browser-toolset
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp