> ## Documentation Index
> Fetch the complete documentation index at: https://hub.hcompany.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> H Platform has four products: the Agents API (managed computer-use agents, base URL https://agp.eu.hcompany.ai/api/v2 or https://agp.hcompany.ai/api/v2 for the US), the Models API (OpenAI-compatible Holo vision-language models at https://api.hcompany.ai/v1), HoloDesktop CLI (Holo on the user's own desktop), and HoloTab (a free no-code Chrome extension that runs Holo in the user's browser, with recordable routines and schedules).
> Authenticate with a bearer API key from the HAI_API_KEY environment variable. SDKs: `pip install hai-agents` (Python, `from hai_agents import Client`) and `npm install hai-agents` (TypeScript, `import { HaiAgentsClient } from "hai-agents"`). CLI: `hai`.
> Agents do work in a browser or on a desktop; describe the task as an imperative instruction. To run a task quickly, prefer the pre-built agent `h/web-surfer-flash`. Read results from the session's `latest_answer` after it reaches a terminal status.
> Sessions are the unit of work; wait for a terminal status (completed, failed, timed_out, interrupted) before reading the answer. Use webhooks or the `changes` long-poll endpoint to follow progress.

# Route the browser through a proxy

> Egress the browser through an H-managed proxy or one you operate.

Route the browser's traffic through a proxy when a site blocks datacenter IPs or geofences by region, or when a run needs traffic from a specific network. Set the [browser environment](/agents-api/browser/configuration)'s `network` field to exactly one of two options. Both apply to cloud browsers. A [local browser](/agents-api/local-control) uses your machine's own network.

| Option | Field | When to use |
| - | - | - |
| Managed proxy | `network.managed_proxy` | You want H to provision the proxy. You pick pool, country, and stickiness. H resolves credentials server-side, and they never appear in your requests, session data, or logs. |
| Bring your own | `network.proxy_url` | You already operate a proxy, or need traffic from a specific network. |

## Managed proxy

| Field | Type | Default | Meaning |
| - | - | - | - |
| `pool` | string | `"residential"` | `residential` (real-ISP addresses, best for sites that block datacenter ranges) or `datacenter`. A pool not available in your environment fails with `400`. |
| `country` | string \| null | `null` | Two-letter ISO 3166-1 code (like `"US"`). Omit for any location. Invalid codes fail with `422`. |
| `sticky` | boolean | `true` | Keep the same exit IP for the whole session. Residential pools only. Datacenter endpoints manage rotation themselves. |

```json Managed proxy theme={"system"}
{ "network": { "managed_proxy": { "pool": "residential", "country": "US" } } }
```

## Bring your own proxy

`network.proxy_url` (string, default `null`) is your proxy URL with credentials inline, like `http://user:pass@host:port`. HTTP, HTTPS, and SOCKS schemes work. Treat the value as a secret.

```json Bring your own theme={"system"}
{ "network": { "proxy_url": "http://user:pass@proxy.example.com:8080" } }
```

## Create a proxied browser

This catalog browser egresses from a US residential IP.

<CodeGroup>
  ```bash cURL theme={"system"}
  # Bring your own: "network": {"proxy_url": "http://user:pass@proxy.example.com:8080"}
  curl -X POST https://agp.eu.hcompany.ai/api/v2/environments \
    -H "Authorization: Bearer $HAI_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "id": "us-browser",
      "kind": "web",
      "network": {"managed_proxy": {"pool": "residential", "country": "US"}}
    }'
  ```

  ```python Python theme={"system"}
  from hai_agents import BrowserNetwork, Client, ManagedProxySelection

  client = Client()

  environment = client.environments.create_environment(
      id="us-browser",
      kind="web",
      network=BrowserNetwork(
          managed_proxy=ManagedProxySelection(pool="residential", country="US"),
      ),
      # Bring your own: network=BrowserNetwork(proxy_url="http://user:pass@proxy.example.com:8080")
  )
  print(environment.id)
  ```

  ```typescript TypeScript theme={"system"}
  import { HaiAgentsClient } from "hai-agents";

  const client = new HaiAgentsClient();

  const environment = await client.environments.createEnvironment({
    kind: "web",
    id: "us-browser",
    network: { managedProxy: { pool: "residential", country: "US" } },
    // Bring your own: network: { proxyUrl: "http://user:pass@proxy.example.com:8080" }
  });
  console.log(environment.id);
  ```
</CodeGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.