Proxies for AI agents
Give your agent an exit country, and keep a multi-step task on one exit IP. netdash is a standard HTTP proxy that you set in the browser or HTTP client your agent already uses.
- Sticky sessions with a TTL in minutes
- No per-account concurrency limit
- No SDK needed
Where your agent’s requests come from
An agent usually runs on a server or a hosted runtime in one cloud region, so every page and API it calls answers for that region. When the answer depends on the visitor’s country, such as language, currency, availability or search results, the agent collects the wrong market without noticing.
Multi-step tasks have a second problem. Some sites tie session state, such as a consent choice, a language selection or a paginated search, to the client’s IP address. If the exit IP changes between steps, the task can lose that state halfway through.
- Exit country per task: with
-cc-DE, the agent’s requests leave through an exit IP in Germany - One exit IP per run: a sticky session holds for the TTL you set while that IP stays available
- Set once in the client: the proxy lives in the browser or HTTP client configuration, not in the prompt
- Parallel runs stay separate: one session ID per run, with no per-account concurrency limit
How a proxied agent request travels
The agent decides what to fetch. Its browser or HTTP client makes the request and sends it to a netdash gateway: -us for the Americas or -eu for Europe. The gateway forwards it through an exit IP in the country you chose and returns the website’s response unchanged.
The proxy belongs to the client’s configuration, not to the prompt. The model calls a tool such as fetch_page(url), and the tool’s code adds the proxy and the credentials, so the model never sees the password. netdash provides connectivity only: it doesn’t host agents, run models or operate browsers for you.
Keep the model’s own API calls off the proxy. Set the proxy on the browser or the tool’s client rather than exporting HTTPS_PROXY for the whole agent process: HTTP clients such as httpx read that variable by default, so the calls to your model provider would also go through netdash and use GB.
- Agent: your code and your model, in your environment or with a provider you choose
- Client: Playwright, Puppeteer, httpx or any other client with an HTTP proxy setting
- Gateway:
scale-us.netdash.io:2000checks the credentials and applies the country and session - Website: the public pages and APIs the agent is allowed to use
Four ways to connect an agent
Pick the path that matches how your agent reaches the web. Each guide shows the exact configuration, with sources.
Coding agents
Claude Code with Playwright MCP, and other coding assistants that run code or drive a browser for you. Includes a setup prompt your agent can follow.
Coding agents: See the workflowAgent frameworks
Browser Use, the OpenAI Agents SDK and LangChain: where the proxy server and credentials go in each one.
Agent frameworks: See the workflowCloud and hosted browsers
When the browser runs in a container, a VM or a hosted browser service: which layer the proxy belongs to.
Cloud and hosted browsers: See the workflowPlain HTTP tools
A tool function your agent calls, with the proxy set on its HTTP client. The example on this page uses httpx.
Plain HTTP tools: See the workflow
From task to proxied request
Step 1: Store the credentials
Put
QuickstartNETDASH_USERNAMEandNETDASH_PASSWORDin the agent runtime’s secret store. You find them in the dashboard under Residential (or Mobile) → Generate.Step 2: Pick the exit country per task
Map each task to a market and a country code, such as
Country targeting-cc-US,-cc-DEor-cc-GB, and to the matching gateway.Step 3: Derive one session per run
Hash the run ID to 8 letters and digits and add
Sessions and TTLs-session-{id}-ttl-30. Parallel runs get different IDs, so each run keeps its own session.Step 4: Set the proxy in the client, not the prompt
The tool function or the browser launch adds the proxy and the credentials. The model only passes URLs.
Step 5: Confirm the exit
Fetch
https://api.ipify.org?format=jsonat the start of a run and log the IP with the country code and session ID.Step 6: Stop at the limits
End the run when its budget is spent or a site starts limiting it, and hand the task to a person.
Give every agent run its own session
One session ID per run, derived from the run ID, and a TTL longer than the task. Pair exits in the Americas with the -us gateway and exits in Europe with -eu; the targeting docs explain the codes and gateways.
- Plan and endpoint
Scale:
scale-us.netdash.io:2000(Americas) orscale-eu.netdash.io:2000(Europe)The examples use the Scale plan. Every residential plan uses the same syntax; you switch plans by changing the host and port.
- Exit country
From the task:
-cc-US,-cc-DE,-cc-GBThe agent sees the market it is researching. Use any ISO 3166-1 alpha-2 code; to confirm availability for a specific country, contact support.
- Session mode
Sticky for multi-step browsing; rotating for one-shot HTTP lookups
Reusing a session ID keeps the same exit IP for the TTL while that IP stays available.
- Session ID
The first 8 hex characters of a hash of the run ID
Letters and digits only, no hyphens. One ID per run; parallel runs never share one.
- TTL
30for typical tasks;720(12 h) for long research sessionsPick a TTL longer than the task. Dashboard presets: 15 min, 30 min, 12 h and 7 days.
- Concurrency
One run per session ID, as many runs as you need
There is no per-account concurrency limit.
- Credentials
NETDASH_USERNAMEandNETDASH_PASSWORDin the agent runtime’s secret storeOne account-wide pair for every residential and mobile plan. Keep it out of prompts, tool arguments and logs.
- Example
USERNAME-cc-US-session-a1b2c3d4-ttl-30onscale-us.netdash.io:2000
Build the connection for one run
Choose the plan, gateway, exit country and TTL. The session ID stands in for the one your code derives from the run ID.
Your route
Through the gateway to an exit IP in , , on the plan.
Proxy URL
http://USERNAME-cc-US-session-a1b2c3d4-ttl-30:PASSWORD@scale-us.netdash.io:2000Replace USERNAME and PASSWORD with the credentials from your dashboard.
Scale, Americas gateway, exit IP in United States, sticky for 30 min.
curl --max-time 30 -x "http://USERNAME-cc-US-session-a1b2c3d4-ttl-30:PASSWORD@scale-us.netdash.io:2000" \
"https://api.ipify.org?format=json"import requests
proxy = "http://USERNAME-cc-US-session-a1b2c3d4-ttl-30:PASSWORD@scale-us.netdash.io:2000"
proxies = {"http": proxy, "https": proxy} # set both, or HTTPS requests bypass the proxy
response = requests.get("https://api.ipify.org?format=json", proxies=proxies, timeout=30)
response.raise_for_status()
print(response.text)import { ProxyAgent, fetch } from "undici";
const dispatcher = new ProxyAgent({
uri: "http://scale-us.netdash.io:2000",
token: "Basic " + Buffer.from("USERNAME-cc-US-session-a1b2c3d4-ttl-30:PASSWORD").toString("base64"),
});
const res = await fetch("https://api.ipify.org?format=json", { dispatcher, signal: AbortSignal.timeout(30_000) });
console.log(await res.text());import { chromium } from "playwright";
const browser = await chromium.launch({
proxy: {
server: "http://scale-us.netdash.io:2000",
username: "USERNAME-cc-US-session-a1b2c3d4-ttl-30",
password: "PASSWORD",
},
});
const page = await browser.newPage();
await page.goto("https://api.ipify.org?format=json");
console.log(await page.textContent("body"));
await browser.close();Example output
{"ip":"203.0.113.10"}Your output shows a different address in the country you chose.
A tool function with a per-run proxy
The Python tool reads the credentials from environment variables, URL-encodes them and derives the session ID from the run ID. Every step of a run reuses that session, so it keeps one exit IP for the TTL while that IP stays available, and parallel runs each get their own session ID.
The Playwright tab does the same for a browser: the server, username and password go into separate fields. If your agent uses a framework or a hosted browser, the framework guides and the cloud browser guide show where these values go.
- httpx 0.28 and later take
proxy=; the olderproxies=argument was removed - A 30-second timeout, so one slow page can’t stall the agent
- A
407on an HTTPS URL raiseshttpx.ProxyError: check the username syntax and password - Connection details for every client are in the proxy string format docs
import hashlib
import os
from urllib.parse import quote
import httpx
GATEWAY = {"US": "us", "DE": "eu", "GB": "eu"} # Americas or Europe gateway
def proxy_for(run_id: str, country: str = "US", ttl: int = 30) -> str:
"""Proxy URL for one agent run: same session ID, same exit IP for the TTL."""
sid = hashlib.sha256(run_id.encode()).hexdigest()[:8] # letters and digits only
user = quote(f"{os.environ['NETDASH_USERNAME']}-cc-{country}-session-{sid}-ttl-{ttl}", safe="")
password = quote(os.environ["NETDASH_PASSWORD"], safe="")
return f"http://{user}:{password}@scale-{GATEWAY[country]}.netdash.io:2000"
def fetch_page(url: str, run_id: str, country: str = "US") -> str:
"""Tool the agent calls. The model passes a URL; credentials stay in the environment."""
with httpx.Client(proxy=proxy_for(run_id, country), timeout=30) as client:
try:
response = client.get(url, follow_redirects=True)
except httpx.ProxyError as exc: # e.g. 407: check the username syntax and password
raise RuntimeError("netdash refused the proxy connection") from exc
response.raise_for_status()
return response.text
if __name__ == "__main__":
print(fetch_page("https://api.ipify.org?format=json", run_id="run-2026-10-09-001"))import { createHash } from "node:crypto";
import { chromium } from "playwright";
const GATEWAY = { US: "us", DE: "eu", GB: "eu" }; // Americas or Europe gateway
// One browser per agent run, kept on one exit IP by a sticky session.
export function browserForRun(runId, country = "US") {
const sid = createHash("sha256").update(runId).digest("hex").slice(0, 8);
return chromium.launch({
proxy: {
server: `http://scale-${GATEWAY[country]}.netdash.io:2000`,
username: `${process.env.NETDASH_USERNAME}-cc-${country}-session-${sid}-ttl-30`,
password: process.env.NETDASH_PASSWORD,
},
});
}
const browser = await browserForRun("run-2026-10-09-001");
const page = await browser.newPage();
await page.goto("https://api.ipify.org?format=json", { timeout: 30_000 });
console.log(await page.textContent("body"));
await browser.close();Which proxies AI agents should use
Residential proxies suit most agents that browse public sites. Mobile and static ISP IPs cover narrower jobs.
Residential proxies
Self-serveThe default for agents that browse public sites. Pick the exit country per task: rotating for independent lookups, sticky for multi-step tasks. The examples on this page use the Scale plan.
From $1.20/GB, graduated per order
Mobile proxies
Self-serveFor tasks about what a site returns to visitors on mobile exit IPs. Same credentials and syntax as residential; carrier and network generation can’t be selected.
From $3.50/GB, graduated per order
ISP proxies
Through salesFor a long-running agent that needs one static IP for days, for example against a service you operate that admits known IPs.
$1.60 per IP per 30 days
Guardrails to build into the agent
A proxy gives an agent reach, so the agent needs limits of its own. If it collects training data, read AI training data scraping for robots.txt, terms, copyright and personal data.
A list of allowed domains
Give the agent the sites it may visit and refuse everything else. It keeps the agent on task and its traffic predictable.
Hand off when a site pushes back
When a page shows a CAPTCHA, a login wall or a rate limit, the agent stops and hands the task to a person, or skips the site.
A budget per run
Cap requests and GB per run, and pause the run when it reaches the cap. Purchased GB never expire, but a runaway loop still uses them.
No logins or personal data without authorization
The agent signs in to accounts or collects personal data only when you are authorized to and have a lawful basis.
Log the exit country and session ID
Store the country code and session ID with each run’s results, so you can reproduce what the agent saw.
What netdash doesn’t do for an agent
Your agent and its client do the work: the browser renders pages, and the agent decides what to do next. netdash carries the traffic and leaves it unchanged, so a challenge reaches the agent exactly as the site sent it. The same limits apply to every product; see the full comparison.
No CAPTCHA solving, JavaScript rendering, retries or unblocking
netdash forwards your traffic unchanged, so a challenge reaches your client exactly as the website sent it.
Targeting below country level
You choose the exit country; you can't select a city, region, ZIP code, ASN or carrier.
Authentication by IP address
Every request uses your username and password.
A public account API or SDK
None is needed: it's a standard HTTP proxy, and usage lives in the dashboard.
Published uptime figures or an SLA
We don't publish uptime figures or offer an SLA.
Responsible use for agents
Your agent acts on your behalf, so its traffic is your traffic. Keep it to public pages and the rules of the sites it visits, give it a request budget, and have it stop when a site shows a CAPTCHA, a login wall or a rate limit. netdash forwards requests and doesn’t solve challenges. Collecting training data raises its own questions about robots.txt, terms, copyright and personal data: see AI training data scraping and how we expect netdash to be used.
Guides for agent builders
- Claude Code with Playwright MCP
Let your coding agent wire netdash into a project and a browser.
- Setup prompt for coding agents
A prompt that gives your agent the connection facts and rules.
- Agent frameworks
Proxy settings for Browser Use, the OpenAI Agents SDK and LangChain.
- Browser Use
Server, username and password for the browser a Browser Use agent drives.
- OpenAI Agents SDK
A function tool with a proxied HTTP client, and the browser launch for computer use.
- LangChain
Proxied HTTP tools and a browser toolkit on a proxied browser.
- Cloud browsers
Remote and hosted browsers, and where the proxy layer sits.
- Playwright
Per-browser and per-context proxies for agents that drive Chromium.
- Browser automation
Sticky sessions per browser context and fewer GB per page.
- Web data collection
Scheduled collection of public pages by country.
- Rotating and sticky sessions
Session IDs, TTLs and when to keep one exit IP.
- llms.txt
The connection facts in plain text for coding assistants.
Questions about agents and proxies
No. netdash forwards traffic and doesn’t modify it, so challenges reach the agent’s browser unchanged. Build the agent to stop and hand the task to a person, or to skip the site.
Add -session-{id}-ttl-{minutes} to the username. Reusing the same session ID keeps the same exit IP for the TTL while that IP stays available. The dashboard offers sticky lifetimes from 15 minutes up to 7 days. See rotating and sticky sessions.
No. One username and password covers every residential and mobile plan on your account. Separate runs with session IDs, and keep the credentials in environment variables or a secret manager, never in prompts.
No. netdash is a standard HTTP proxy. Set it in the browser or HTTP client your agent uses; the guides for Claude Code and agent frameworks show where.
There’s no per-account concurrency limit. Each run uses GB from the plan’s balance, and purchased GB never expire; see pricing. Keep each site’s request rate reasonable.
Connect your first agent
Create an account, then give one agent run an exit country and its own session ID. The Claude Code guide walks a coding agent through the setup.