> ## 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 (Holo computer-use models for your own agent harness, OpenAI-compatible, 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), or idle for interactive sessions created with `idle_timeout_s`, before reading the answer. Use webhooks or the `changes` long-poll endpoint to follow progress.

# Local MCP server

> holo mcp, a local MCP server, lets Claude Code, Cursor, or Codex run any H agent, including h/holo-desktop on this machine and shell mode in your project.

| | [Hosted MCP server](https://hub.hcompany.ai/agents-api/mcp.md) | [Local MCP server](https://hub.hcompany.ai/agents-api/local-mcp.md) |
| - | - | - |
| Where it runs | In H's cloud, at `https://agp.eu.hcompany.ai/mcp` | On your machine: `holo mcp`, which the assistant starts over stdio |
| Setup | A URL and your API key | The [`holo` CLI](https://hub.hcompany.ai/holo-cli/introduction), then `holo mcp install` |
| Agents | Cloud agents | Any agent, including `h/holo-desktop` on this machine and [shell mode](https://hub.hcompany.ai/agents-api/your-desktop.md#shell-mode) in your project |
| Tools | Start, wait, follow up, force an answer, cancel, and session files | `run_agent` and `list_agents` |
| Runs | Several at once; the assistant can follow up and steer | One at a time; each call blocks until the answer |

## Install

**1. Sign in**

Hosts start `holo mcp` in the background, where it cannot open a browser sign-in, so sign in once from a terminal first:

```bash theme={"system"}
holo login
```

**2. Add the server to your hosts**

```bash theme={"system"}
holo mcp install list      # supported hosts, and which are detected
holo mcp install cursor    # one host
holo mcp install           # every detected host
```

Host IDs: `antigravity`, `claude-code`, `claude-desktop`, `codex`, `copilot`, `cursor`, `grok-build`, `hermes`, `openclaw`, `opencode`, `vscode`, `vscode-insiders`, `windsurf`.

**3. Restart the host**

The entry uses your saved key, and the host picks it up on restart.

Codex stops a tool call after 60 seconds, which cuts most agent runs short. Set `tool_timeout_sec = 1800` under `[mcp_servers.holo]` in `~/.codex/config.toml`.

> [accordion] The entry it writes
>
> For Cursor and other hosts with a config file, the entry is:
>
> ```json theme={"system"}
> {
>   "mcpServers": {
>     "holo": {
>       "type": "stdio",
>       "command": "/absolute/path/to/holo",
>       "args": ["mcp"]
>     }
>   }
> }
> ```

> [accordion] Settings you add by hand
>
> Apps launched from the Dock or Start menu do not inherit shell exports, so set environment variables in the host's MCP `env` block. For `local` sessions on [your own model server](https://hub.hcompany.ai/agents-api/local-runtime.md#use-your-own-model-server), add `HAI_AGENT_RUNTIME_BASE_URL` and `HAI_AGENT_RUNTIME_MODEL` there.
>
> Claude Code, Codex, and Grok Build drop these settings when you run `holo mcp install` again, so add them back afterwards.

## Check it works

Restart the host, then ask:

```text theme={"system"}
Use run_agent with the h/holo-desktop agent to open TextEdit and write a short note saying it is connected. Return "done" when the note is visible.
```

> [accordion] The host cannot find or start holo
>
> * Run `holo mcp install list`, then `holo mcp install <host-id>` again.
> * For Claude Code, run `claude mcp get holo`.
> * Run `holo whoami`. The key must come from `~/.config/hai/.env`, not only from your shell.
>
> More fixes are in [Troubleshoot](https://hub.hcompany.ai/holo-cli/reference.md#troubleshoot).

## Tools

```text theme={"system"}
run_agent(task: str, agent: str = <your default>, local: bool = false, model: str = None, workspace: str = None) -> str
list_agents(search: str = None) -> str
```

`run_agent` starts a session, reports each step to the host, and returns the answer. Its arguments mirror `holo` flags:

| Argument | Meaning | `holo` flag |
| - | - | - |
| `agent` | A name from `list_agents`, like `h/web-surfer-pro` for the web or `h/holo-desktop` for this machine. | `-a` |
| `local` | Run the agent loop on this machine. | `--local` |
| `model` | Replace the agent's model. | `-o agent.model=...` |
| `workspace` | The folder an agent in [shell mode](https://hub.hcompany.ai/agents-api/your-desktop.md#shell-mode) works in. The host passes your project. | `-w` |

Your [`~/.holo` files](https://hub.hcompany.ai/holo-cli/introduction#customize-every-run) apply to every session. The tool call blocks until the task completes or hits its [budget](https://hub.hcompany.ai/holo-cli/reference.md#run), and the server runs one task at a time, so parallel calls wait.

The host cannot answer an [approval](https://hub.hcompany.ai/agents-api/your-desktop.md#approve-commands). A run that holds a command ends and tells the host which one. Put the commands the task needs in the agent's `allowed_commands`, or always allow them once from `holo` in a terminal.

## Write a good task

The agent does not see the host conversation, so each task must say which app, workspace, account, and person, and when it is done. The server gives the host this rule too.

```text theme={"system"}
# Good
Open Slack in the Acme workspace and send a DM to Sarah Chen saying "on my way". Return "sent" after the message appears.

# Too vague
Tell Sarah.
```

## Stop a session

Cancelling the tool call in the host cancels the session, but some hosts never send the cancel. For sessions on this machine, press <kbd>Esc</kbd> twice or run `holo local stop` (see [Stop an agent](https://hub.hcompany.ai/holo-cli/introduction.md#drive-your-desktop)). A session the user stopped tells the host not to retry.


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