More unique IPs than any network on the planet, in the world's largest residential pool. That's Shifter.More unique IPs than any network, in the world's largest pool. That's Shifter.

See the numbers

Browser Use Agents Behind Residential Proxies: Sessions, Geo-Targeting and Concurrency at Scale

Run Browser Use 1.0 agents on your own browsers behind residential proxies: a tested launcher pattern, a sticky session per agent, country targeting and scale.

Industry Solutions · Updated November 24, 2026 · 8 min read
agentbrowsersticky session1Chrome :9300DE · sid a91f2Chrome :9301FR · sid 7c2e3Chrome :9302JP · sid e04b
One browser, one port and one amber sticky session per agent.
Knowledge
On this page
  1. How proxies work in Browser Use 1.0
  2. The catch: proxy authentication
  3. The launcher
  4. Running agents in parallel
  5. Sessions: one identity per agent
  6. Geo-targeting the work, not just the browser
  7. Cloud browsers or your own
  8. Scaling up
  9. Troubleshooting
  10. The bottom line
  11. Sources and references

Browser Use is one of the most popular open-source frameworks for AI agents that work in a real browser. Version 1.0 changed how it works: the model now writes Python against the Chrome DevTools Protocol (CDP) in a persistent session. It also changed how proxies work, and anyone running agents on their own infrastructure needs to know how. This guide shows a pattern we tested for putting Browser Use agents behind residential proxies, then covers sticky sessions, country targeting and running many agents at once. For the wider context, see our AI agents overview.

How proxies work in Browser Use 1.0

Browser Use 1.0 offers several kinds of browser:

BrowserWhat it isProxy
Browser()A Browser Use Cloud browser, the defaultThe cloud’s own option, cloud_proxy_country_code
Browser('chromium')A fresh local Chrome or ChromiumNot supported yet, per the docs
Browser('chrome')The Chrome you have openWhatever that Chrome uses
Browser(cdp_url=...)Any browser with a CDP endpointWhatever that browser uses

The 0.x proxy option is gone. The migration guide is explicit: “Cloud: cloud_proxy_country_code. Local: not yet.” So to use your own residential proxies with your own browsers, start the browser yourself, with the proxy, and connect the agent through cdp_url.

The catch: proxy authentication

Residential proxies use a username and password, and Chrome’s --proxy-server flag has no place for them. Chrome asks for the credentials in a dialog, which an agent cannot answer.

Playwright solves this. When it launches a browser with a proxy username and password, it answers the proxy’s login challenge itself. We tested whether that also covers pages opened by a separate program over CDP, which is how Browser Use connects:

Launch methodPage opened by a separate CDP client
launch_persistent_context with proxy credentialsLoaded through the proxy: a German residential IP, as requested
launch plus new_contextTimed out: the login challenge was not answered

The persistent context is the one to use. The Playwright process must keep running while the agent works, because it is the one answering the proxy.

The launcher

This function starts one browser per agent, behind a sticky residential session in the country you choose, with locale and time zone to match:

import os, tempfile, uuid
from playwright.async_api import async_playwright

USER = os.environ["SHIFTER_USER"]
PASSWORD = os.environ["SHIFTER_PASS"]

async def launch_browser(pw, port, country, locale, timezone):
    session = uuid.uuid4().hex[:12]
    return await pw.chromium.launch_persistent_context(
        tempfile.mkdtemp(prefix=f"agent-{port}-"),
        channel="chrome",
        headless=True,
        locale=locale,
        timezone_id=timezone,
        proxy={
            "server": "http://p.shifter.io:443",
            "username": f"{USER}-country-{country}-sid-{session}-ttl-900",
            "password": PASSWORD,
        },
        args=[f"--remote-debugging-port={port}"],
    )

Each browser gets its own temporary profile, its own debugging port and its own proxy session id. The credentials come from environment variables, never from code or the command line.

Running agents in parallel

Browser Use requires one browser per agent: “Two agents running on one Browser at once raise RuntimeError.” With the launcher, that is natural:

import asyncio
from browser_use import Agent, Browser, ChatAnthropic

JOBS = [
    ("de", "de-DE", "Europe/Berlin", "In the browser, find the price of the 1 TB model on shop.example and report it."),
    ("fr", "fr-FR", "Europe/Paris", "In the browser, find the price of the 1 TB model on shop.example and report it."),
    ("jp", "ja-JP", "Asia/Tokyo", "In the browser, find the price of the 1 TB model on shop.example and report it."),
]

async def main():
    async with async_playwright() as pw:
        contexts, agents = [], []
        for i, (country, locale, tz, task) in enumerate(JOBS):
            port = 9300 + i
            contexts.append(await launch_browser(pw, port, country, locale, tz))
            agents.append(Agent(
                task,
                llm=ChatAnthropic("claude-sonnet-5-5"),
                browser=Browser(cdp_url=f"http://127.0.0.1:{port}"),
            ))
        try:
            results = await asyncio.gather(
                *(a.run(max_steps=30, timeout=600) for a in agents),
                return_exceptions=True,
            )
            for (country, *_), r in zip(JOBS, results):
                print(country, r if isinstance(r, Exception) else r.final_result())
        finally:
            for ctx in contexts:
                await ctx.close()

