Quick Start: Agent Browser
Start using Oxylabs Agent Browser in just a few minutes with a simple step-by-step guide.
Oxylabs Agent Browser is a cloud-hosted browser infrastructure that handles bot traffic control systems, CAPTCHAs, and proxy rotation automatically. It is fully compatible with Playwright, Puppeteer, and the Model Context Protocol (MCP) for AI applications.
Setup & credentials
Create an account: Sign up at the Oxylabs Dashboard.
Add a product instance: Click + Add product instance and select Agent Browser in the Browsers category.
Set up: Choose the instance name, product usage limits (optional), and create the instance.
Get credentials: Click on the Agent Browser product in the overview instance table and get your credentials.
Your first request
Oxylabs Agent Browser uses the Chrome DevTools Protocol (CDP). You can connect to it using Playwright or Puppeteer without managing local browser binaries.
Python + Playwright example:
Install Playwright:
pip install playwrightRun the following script (replace
USERNAMEandPASSWORDwith your credentials):
from playwright.sync_api import sync_playwright
username = "USERNAME"
password = "PASSWORD"
endpoint = "hb.oxylabs.io"
browser_url = f"wss://{username}:{password}@{endpoint}"
with sync_playwright() as p:
# Connect to the remote Oxylabs browser
browser = p.chromium.connect_over_cdp(browser_url)
page = browser.new_page()
page.goto('https://oxylabs.io/')
print(f"Page Title: {page.title()}")
browser.close()Customizing the browser
You can also pass instructions directly through the connection URL using query parameters:
p_cc
?p_cc=US
Routes the browser's traffic through a specific country.
p_device
?p_device=mobile
Emulates a specific device type.
session_name
?session_name=ses-1
Creates a sticky session to keep your remote browser instance running in the cloud.
Find more customization options in Agent Browser documentation.
Next steps
Want to monitor your browser? Learn about the Session Inspection Tool to visually track your script's interactions with the browser in real-time.
Is your script too slow? Try Optimizing Traffic to block unnecessary assets from loading. This will increase scraping speed and reduce bandwidth consumption.
Encountering errors or timeouts? Visit the Troubleshooting Guide to resolve common CDP connection issues, library version mismatches, and execution timeouts.
Hitting a "403 Forbidden" on a major site? Check the Restricted Targets list to see which websites or services are restricted from access for the Agent Browser.
Last updated
Was this helpful?