> ## 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 session object

> The shape of a session: what it runs, its live status, and its answer.

## Session shape

A session is one run of an agent on a task. [Create a session](https://hub.hcompany.ai/agents-api/sessions/create.md) and [Retrieve a session](https://hub.hcompany.ai/agents-api/sessions/retrieve.md) return it. [List sessions](https://hub.hcompany.ai/agents-api/sessions/list.md) returns a summary of each.

```json Session object theme={"system"}
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "request": {
    "agent": {
      "name": "h/web-surfer-flash",
      "model": "holo4-35b-a3b",
      "...": "..."
    },
    "messages": [
      {
        "type": "user_message",
        "message": "Open Hacker News and list the top 3 stories with their URLs."
      }
    ],
    "...": "..."
  },
  "agent_revision": 4,
  "dependency_revisions": {
    "skills": [
      {"catalog_id": "c4d5e6f7-0819-4a2b-8c3d-4e5f60718293", "name": "h/answering", "revision": 3}
    ],
    "environments": [
      {"catalog_id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d", "name": "h/browser", "revision": 2}
    ]
  },
  "status": {
    "status": "completed",
    "error": null,
    "error_code": null,
    "outcome": "success",
    "steps": 12,
    "usage_per_model": [
      {
        "name": "holo4-35b-a3b",
        "input_tokens": 24800,
        "cached_tokens": 18000,
        "output_tokens": 1420,
        "reasoning_tokens": 0
      }
    ],
    "subagent_session_ids": [],
    "pending_tool_calls": [],
    "pending_approvals": []
  },
  "agent_view_url": "https://platform.hcompany.ai/agents/sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "latest_answer": "1. ... 2. ... 3. ...",
  "runner": {"id": "d4e5f6a7-b8c9-4012-8def-34567890abcd", "kind": "web"},
  "created_at": "2026-05-07T14:30:00Z",
  "started_at": "2026-05-07T14:30:02Z",
  "finished_at": "2026-05-07T14:31:15Z"
}
```

## Fields

**id** `string`

Session UUID, used by every follow-up call.

**request** `object`

The [create](https://hub.hcompany.ai/agents-api/sessions/create.md#request-body) body, with `agent` resolved to its full spec even if you passed a catalog ID. Secrets read back as `***`, for example a browser `proxy_url`.

**agent\_revision** `integer | null`

The catalog agent's [revision](https://hub.hcompany.ai/agents-api/agents/overview.md#revisions) the session runs: `request.agent` is that revision, with `request.overrides` applied. `null` for inline agents.

**dependency\_revisions** `object | null`

The catalog [skills](https://hub.hcompany.ai/agents-api/skills/overview.md#revisions) and [environments](https://hub.hcompany.ai/agents-api/environments/overview.md#revisions) the session resolved by reference, including references inside inline agents and subagents, each at the revision it ran. `skills` and `environments` are arrays of `{"catalog_id", "name", "revision"}`, where `name` is the skill's `name` or the environment's `id`. Inline definitions are not listed. `null` for sessions created before skill and environment revisions.

**status** `object`

Live state: the [status object](#status-object).

**agent\_view\_url** `string | null`

The session's [Agent View](https://hub.hcompany.ai/agents-api/observe-and-steer.md) page, for live viewing and replay.

**latest\_answer** `string | object | null`

The agent's latest final answer: text, or an object matching the agent's `answer_format`. Mirrors the `answer` from [`changes`](https://hub.hcompany.ai/agents-api/sessions/changes). `null` until the agent first answers.

**runner** `object | null`

The runner hosting the agent's environment, as the environment last reported it: `{"id", "kind"}`. `id` is the runner session ID from the [`RunnerSessionEvent`](https://hub.hcompany.ai/agents-api/sessions/event-object#event-types-type), accepted by the [session files](https://hub.hcompany.ai/agents-api/sessions/list-files.md) endpoints. It changes when the agent moves to a new runner. `kind` is `web`, `desktop`, `android`, or `workstation`; with both a browser and a workstation, `web`. `null` until the environment starts, and when you can read the session only through its [share link](https://hub.hcompany.ai/agents-api/api-reference.md#shared-sessions).

**created\_at** `string`

ISO 8601 creation time.

**started\_at** `string | null`

When the agent started. `null` until then.

**finished\_at** `string | null`

When the session reached a terminal state. `null` until then.

## Status object

The session's live state, also returned alone by [Get session status](https://hub.hcompany.ai/agents-api/sessions/status.md). It never carries the answer: read `latest_answer`, or follow the session with [`changes`](https://hub.hcompany.ai/agents-api/sessions/changes).

**status** `string`

Current state: `queued`, `pending`, `running`, `paused`, `idle`, `awaiting_tool_results`, `completed`, `failed`, `timed_out`, or `interrupted`, as in the [lifecycle](https://hub.hcompany.ai/agents-api/sessions/overview.md#lifecycle).

**error** `string | null`

Short, stable error message if the session failed or timed out. Branch on `error_code`, not on this text.

**error\_code** `string | null`

[Failure category](https://hub.hcompany.ai/agents-api/errors.md#error-codes) if the session failed or timed out: `environment_error`, `no_answer`, `answer_validation`, `timeout`, `insufficient_credit`, or `internal`.

**outcome** `string | null`

The agent's [self-assessed outcome](https://hub.hcompany.ai/agents-api/errors.md#outcomes), reported with its final answer: `success`, `partial`, `infeasible`, or `blocked`. `null` until reported.

**steps** `integer`

Steps taken so far, where each step is one decide-and-act cycle.

**usage\_per\_model** `object[]`

Per-model token usage. Empty until the agent calls a model.

**name** `string`

Model ID.

**input\_tokens** `integer`

**cached\_tokens** `integer`

Input served from the prompt cache, billed at a discount.

**output\_tokens** `integer`

**reasoning\_tokens** `integer`

**subagent\_session\_ids** `string[]`

IDs of the child sessions this session spawned. List them with their `agent` labels via [`GET /sessions?parent_session_id={id}`](https://hub.hcompany.ai/agents-api/sessions/list#find-the-subagents-a-session-spawned).

**pending\_tool\_calls** `object[]`

The [custom tool](https://hub.hcompany.ai/agents-api/custom-tools.md) calls the agent is waiting on. Echo each one back as `tool_req` when you [post its result](https://hub.hcompany.ai/agents-api/sessions/tool-results.md). Empty unless the status is `awaiting_tool_results`, or `paused` while calls are pending.

**tool\_name** `string`

**args** `object`

**id** `string | null`

**pending\_approvals** `object[]`

The tool calls held for a human decision. [Approve or deny](https://hub.hcompany.ai/agents-api/sessions/tool-approvals.md) each by its `tool_req.id`. Empty unless the status is `awaiting_tool_results`, or `paused` while calls are held.

**tool\_req** `object`

The held call, `{ tool_name, args, id }`.

**requirements** `object[]`

Why the call waits, one entry per source: `source` (`guardrail`, `tool`, `environment`, `resume`, or another), `reason`, and the `policy_clause_refs` it cited.


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