Skip to content

Browser Options

The new_session tool accepts browser_options to control viewport, emulation, extensions, and more. Your AI coding agent uses these parameters automatically based on your instructions.

All Browser Options

OptionTypeDescriptionDefault
viewportobject{ width, height } in pixels1280 × 720
is_mobilebooleanEmulate mobile device behavior (CSS media queries, meta viewport)false
has_touchbooleanEnable touch eventsfalse
user_agentstringCustom user agent string
color_schemestring"light", "dark", or "no-preference""light"
timezone_idstringTimezone ID (e.g., "America/New_York")
geolocationobject{ latitude, longitude, accuracy? }
localestringBrowser locale (e.g., "en-US", "ja-JP")
disable_securitybooleanDisable web security (CORS, CSP)false
record_evidencebooleanEnable video and trace recordingfalse
headlessbooleanRun browser in headless modefalse
proxyobject{ server, username?, password? }
path_to_extensionstringPath to unpacked Chrome extension directory
user_data_dirstringChrome user data directory for persistent profile

Top-Level Options

These are passed alongside browser_options, not inside it:

OptionTypeDescription
starting_urlstringURL to navigate to on session creation (default: about:blank)
storage_state_pathstringPath to storage state file to restore cookies/localStorage

Usage Examples

Tell your coding agent to start a session with specific options:

Open a browser at localhost:3000 with a mobile viewport (390x844)
and touch enabled
Start a browser session with video recording and verify the checkout flow
Open a browser with my Chrome extension at ./my-extension
and navigate to https://example.com
/verify airbnb.com shows Japanese UI with locale ja-JP
and timezone Asia/Tokyo
Open a browser using the Chrome profile at ./chrome-profile
and verify my saved login still works

Released under the MIT License.