Proxies + AI

How to Use a Mobile Proxy with browser-use

October 2026·7 min read·browser-use, Python, AI agents

browser-use drives a real Chromium browser from an LLM. Where that browser connects from decides what your agent sees: local search results, regional prices, which store page loads. This guide puts the agent behind a dedicated 4G/5G mobile proxy in about ten lines, then proves it worked.

In this guide

  1. Get your proxy details
  2. Install browser-use
  3. Configure the proxy
  4. Verify the agent is on the proxy
  5. IP whitelisting instead of a password
  6. A research task that uses the location
  7. Troubleshooting

1. Get your proxy details

You need four things: the proxy host, the HTTP port (8000 on RelayKit Multi Location and Single Location proxies), and the username and password. In the RelayKit dashboard, open My Proxies, expand a proxy card and click 🤖 Use with AI tools. Pick browser-use and the snippet below appears with your real values already filled in, plus a copy button. The rest of this guide uses placeholders.

2. Install browser-use

Terminal
pip install browser-use # Chromium for the agent: uvx browser-use install # or: playwright install chromium

You also need an LLM. The examples use ChatBrowserUse(), browser-use's bundled model; any chat model browser-use supports works the same way. Put the key it needs in a .env file.

3. Configure the proxy

The proxy goes on the Browser object as a ProxySettings, and the browser is handed to theAgent. Use the HTTP port here (see section 5 for why).

agent.py
import asyncio from browser_use import Agent, Browser, ChatBrowserUse from browser_use.browser import ProxySettings PROXY = ProxySettings( server="http://HOST:8000", # your proxy host + HTTP port username="USER", password="PASS", ) async def main(): browser = Browser(proxy=PROXY) agent = Agent( task="Open https://api.ipify.org?format=json and tell me the IP address shown.", browser=browser, llm=ChatBrowserUse(), ) result = await agent.run() print(result.final_result()) asyncio.run(main())

4. Verify the agent is on the proxy

The task above is the verification. The IP the agent reports must match the IP shown on your proxy card in the dashboard. If it reports your own IP instead, the proxy settings didn't apply — check the host and port, and thatProxySettings is imported from browser_use.browser.

Tip: keep this one-line IP task as the first step of every new agent project. It takes a few seconds and removes the most common "why are my results wrong" question before it starts.

5. IP whitelisting instead of a password

Chromium, which browser-use runs on, can send a username and password to an HTTP proxy but not to a SOCKS5 proxy. That's why the config above uses port 8000. If you'd rather use SOCKS5 (port 9000), turn on IP Whitelisting on the proxy card and enter the public IP of the machine running your agent. The proxy then accepts that machine without a password, and the config shrinks to:

agent.py — whitelist mode
browser = Browser(proxy=ProxySettings(server="socks5://HOST:9000"))

The dashboard's Use with AI tools panel detects whitelist mode and shows the no-password version automatically. Remember that a whitelisted proxy rejects every other machine — turn whitelisting off before running from somewhere else.

6. A research task that uses the location

The point of a mobile proxy for an agent is the place, not just the IP. A RelayKit Multi Location proxy sits in one US city and can be moved to another from the dashboard whenever you like. That makes an agent task like this meaningful: run it, switch the city in the dashboard, run it again, compare.

local_research.py
import asyncio, json from browser_use import Agent, Browser, ChatBrowserUse from browser_use.browser import ProxySettings PROXY = ProxySettings(server="http://HOST:8000", username="USER", password="PASS") TASK = """ 1. Open https://ipapi.co/json/ and note the "city" and "region" fields — that's where you are browsing from. 2. Go to the pricing page of TARGET_SITE (replace with the site you are researching) and record the prices shown for the three main plans, exactly as displayed. 3. Return JSON: {"city": ..., "region": ..., "prices": {...}} """ async def main(): agent = Agent(task=TASK, browser=Browser(proxy=PROXY), llm=ChatBrowserUse()) result = await agent.run() print(result.final_result()) asyncio.run(main())

Typical uses: checking how a competitor's pricing or availability differs by region, confirming a geo-targeted campaign actually renders in the target city, local SEO checks, and QA of a site's own location-based behavior. For a complete multi-city runner that verifies the city before each pass and writes a CSV, see Run an AI research agent across multiple US cities.

7. Troubleshooting

Give your agent a real US mobile IP

Dedicated 4G/5G proxies with unlimited data, HTTP and SOCKS5, and a Multi Location plan that switches between US cities from the dashboard. Pay with crypto; sign up with an email.

Related guides