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

# Optimize for speed

> Knobs that make an agent respond faster, and what each one costs.

## Fast preset

A fast, read-only research agent:

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

client = Client()
result = client.run_session(
    agent={
        "name": "fast-reader",
        "description": "Answers questions from Wikipedia.",
        "model": "holo4-35b-a3b",
        "reasoning_effort": "disabled",
        "environments": [{
            "id": "browser",
            "kind": "web",
            "start_url": "https://en.wikipedia.org/wiki/Python_(programming_language)",
            "settle_s": 0.3,
            "mode": {"type": "text"},
        }],
    },
    messages="Who created Python, and in what year?",
)
print(result.answer)
```

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

const client = new HaiAgentsClient();
const result = await client.runSession({
  agent: {
    name: "fast-reader",
    description: "Answers questions from Wikipedia.",
    model: "holo4-35b-a3b",
    reasoningEffort: "disabled",
    environments: [{
      id: "browser",
      kind: "web",
      startUrl: "https://en.wikipedia.org/wiki/Python_(programming_language)",
      settleS: 0.3,
      mode: { type: "text" },
    }],
  },
  messages: "Who created Python, and in what year?",
});
console.log(result.answer);
```

```bash cURL theme={"system"}
curl -X POST https://agp.eu.hcompany.ai/api/v2/sessions \
  -H "Authorization: Bearer $HAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent": {
      "name": "fast-reader",
      "description": "Answers questions from Wikipedia.",
      "model": "holo4-35b-a3b",
      "reasoning_effort": "disabled",
      "environments": [{
        "id": "browser",
        "kind": "web",
        "start_url": "https://en.wikipedia.org/wiki/Python_(programming_language)",
        "settle_s": 0.3,
        "mode": {"type": "text"}
      }]
    },
    "messages": "Who created Python, and in what year?"
  }'
```

The defaults favor accuracy. Change one knob at a time and check the results on your tasks.

## Start faster

A session starts, then works in [steps](https://hub.hcompany.ai/agents-api/environments/overview.md#how-it-works).

| Knob | Effect | Trade-off |
| - | - | - |
| [Local runtime](https://hub.hcompany.ai/agents-api/local-runtime.md) with your browser or desktop | No session start wait. Actions run next to the agent, with no network round trip. | The agent loop runs on your machine, without web search or subagents. |
| [`lazy: true`](https://hub.hcompany.ai/agents-api/browser/configuration#fields) (cloud browser) | The session starts before the browser does. | The first browser action waits for it instead. |

## Shorten each step

| Knob | Effect | Trade-off |
| - | - | - |
| `model: "holo4-35b-a3b"` | Faster model calls. | Weaker than `holo4-27b` on complex tasks. |
| `reasoning_effort: "disabled"` | No thinking before each action. | Less planning. |
| `mode: {"type": "text"}` (browser) | No screenshots to read. | Read-only: the agent cannot click or type. |
| `settle_s` (browser, default `1.0`), `mode.settle_s` (desktop, default `0.5`) | Shorter wait after each action. | The agent may see a page that is still loading. |
| `mode.width`, `mode.height` (cloud browser), `screenshot_max_width` (desktop) | Smaller screenshots, so fewer image tokens. | Small targets are harder to hit, which can add steps. |
| [Region](https://hub.hcompany.ai/agents-api/sdks.md#region) | Less network latency. | None. |
| [Your own model server](https://hub.hcompany.ai/agents-api/local-runtime.md#use-your-own-model-server) | Model calls stay on your network. | You run the GPUs. |

A Holo4 screenshot costs about width × height / 1024 input tokens:

| Screenshot | Tokens |
| - | - |
| `800`×`600` | 477 |
| `1280`×`800` | 1,002 |
| `1200`×`1200` (browser default) | 1,446 |
| `1920`×`1080` | 2,042 |
| `1920`×`1247` (MacBook Pro 14" at the desktop cap) | 2,342 |

## Take fewer steps

| Knob | Effect | Trade-off |
| - | - | - |
| `start_url` | The agent opens on the right page. | None. |
| `browser_profile_id` | The session starts [signed in](https://hub.hcompany.ai/agents-api/browser/profiles.md). | You maintain the profile. |
| `instructions` | Naming the exact pages or steps cuts exploration. | None. |
| [Custom tools](https://hub.hcompany.ai/agents-api/custom-tools.md) | One call to your API replaces a multi-step UI flow. | You write and run the tool. |
| [Subagents](https://hub.hcompany.ai/agents-api/multi-agent.md) | Independent subtasks run in parallel. | Each subagent is its own session. |


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