> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/get-started/quick-start-agent-browser.md).

# Quick Start: Agent Browser

Start using Oxylabs Agent Browser in just a few minutes with a simple step-by-step guide.

{% hint style="success" %}
Already familiar with the basics? Check out the [Agent Browser documentation](/products/agent-browser.md).
{% endhint %}

Oxylabs [Agent Browser](https://oxylabs.io/products/headless-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.

{% stepper %}
{% step %}

### Setup & credentials

1. **Create an account:** Sign up at the [Oxylabs Dashboard](https://dashboard.oxylabs.io/).
2. **Add a product instance:** Click **+ Add product instance** and select Agent Browser in the Browsers category.
3. **Set up:** Choose the instance name, product usage limits (optional), and create the instance.
4. **Get credentials:** Click on the Agent Browser product in the overview instance table and get your credentials.

{% hint style="info" %}
To try our Agent Browser for free, claim a $5 [welcome credit](/dashboard/credit-based-billing.md#free-credits-welcome-credit).
{% endhint %}
{% endstep %}

{% step %}

### 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:**

1. Install Playwright: `pip install playwright`
2. Run the following script (replace `USERNAME` and `PASSWORD` with your credentials):

```python
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()
```

{% endstep %}
{% endstepper %}

### Customizing the browser

You can also pass instructions directly through the connection URL using query parameters:

<table><thead><tr><th width="138.5">Parameter</th><th width="172">Example</th><th>Description</th></tr></thead><tbody><tr><td><code>p_cc</code></td><td><code>?p_cc=US</code></td><td>Routes the browser's traffic through a specific country.</td></tr><tr><td><code>p_device</code></td><td><code>?p_device=mobile</code></td><td>Emulates a specific device type.</td></tr><tr><td><code>session_name</code></td><td><code>?session_name=ses-1</code></td><td>Creates a sticky session to keep your remote browser instance running in the cloud.</td></tr></tbody></table>

Find more customization options in Agent Browser [documentation](/products/agent-browser.md#features).

### Next steps

* **Want to monitor your browser?** Learn about the [Session Inspection Tool](/products/agent-browser/session-inspection-and-recording.md) to visually track your script's interactions with the browser in real-time.
* **Is your script too slow?** Try [Optimizing Traffic](/products/agent-browser.md#recommended-setup) to block unnecessary assets from loading. This will increase scraping speed and reduce bandwidth consumption.
* **Encountering errors or timeouts?** Visit the [Troubleshooting Guide](/products/agent-browser/troubleshooting-guide.md) to resolve common CDP connection issues, library version mismatches, and execution timeouts.
* **Hitting a "403 Forbidden" on a major site?** Check the [Restricted Targets](/products/agent-browser/restricted-targets.md) list to see which websites or services are restricted from access for the Agent Browser.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.oxylabs.io/get-started/quick-start-agent-browser.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
