> ## 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 three 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), and HoloTab (a free no-code Chrome extension that runs Holo in the user's browser, with recordable routines and schedules). The `holo` CLI (`pip install "hai-agents[cli]"`) runs Agents API agents from a terminal, drives the user's own desktop with `-a h/holo-desktop`, and serves coding agents through `holo mcp`.
> 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: `holo`.
> 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.

# The environment object

> The shape of an environment: a cloud browser or your own desktop.

## Environment shape

An environment is the surface an agent acts on. [Create](https://hub.hcompany.ai/agents-api/environments/create.md), [retrieve](https://hub.hcompany.ai/agents-api/environments/retrieve.md), [list](https://hub.hcompany.ai/agents-api/environments/list.md), [update](https://hub.hcompany.ai/agents-api/environments/update.md), [patch](https://hub.hcompany.ai/agents-api/environments/patch.md), and [restore](https://hub.hcompany.ai/agents-api/environments/restore-revision.md) return it. An agent can also define one inline, in [`environments`](https://hub.hcompany.ai/agents-api/agents/agent-object#param-environments).

`kind` decides the shape:

| `kind` | Object | Guide |
| - | - | - |
| `web` (default) | [Browser](#browser) | [Browser configuration](https://hub.hcompany.ai/agents-api/browser/configuration.md) |
| `desktop` | [Desktop](#desktop) | [Your desktop](https://hub.hcompany.ai/agents-api/your-desktop.md) |

Other kinds in the schema are in preview: using one returns `403` with `environment_not_public`.

## Browser

A browser H runs in the cloud for each session.

```json Browser theme={"system"}
{
  "id": "wide-browser",
  "kind": "web",
  "host": "cloud",
  "start_url": "https://news.ycombinator.com",
  "headless": false,
  "session_id": null,
  "mode": {"type": "visual", "width": 1920, "height": 1080, "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
}
```

**id** `string`

Catalog identifier, with an optional single `org/` namespace prefix. Can't contain `:`, which [pins a revision](https://hub.hcompany.ai/agents-api/environments/overview.md#revisions). Immutable. `h/` IDs are H's reserved, read-only environments.

**kind** `string`

`web`.

**host** `string`

`cloud`: H runs the browser.

**start\_url** `string | null`

Initial URL to open, an absolute `http` or `https` URL. Defaults to `https://www.bing.com`.

**headless** `boolean`

Whether the browser runs without a visible window. Defaults to `false`.

**session\_id** `string | null`

An existing browser session to attach to instead of starting a new one.

**mode** `object`

How the agent perceives and drives the browser, one of the [modes](https://hub.hcompany.ai/agents-api/browser/configuration.md#modes), keyed by `type`.

**type** `string`

`visual` (default): acts on screenshots by viewport coordinates. `text`: reads paginated markdown, no screenshots.

**width** `integer`

`visual` only. Viewport width in pixels. Defaults to `1200`.

**height** `integer`

`visual` only. Viewport height in pixels. Defaults to `1200`.

**markdown** `boolean`

`visual` only. Also include the viewport's text as markdown with each screenshot. Defaults to `false`.

**chunk\_size** `integer`

`text` only. Characters of page text per chunk. Defaults to `20000`.

**lazy** `boolean`

Start the browser on the agent's first browser action instead of when the session starts, skipping the initial observation. Defaults to `false`.

**settle\_s** `number`

Seconds the agent waits after each action, so the next observation shows the settled page. `0` to `10`, default `1.0`.

**vault\_id** `string | null`

A [vault](https://hub.hcompany.ai/agents-api/browser/configuration.md#credentials-and-2fa) the agent signs in to sites with. Must belong to your organization.

**browser\_profile\_id** `string | null`

A [browser profile](https://hub.hcompany.ai/agents-api/browser/configuration.md#browser-profiles) loaded at start, restoring saved cookies and storage. Must belong to your organization.

**use\_default\_browser\_profile** `boolean`

Load your [default browser profile](https://hub.hcompany.ai/agents-api/browser/configuration.md#default-profiles) instead of naming one, creating an empty one on first use. Can't be combined with `browser_profile_id`.

**persist\_browser\_profile** `boolean`

Save the session's final browser state back into the loaded profile when it ends. Requires `browser_profile_id` or `use_default_browser_profile`. Best-effort: if another session is already [persisting the profile](https://hub.hcompany.ai/agents-api/browser/configuration.md#persisting-state-back-into-the-profile), the session starts read-only.

**network** `object | null`

[Proxy](https://hub.hcompany.ai/agents-api/browser/configuration.md#route-through-a-proxy) settings for a newly provisioned browser. Ignored when `session_id` attaches to an existing one. Holds one of:

**managed\_proxy** `object | null`

A proxy H provisions: `pool` (`residential`, the default, or `datacenter`), `country` (two-letter ISO code), and `sticky` (keep one exit IP for the session, default `true`). Credentials never appear in your requests.

**proxy\_url** `string | null`

Your own HTTP, HTTPS, or SOCKS proxy URL, credentials inline, for example `http://user:pass@host:port`. Reads back as `***` on a [session](https://hub.hcompany.ai/agents-api/sessions/session-object.md#param-request).

## Desktop

Your own computer, reached through the Python SDK or `holo` ([Your desktop](https://hub.hcompany.ai/agents-api/your-desktop.md)).

```json Desktop theme={"system"}
{
  "id": "my-laptop",
  "kind": "desktop",
  "mode": {"type": "visual", "settle_s": 0.5},
  "session_id": null,
  "lazy": false,
  "screenshot_max_width": null
}
```

**id** `string`

Catalog identifier, as on a [browser](#browser).

**kind** `string`

`desktop`.

**mode** `object`

How the agent perceives and drives the machine, keyed by `type`.

**type** `string`

`visual` (default): [screen](https://hub.hcompany.ai/agents-api/your-desktop.md#visual-mode), mouse, and keyboard, with a screenshot after each step. `shell`: [commands and files](https://hub.hcompany.ai/agents-api/your-desktop.md#shell-mode), with the screen and browser through CLIs.

**settle\_s** `number`

`visual` only. Seconds to wait after each mouse or keyboard action. `0` to `10`, default `0.5`.

**command\_approval** `string`

`shell` only. `not_required` (default), or `required` to hold each command for your [approval](https://hub.hcompany.ai/agents-api/your-desktop.md#approve-commands) unless it starts with one of `allowed_commands`.

**allowed\_commands** `string[]`

`shell` only. Commands that run without approval, each with any arguments, such as `git status`.

**sandbox** `string`

`shell` only. `if_available` (default) confines commands on a machine that has the [sandbox](https://hub.hcompany.ai/agents-api/your-desktop.md#sandbox) and runs them as you on one that does not. `required` runs no command on a machine that cannot confine them.

**allowed\_domains** `string[]`

`shell` only. Hosts confined commands may reach besides the Python and npm registries, such as `github.com` or `*.example.com`.

**writable\_folders** `string[]`

`shell` only. Folders confined commands may write besides the session's own, absolute or under `~/`, such as `~/Projects/app`.

**session\_id** `string | null`

The desktop's command channel. The Python SDK and `holo` set it. Set it yourself only to [connect from another client](https://hub.hcompany.ai/agents-api/your-desktop.md#connect-from-another-client).

**lazy** `boolean`

Connect on the agent's first desktop action instead of when the session starts, skipping the first screenshot. Defaults to `false`.

**screenshot\_max\_width** `integer | null`

Maximum screenshot width, `1` to `1920` pixels. `null` uses `1920`. Screenshots are only shrunk, never enlarged.

Your machine's own settings can override the `shell` fields: see [Settings](https://hub.hcompany.ai/agents-api/your-desktop.md#mode-fields).


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