AI Agents
Network identity for web-facing AI agents.
Agents that browse, fetch, and call tools need a stable, trustworthy route to the open web. NinjaProxy gives them HTTP/SOCKS5 endpoints, residential or static IPs, and sticky sessions — with first-party llms.txt, mcp.json, and a local MCP server so your assistant can set it up correctly.
Positioned around reliable agent network identity — not scraping bypass. See /capabilities for the exact product behavior behind every claim on this page.
Supported today
What your agents get.
Every item below is backed by the live product — routing endpoints, the account API, and published AI resources. No roadmap promises.
HTTP and SOCKS5 endpoints
Route agent traffic over standard HTTP/S or SOCKS5. Works with any client that speaks a proxy — requests, httpx, aiohttp, Playwright, or your own tool-calling loop.
Residential and static options
Use rotating residential IPs for stricter targets, or assigned ISP/static IPs when an agent needs one stable, long-lived identity.
Sticky sessions
Pin a route across a multi-step run — login, navigate, submit — by adding structured session controls to the username on a rotating gateway.
Account API endpoint discovery
Fetch your assigned HTTP and SOCKS5 endpoints and rotate credentials programmatically through the authenticated account API — no scraping the dashboard.
First-party AI resources
A public llms.txt and mcp.json let assistants preload accurate setup docs, plus a local @ninjaproxy/mcp-server package for host-only environments.
Copy-paste examples
Proxy-aware Python fetch loops and sticky Playwright browser sessions you can drop into an agent runtime today.
Programmatic setup
Discover endpoints from the account API.
An agent can read its assigned HTTP and SOCKS5 endpoints and rotate its API key over the authenticated account API — so setup and credential hygiene live in code, not a dashboard click-through.
| Method | Endpoint | What it gives an agent |
|---|---|---|
| GET | /v2/me/ips | List assigned proxies with their http_endpoint, socks_endpoint, and endpoint_auth_modes. |
| GET | /v2/me/credentials | Read the account API key an agent uses to authenticate proxy requests. |
| POST | /v2/me/credentials | Rotate the account API key from your agent without touching the dashboard. |
Full reference: /docs/api.
Drop-in examples
From tool-calling loop to browser agent.
Placeholders like <HTTP_ENDPOINT> and <API_KEY> come from your portal or the account API — live values are account-specific.
Proxy-aware Python agent
requests / httpx / aiohttp fetch worker.
import requests
# Endpoint + key come from GET /v2/me/ips and /v2/me/credentials,
# or from Portal -> Proxy IPs. Host/port values are account-specific.
PROXY_URL = "http://<USERNAME>:<API_KEY>@<HTTP_ENDPOINT>"
proxies = {"http": PROXY_URL, "https": PROXY_URL}
def agent_fetch(url: str) -> str:
r = requests.get(url, proxies=proxies, timeout=20)
r.raise_for_status()
return r.text
# Tool-calling loop / LangChain-style fetch worker
print(agent_fetch("https://example.com/")[:200])Playwright with a sticky session
One identity across a multi-step run.
from playwright.sync_api import sync_playwright
# Sticky session: one identity across login + navigation.
# --session pins the route; --duration bounds how long to keep it.
proxy_username = "<USERNAME>--session-agent-login-01--duration-600--provider-res"
with sync_playwright() as p:
browser = p.chromium.launch(proxy={
"server": "http://<ROTATING_HTTP_ENDPOINT>",
"username": proxy_username,
"password": "<API_KEY>",
})
page = browser.new_page()
page.goto("https://example.com/account")
print(page.title())
browser.close()SOCKS5
For agents that prefer a raw socket route:
# SOCKS5 for agents that prefer a raw socket route
curl -x "socks5h://<USERNAME>:<API_KEY>@<SOCKS_ENDPOINT>" \
"https://ip.ninjasproxy.com/"For assistants
Let the assistant set it up.
NinjaProxy publishes first-party resources so an AI assistant can preload accurate setup docs instead of guessing. Use the local MCP package when traffic must stay on your own host.
Straight talk
What we do and don't claim.
This page positions agent network identity, not scraping bypass. Use NinjaProxy for authorized data collection and automation, and respect target sites' terms and rate limits — account responsibility applies.
- Endpoints and credentials are exposed through the account API, but proxy lifecycle (creating/deleting ports, buying traffic, burn/health webhooks) is not an autonomous, self-provisioning API today.
- SOCKS5 is fully supported — but HTTP/S remains the simplest path for most browser and page-fetch agents. Pick SOCKS5 when your client needs a raw socket route.
- Use the exact host and port shown in your portal. Public docs use placeholders like <HTTP_ENDPOINT> because live endpoint values are account-specific.
Guide
AI agents docs →
Which proxy type fits which agent workflow, session control, and full Python/Playwright walkthroughs.
Assistants
MCP guide →
The mcp.json bootstrap manifest and the local @ninjaproxy/mcp-server package for host-only setups.
Programmatic
Account API →
Discover endpoints, read inventory, and rotate credentials from your agent.
Routing
Rotating & sticky sessions →
Username controls, headers, geo targeting, and sticky-session behavior.
Give your agents a better route.
Residential and static IPs, HTTP/SOCKS5, sticky sessions, and an account API — ready for your next agent run.
