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

# Run agents over MCP

> Run and manage H computer-use agents from Claude, Cursor, or any MCP host, without writing HTTP or SDK code.

export const Notice = ({kind = "note", title, children}) => {
  const kinds = {
    warning: {
      label: "User notice",
      icon: <>
          <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" />
          <path d="M12 9v4" />
          <path d="M12 17h.01" />
        </>
    },
    gotcha: {
      label: "Gotcha",
      icon: <>
          <circle cx="12" cy="12" r="10" />
          <path d="M12 16v-4" />
          <path d="M12 8h.01" />
        </>
    },
    note: {
      label: "Note",
      icon: <>
          <circle cx="12" cy="12" r="10" />
          <path d="M12 16v-4" />
          <path d="M12 8h.01" />
        </>
    }
  };
  const k = kinds[kind];
  return <div className="notice my-6 rounded-xl border border-zinc-200 bg-white p-5 dark:border-zinc-800 dark:bg-zinc-950">
      <div className={`${kind === "warning" ? "not-prose flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-red-400/80 dark:text-red-400/70" : kind === "gotcha" ? "not-prose flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-amber-500/80 dark:text-amber-400/70" : "not-prose flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-zinc-400 dark:text-zinc-500"}`}>
        <svg className="h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
          {k.icon}
        </svg>
        {k.label}
      </div>
      {title && <div className="not-prose mt-2 text-base font-semibold text-zinc-900 dark:text-zinc-100">{title}</div>}
      <div className="notice-body mt-3 text-sm leading-6 text-zinc-700 dark:text-zinc-300">{children}</div>
    </div>;
};

The Agents API ships an official [Model Context Protocol](https://modelcontextprotocol.io) server, so hosts like Cursor, Claude Code, VS Code, Codex, and Hermes can run and manage H agents as tools.

| | |
| - | - |
| Transport | Remote streamable HTTP at `/mcp` on your [region's host](/agents-api/sdks#region) |
| Auth | Your H API key as `Authorization: Bearer hk-...` |
| Works with | Any client that can send a bearer header |
| Not supported | Clients that require OAuth, like Claude.ai web or the ChatGPT app |

<Notice kind="note" title="Searching these docs from an AI tool?">
  That's the separate [docs MCP server](/docs-mcp-server).
</Notice>

## Add to your editor

One click installs the `hai-agents` server. Paste your [API key](/agents-api/quickstart#get-your-api-key) when prompted. These buttons target the EU region (the default):

<CardGroup cols={2}>
  <Card title="Add to Cursor" icon="https://cdn.simpleicons.org/cursor/6b6b70" href="cursor://anysphere.cursor-deeplink/mcp/install?name=hai-agents&config=eyJ1cmwiOiAiaHR0cHM6Ly9hZ3AuZXUuaGNvbXBhbnkuYWkvbWNwIiwgImhlYWRlcnMiOiB7IkF1dGhvcml6YXRpb24iOiAiQmVhcmVyIGhrLVlPVVJfS0VZIn19">
    Opens Cursor and prompts to install.
  </Card>

  <Card title="Add to VS Code" icon="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/vscode/vscode-original.svg" href="vscode:mcp/install?%7B%22name%22%3A%20%22hai-agents%22%2C%20%22type%22%3A%20%22http%22%2C%20%22url%22%3A%20%22https%3A//agp.eu.hcompany.ai/mcp%22%2C%20%22headers%22%3A%20%7B%22Authorization%22%3A%20%22Bearer%20hk-YOUR_KEY%22%7D%7D">
    Opens VS Code and prompts to install.
  </Card>
</CardGroup>

US region: [Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=hai-agents\&config=eyJ1cmwiOiAiaHR0cHM6Ly9hZ3AuaGNvbXBhbnkuYWkvbWNwIiwgImhlYWRlcnMiOiB7IkF1dGhvcml6YXRpb24iOiAiQmVhcmVyIGhrLVlPVVJfS0VZIn19) or [Add to VS Code](vscode:mcp/install?%7B%22name%22%3A%20%22hai-agents%22%2C%20%22type%22%3A%20%22http%22%2C%20%22url%22%3A%20%22https%3A//agp.hcompany.ai/mcp%22%2C%20%22headers%22%3A%20%7B%22Authorization%22%3A%20%22Bearer%20hk-YOUR_KEY%22%7D%7D). Registry-aware clients also find it in the [MCP Registry](https://registry.modelcontextprotocol.io) as `io.github.hcompai/hai-agents`.

With the [`hai` CLI](/agents-api/sdks), `hai mcp install` wires the server into every detected client (Cursor, VS Code, VS Code Insiders, Claude Code, Hermes, Windsurf). Pass a client id to target one (`hai mcp install cursor`), or `list` to see the ids. It writes your API key into each config in plaintext.

## Connect manually

Point your client at the `/mcp` URL for your [region](/agents-api/sdks#region) with the `Authorization` header:

<CodeGroup>
  ```json Cursor theme={"system"}
  // ~/.cursor/mcp.json
  {
    "mcpServers": {
      "hai-agents": {
        "url": "https://agp.eu.hcompany.ai/mcp",
        "headers": { "Authorization": "Bearer hk-..." }
      }
    }
  }
  ```

  ```bash Claude Code theme={"system"}
  claude mcp add --scope user --transport http hai-agents https://agp.eu.hcompany.ai/mcp \
    --header "Authorization: Bearer hk-..."
  ```

  ```json VS Code theme={"system"}
  // user mcp.json (MCP: Open User Configuration)
  {
    "servers": {
      "hai-agents": {
        "type": "http",
        "url": "https://agp.eu.hcompany.ai/mcp",
        "headers": { "Authorization": "Bearer hk-..." }
      }
    }
  }
  ```

  ```toml Codex theme={"system"}
  # ~/.codex/config.toml
  [mcp_servers.hai-agents]
  url = "https://agp.eu.hcompany.ai/mcp"
  bearer_token_env_var = "HAI_API_KEY"   # export HAI_API_KEY=hk-...
  ```

  ```yaml Hermes theme={"system"}
  # ~/.hermes/config.yaml
  mcp_servers:
    hai-agents:
      url: https://agp.eu.hcompany.ai/mcp
      headers:
        Authorization: "Bearer hk-..."
  ```
</CodeGroup>

* Your API key is a secret: keep it in your local client config, never in a committed or shared workspace file.
* In a network-restricted sandbox (for example NVIDIA NemoClaw / OpenShell), allow your region's `/mcp` host in the egress policy, scoped to the calling process. See the [NemoClaw example](https://github.com/hcompai/computer-use-agents-demos/tree/main/nemoclaw).

## Tools

| Tool | What it does |
| - | - |
| `run_agent` | Start an agent on a task. Returns the answer, or a session handle to wait on if the task runs long. |
| `wait_for_session` | Long-poll a session for its answer, or fetch its current snapshot. |
| `list_agents` | List the agents you can run: your org's plus the public `h/` ones. Pass an agent's `name` as `agent` to `run_agent`. |
| `send_message` | Send a follow-up message to a running session. |
| `cancel_session` | Cancel a session. |
| `share_session` | Make a session publicly viewable and return a share link. |
| `list_files` | List files in a cloud browser's `~/Downloads`, newest first. Takes the browser session id, not the agent session id. See [Session files](/agents-api/sessions/list-files). |
| `read_file` | Read a file from the browser's machine, base64-encoded. |
| `write_file` | Write a base64-encoded file onto the browser's machine for the agent to use. |

Related: [Quickstart](/agents-api/quickstart), [Agents](/agents-api/agents/overview), [Coding assistants](/agents-api/coding-skills)


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