> ## 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.

# Retrieve an environment

> Get the full specification of an environment by id, including mode, start URL, vault, and profile settings.

Retrieves one environment's full specification, including pre-built `h/` environments.

**Returns** the [environment object](#response).

## Path parameters

<ParamField path="id" type="string" required>
  The environment's `id` (e.g. `h/browser` or `my-browser`). Slash-containing identifiers are supported.
</ParamField>

## Response

The environment object, also returned by create, list, update, and patch. A browser (`kind: "web"`) carries the fields below. A desktop (`kind: "desktop"`) carries only `id`, `kind`, `host`, `session_id`, `lazy`, `settle_s`, and `screenshot_max_width`. Field meanings are on [Create an environment](/agents-api/environments/create#request-body).

<ResponseField name="id" type="string">
  Catalog identifier. `h/` ids are H's reserved, read-only environments.
</ResponseField>

<ResponseField name="kind" type="string">
  `web` or `desktop`.
</ResponseField>

<ResponseField name="host" type="string">
  `cloud` or `user_device`.
</ResponseField>

<ResponseField name="start_url" type="string">
  Initial URL.
</ResponseField>

<ResponseField name="headless" type="boolean">
  Whether the browser runs without a visible window.
</ResponseField>

<ResponseField name="session_id" type="string | null">
  Existing browser session to attach to.
</ResponseField>

<ResponseField name="mode" type="object">
  `{"type": "visual", "width", "height", "markdown"}` or `{"type": "text", "chunk_size"}`.
</ResponseField>

<ResponseField name="lazy" type="boolean">
  Whether the browser starts on first use.
</ResponseField>

<ResponseField name="settle_s" type="number">
  Seconds the agent waits after each action.
</ResponseField>

<ResponseField name="vault_id" type="string | null">
  Bound [vault](/agents-api/vaults/overview).
</ResponseField>

<ResponseField name="browser_profile_id" type="string | null">
  [Browser profile](/agents-api/browser/profiles) loaded at start.
</ResponseField>

<ResponseField name="use_default_browser_profile" type="boolean">
  Whether your default browser profile is loaded.
</ResponseField>

<ResponseField name="persist_browser_profile" type="boolean">
  Whether the final browser state is saved back into the profile.
</ResponseField>

<ResponseField name="network" type="object | null">
  Proxy settings: `managed_proxy` or `proxy_url`.
</ResponseField>

## Examples

<CodeGroup>
  ```bash cURL theme={"system"}
  curl "https://agp.eu.hcompany.ai/api/v2/environments/h/browser" \
    -H "Authorization: Bearer $HAI_API_KEY"
  ```

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

  client = Client()

  environment = client.environments.get_environment("h/browser")
  print(environment)
  ```

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

  const client = new HaiAgentsClient();

  const environment = await client.environments.getEnvironment({ id: "h/browser" });
  console.log(environment);
  ```
</CodeGroup>

```json Response theme={"system"}
{
  "id": "h/browser",
  "kind": "web",
  "host": "cloud",
  "start_url": "https://www.bing.com",
  "headless": false,
  "session_id": null,
  "mode": {"type": "visual", "width": 1200, "height": 1200, "markdown": false},
  "lazy": false,
  "settle_s": 1.0,
  "vault_id": null,
  "browser_profile_id": null,
  "use_default_browser_profile": false,
  "persist_browser_profile": false,
  "network": null
}
```

## Errors

| Status | Cause |
| - | - |
| `404` | Environment not found or you don't have access. |


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