15% off your first purchase with code WELCOME15, up to 25 GB.

See pricing

Integration · Browser automation

How to use a proxy with browser-use

browser-use takes a proxy on the Browser it drives: Browser(proxy=ProxySettings(server=…, username=…, password=…)), and the Agent inherits it. Use a sticky ARC username per task so the agent keeps one IP while it clicks through a site, and a new handle for the next task.

Reviewed 30 Oct 2026

your proxy, as a URL
http://USERNAME_pool-arcfast_country-de:PASSWORD@proxy.arcproxies.io:8000

The short answer

  • ProxySettings lives in browser_use.browser.profile; Browser is an alias of BrowserSession.
  • browser-use answers the proxy's authentication challenge itself, so username and password are all you add.
  • One _session- handle per agent task; parallel agents each get their own handle.
  • Check the exit before handing the browser to the model: a proxy error costs agent steps and LLM tokens.

Setup

Set up browser-use with a proxy, step by step

  1. 01

    Install browser-use and its browser

    The project's quickstart uses uv and a Python 3.12 environment. browser-use install fetches the Chromium build it drives.

    shell
    uv venv --python 3.12source .venv/bin/activateuv pip install browser-useuvx browser-use install
  2. 02

    Mint a session handle and check the exit first

    A sticky username returns the same exit for its _sesstime- window. Check it with a plain HTTP request before the agent starts: if the credentials are wrong you find out in a second, not ten agent steps later.

    preflight.py
    import secretsimport httpxhandle = secrets.token_hex(4)USERNAME = f"USERNAME_pool-arcfast_country-de_session-{handle}_sesstime-30"   # 30 minutes for this taskr = httpx.get(    "https://api.ipify.org?format=json",    proxy=f"http://{USERNAME}:PASSWORD@proxy.arcproxies.io:8000",    timeout=20,)r.raise_for_status()print("agent will browse from", r.json()["ip"])
  3. 03

    Give the Browser the same proxy and run the agent

    Pass ProxySettings to Browser, then the browser to Agent. Every page the agent opens for this task leaves from the IP the pre-flight check just showed.

    agent.py
    import asynciofrom browser_use import Agent, Browser, ChatOpenAIfrom browser_use.browser.profile import ProxySettingsasync def main(username):    browser = Browser(        proxy=ProxySettings(            server="http://proxy.arcproxies.io:8000",            username=username,            password="PASSWORD",            bypass="localhost,127.0.0.1",        )    )    agent = Agent(        task="Find the delivery cost for a 2 kg parcel to Hamburg on example.com",        llm=ChatOpenAI(model="gpt-4.1-mini"),        browser=browser,    )    history = await agent.run(max_steps=25)    print(history.final_result())asyncio.run(main(USERNAME))   # USERNAME from the pre-flight step
  4. 04

    Run several agents, one exit each

    Each agent gets its own Browser and its own handle, so their traffic never shares an IP. A semaphore keeps the number of live browsers in check.

    parallel.py
    import asyncioimport secretsfrom browser_use import Agent, Browser, ChatOpenAIfrom browser_use.browser.profile import ProxySettingslimit = asyncio.Semaphore(3)   # browsers alive at onceasync def run_task(task):    username = f"USERNAME_pool-arcfast_country-de_session-{secrets.token_hex(4)}_sesstime-30"    async with limit:        browser = Browser(proxy=ProxySettings(            server="http://proxy.arcproxies.io:8000", username=username, password="PASSWORD",        ))        agent = Agent(task=task, llm=ChatOpenAI(model="gpt-4.1-mini"), browser=browser)        return (await agent.run(max_steps=25)).final_result()async def main(tasks):    print(await asyncio.gather(*(run_task(t) for t in tasks)))
  5. 05

    Send an agent to a specific market

    For a task that must see a country's prices or language, change the _country- token, and add _city- if the result depends on the metro. Cities come from the published list, lowercased without spaces.

    markets.py
    import secretsMARKETS = {    "uk":       "USERNAME_pool-arcfast_country-gb_city-london",    "canada":   "USERNAME_pool-arcfast_country-ca_city-toronto",    "germany":  "USERNAME_pool-arcfast_country-de",}username = f"{MARKETS['canada']}_session-{secrets.token_hex(4)}_sesstime-30"

Why an agent wants a sticky session

An agent's task is a sequence: open a page, search, filter, open a result, read a value. With a rotating username, each new connection can take a different exit, and a site that sees one visitor's steps arrive from several addresses may reset the session or show a different regional page halfway through. A sticky session keeps the whole task on one IP.

Size _sesstime- to the task, not to the run: if an agent typically finishes in ten minutes, 20 to 30 minutes leaves headroom. Holds are best effort, so if the exit changes mid-task the agent sees a reload or an error, not silent corruption. The AI agents use case covers the wider setup.

Proxy errors inside an agent loop

A proxy failure reaches the model as a page that did not load. The agent may retry, navigate elsewhere or give up, spending steps either way. Three habits keep that cheap:

  • Pre-flight every new handle with one HTTP request, as above. A 407 or a timeout there means fix the config, not prompt the agent.
  • Cap max_steps so a broken connection cannot burn a long budget.
  • On a failed task, retry with a new handle rather than the same one, since the old exit may be the problem.

SOCKS5 and HTTPS

ProxySettings.server accepts http:// and socks5:// URLs. browser-use answers HTTP proxy authentication challenges over the Chrome DevTools Protocol, so keep http:// for an authenticated gateway. HTTPS pages travel inside an HTTP CONNECT tunnel and stay encrypted end to end.

The problem

Common pitfalls

Reusing one handle across parallel agents

Two agents on the same handle share one exit and its rate limit, and their cookies can collide on the target. Mint a handle per agent.

A session shorter than the task

If _sesstime- runs out mid-task, the next connection may get a new IP. Size it to the slowest task you expect.

Debugging the proxy through the agent

An agent describing a page that "failed to load" is a slow way to find a typo in a username. Test credentials with httpx or curl first.

FAQ

Questions

Something not covered? Write to contact@arcproxies.io.

How do I set a proxy in browser-use?

Create the browser with Browser(proxy=ProxySettings(server='http://host:port', username='…', password='…')), importing ProxySettings from browser_use.browser.profile, and pass it to Agent(browser=browser). The agent uses that proxy for every page it opens.

Does browser-use support authenticated proxies?

Yes. ProxySettings has username and password fields, and browser-use answers the proxy's authentication challenge itself through the Chrome DevTools Protocol. No extension or local forwarder is needed.

Should an AI agent use a rotating or a sticky proxy?

Sticky, in almost every case. An agent works through multi-step flows, and a rotating exit can change the IP between steps. Use one _session- handle per task with _sesstime- sized to the task, and a new handle for the next task.

How do I give each browser-use agent a different IP?

Create a separate Browser per agent, each with its own _session- handle in the username. Different handles map to different exits.

Sources & review

Last reviewed by the ARC Proxies team. Prices are read from the live catalog at build time.

  1. [1]browser-use: Browser parameters: proxy
  2. [2]browser-use: Quickstart
  3. [3]GitHub, browser-use/browser-use: ProxySettings in browser_use/browser/profile.py

Next

What people build with it

Get started

Get credentials and paste them in.

Sign up, buy a gigabyte, generate a username in the dashboard. Code WELCOME15 takes 15% off your first purchase; bandwidth never expires.