asyncio.run(main())

Pin the library version you test with. Browser Use’s own README asks users to pin exactly, because “releases move fast and can break APIs”.

Sessions: one identity per agent

The proxy username decides how the agent appears to sites:

Username endingUse it for
-country-deOne-off page loads where a new IP each time is fine
-country-de-sid-abc123-ttl-900An agent task: the same German IP for up to 15 minutes
-country-us-city-chicago-sid-abc123-ttl-900City-specific results, such as local prices or listings

Rules that keep agents stable:

  1. One session per agent, never shared. Two agents on one IP look like one very busy visitor.
  2. Make the time-to-live longer than the task. An IP that changes mid-checkout looks like account takeover.
  3. New session on failure. If an agent hits a block, retry with a new session id and a fresh profile, not the same identity.
  4. Match locale and time zone to the exit. A Tokyo IP with a German browser is easy to spot.

Geo-targeting the work, not just the browser

Browser Use’s documentation makes an important point: “The proxy applies to the browser only. Python networking in the agent’s cells (http_get, urllib, requests) runs on your machine.” An agent that decides to fetch a page with Python, instead of in the browser, will see your location, not the proxy’s. Its advice is to say “in the browser” in the task when location matters, which the example above does.

Cloud browsers or your own

Browser Use Cloud browsers come with their own proxy option, set per browser with a country code. Running your own browsers behind your own proxy provider makes sense when you need:

  • City or network targeting, not just a country, for local prices, listings or search results.
  • Control over sessions, such as a fixed exit for a whole task or a long login flow.
  • One proxy account for agents, scrapers and monitoring, with one bill and one set of usage reports.
  • Your own infrastructure, for data that should not leave your environment.

The trade-off is operations: you run the browsers, the ports and the clean-up yourself.

Scaling up

  • Concurrency. Browser Use raises the process’s open-file limit so that “100 agents in one process fit on macOS”. Memory is usually the real limit: every agent runs a full Chrome. Use a semaphore to cap how many run at once.
  • Bandwidth. Residential proxies are billed per GB, and agents load whole pages. Cap max_steps and timeout, and give agents narrow tasks with a direct starting URL instead of a search.
  • Ports and profiles. Allocate ports from a range and delete temporary profiles after each run.
  • Security. The debugging port has no authentication. Browser Use’s docs warn that on a shared machine other local users can attach to such a browser, so run agents in containers or on dedicated hosts.
  • Identity. Sites are starting to ask agents who they act for. Our explainer on Cloudflare’s agent identity proposal covers where that is heading.

For the earlier framework generation, our guide to proxies for LangChain, CrewAI and AutoGen agents uses the same session approach. For agents inside a code editor, see Playwright MCP with residential proxies.

Troubleshooting

SymptomLikely causeFix
The agent cannot connect to cdp_urlThe browser has not finished starting, or the port is takenLaunch first, then create the agent; allocate unique ports
Pages hang, then time outThe launcher process exited, so nobody answers the proxy loginKeep the Playwright process running for the whole run
The agent reports your real locationIt fetched with Python instead of the browserSay “in the browser” in the task
RuntimeError when running in parallelTwo agents share one BrowserOne browser, one port, one session per agent
Blocks partway through a taskThe session expired or the site flagged the identityLonger time-to-live, or retry with a new session and profile

The bottom line

Browser Use 1.0 does not take a proxy for local browsers yet, but it connects to any browser over CDP. Launch each browser with Playwright’s persistent context and an authenticated residential proxy, give every agent its own sticky session and country, keep location-sensitive work in the browser, and scale with one browser per agent.

Sources and references

Frequently asked questions

Does Browser Use support proxies?

In Browser Use 1.0, the built-in proxy option applies to Browser Use Cloud browsers. For a local browser, the documentation lists the proxy setting as not supported yet. The supported route is to start your own browser with the proxy and connect the agent to it with Browser(cdp_url=...).

How do I add proxy authentication to a browser that Browser Use connects to?

Chrome's --proxy-server flag cannot carry a username and password. In our test, launching Chrome with Playwright's launch_persistent_context and a proxy with username and password worked: pages opened by a separate CDP client, the way Browser Use connects, went through the authenticated proxy. The Playwright process has to stay running while the agent works.

Should each Browser Use agent have its own proxy session?

Yes. Give every agent its own browser, which Browser Use requires for parallel runs, and its own sticky proxy session, so each agent keeps one exit IP for its whole task and agents never share cookies or an IP.

Does the proxy cover everything a Browser Use agent does?

No. Browser Use's documentation says the proxy applies to the browser only, and that Python networking in the agent's code cells, such as http_get, urllib or requests, runs on your machine. Tell the agent to do location-sensitive work in the browser.

Ready to get started?

Try Shifter's residential proxies, 205M+ IPs, 195+ countries, from $0.10/GB.

Get Started