Docs menu
Docs Reference
LangChain
Give a LangChain agent residential, datacenter or mobile IPs: a page-reading tool and a document loader.
Last verified: October 2026What it does
The langchain-proxmint package connects LangChain to your Proxmint proxies. It has two parts:
ProxmintFetchTool, an agent tool. The agent passes a URL and, if it wants, a country, and gets back the final URL, the status, the title and the page as readable text.ProxmintLoader, a document loader that fetches a list of URLs intoDocuments for indexing or summarising.
Requests go straight from your code to the gateway, from the IPs and location you pick, and use the bandwidth of your own product. The source is on GitHub and the package on PyPI.
Install and connect
Install the package and create an API key under Settings in the dashboard (the same read-only key the customer API uses):
The key looks up the proxy login of the product you choose, so there is nothing else to copy. If you would rather not use a key, set PROXMINT_USERNAME and PROXMINT_PASSWORD to the proxy login from your product page, or pass username and password.
Use it in an agent
Give the tool to any agent that calls tools:
When the gateway refuses a request, for example because the product is out of bandwidth or no IP matches the targeting, the agent gets a one-line reason and what to change instead of a stack trace. The error codes page lists them all.
Load pages into Documents
Each URL gets a new IP unless session_minutes is set; then the whole run leaves from one IP, which suits pages that belong to one browsing session. A URL that fails is logged and skipped.
Options
| Option | Default | What it does |
|---|---|---|
product | "residential" | residential, premium-residential, datacenter or mobile. |
country | any | Exit country as a two-letter code. On the tool it is the default when a call names none. |
state, city, zip_code, asn | none | Finer targeting inside the country. Needs country. |
session_minutes | none | Keep one exit IP for 1 to 120 minutes: across calls on the tool, across the whole run on the loader. |
output | "text" | text returns readable text, html the raw page. |
timeout | 60 | Seconds per request. |
max_chars | 50000 | Tool only: longer pages are cut here. |
continue_on_failure | True | Loader only: log and skip a URL that fails, instead of raising. |
Good to know
- State, city, ZIP and ASN targeting can meter at twice the bandwidth; the targeting page says which products.
- Pages load over the destination ports the network forwards, which cover the usual web ports (see port access). A short list of sites is refused outright (see blocked websites).
- Each product allows up to 2,000 concurrent connections, so loaders can run in parallel.
- The tool does not run JavaScript. It reads what the server sends.