> 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/help-center/getting-started/start-using-agent-browser.md).

# Start using Agent Browser

A beginner's guide for purchasing and using Oxylabs Agent Browser to automate browsing for AI agents and web scraping.

### Creating a Agent Browser user

1. Create a [dashboard](https://dashboard.oxylabs.io/) account and navigate to **Pricing**.
2. Choose a pricing plan that fits your needs. Every new account also gets a welcome credit to spend right away. See [How pricing and billing work for details](/help-center/most-popular-questions/how-pricing-and-billing-work.md).
3. Create an Agent Browser instance in the dashboard. You're required to name the instance before you can confirm it.
4. Your username and password are generated automatically and can be viewed anytime in the instance settings.

### Making your first request

You can connect to Agent Browser using Playwright, Puppeteer, or any tools that support the Chrome DevTools Protocol (CDP). Additionally, you can integrate directly with AI applications through the [Model Context Protocol](broken://spaces/BQ7Zf9paoN3FTeGcyfY1/pages/qKJOfgGohJ93ZxpTrwjL) (MCP), enabling full automation of your browsing workflows.

Let’s try a basic connection to the Agent Browser using Playwright.

#### Playwright example in Python

Install the Playwright library through your terminal:

```
pip install playwright
```

Use your Agent Browser credentials and run the code:

```python
from playwright.sync_api import sync_playwright

username = "your-username"
password = "your-password"
endpoint = "hb.oxylabs.io"
browser_url = f"wss://{username}:{password}@{endpoint}"

with sync_playwright() as p:
    browser = p.chromium.connect_over_cdp(browser_url)
    page = browser.new_page()
    page.goto('https://oxylabs.io/')
    print(page.title())
    browser.close()
```

#### Playwright example in JavaScript

Install the Playwright library through your terminal:

```
npm init -y
npm install playwright
```

Enter your Agent Browser credentials and run the code:

```javascript
const { chromium } = require('playwright');

(async () => {
    const username = 'your-username';
    const password = 'your-password';
    const endpoint = 'hb.oxylabs.io';
    const browserUrl = `wss://${username}:${password}@${endpoint}`;

    const browser = await chromium.connectOverCDP(browserUrl);
    const page = await browser.newPage();
    await page.goto('https://oxylabs.io/');
    console.log(await page.title());
    await browser.close();
})();
```

For more information and examples on using the Agent Browser, visit our [**extensive documentation**](/products/agent-browser.md) or contact our support team at [**support@oxylabs.io**](mailto:support@oxylabs.io).

### Additional free features

* Built-in proxy servers for routing requests through specific geographic locations.
* Country, city and state-level [geotargeting](/products/agent-browser/geolocation-and-proxy-selection.md) for pinpointing the exact location your session runs from.
* [Session inspection and recording](/products/agent-browser/session-inspection-and-recording.md) for visual debugging of browser automation sessions.
* Specifying [device type](/products/agent-browser/device-type.md) for handling responsive layouts, mobile content, and CAPTCHAs or UI elements.
* [CAPTCHA handling](/products/agent-browser/captcha-handling.md) and dynamic manual triggering for dynamic, post-load CAPTCHAs.


---

# 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/help-center/getting-started/start-using-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.
