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

# List sessions

> List your sessions, newest first, with filters.

## Query parameters

**status** `string[]`

Filter by session status. Repeatable. Values: `queued`, `pending`, `running`, `paused`, `idle`, `awaiting_tool_results`, `completed`, `failed`, `timed_out`, `interrupted`.

**agent** `string[]`

Filter by agent identifier. Repeatable. Example: `web-price-finder`.

**group\_id** `string`

Only sessions tagged with this group.

**parent\_session\_id** `string`

Only child sessions of this parent.

**schedule\_id** `string`

Only sessions created by this [schedule](https://hub.hcompany.ai/agents-api/schedules/overview.md).

**search** `string`

Case-insensitive match on the session's first message or answer.

**created\_before** `string`

Only sessions created before this ISO 8601 timestamp.

**created\_after** `string`

Only sessions created after this ISO 8601 timestamp.

**finished\_before** `string`

Only sessions that finished before this ISO 8601 timestamp.

**finished\_after** `string`

Only sessions that finished after this ISO 8601 timestamp.

**owner** `string` (default: me-in-organization)

Access scope: `me` (your sessions anywhere), `me-in-organization` (your sessions in the current organization), `organization` (everyone's sessions in the organization), or `me-or-organization`.

**page** `integer` (default: 1)

Page number (1-based).

**size** `integer` (default: 10)

Items per page. Maximum: `100`.

**sort** `string` (default: -created\_at)

Sort order. Options: `created_at`, `-created_at`.

## Response

`200` with a [page envelope](https://hub.hcompany.ai/agents-api/sdks.md#pagination) whose `items` are session summaries with these fields. Read a full session with [Retrieve](https://hub.hcompany.ai/agents-api/sessions/retrieve.md).

**id** `string`

Session UUID.

**agent** `string | null`

Name of the agent that ran the session.

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

The catalog agent's [revision](https://hub.hcompany.ai/agents-api/agents/overview.md#revisions) the session ran. `null` for inline agents.

**status** `string`

Current [status](https://hub.hcompany.ai/agents-api/sessions/overview.md#lifecycle).

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

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

**first\_message** `object | null`

The first user message, as sent in [`messages`](https://hub.hcompany.ai/agents-api/sessions/create#param-messages).

**type** `string`

**message** `string`

**images** `string[]`

**files** `object[]`

**caller\_id** `string`

**created\_at** `string`

ISO 8601 creation time.

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

When the agent started.

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

When the session reached a terminal state.

**last\_activity\_at** `string | null`

When the session's latest event was ingested (agent steps, status changes, user messages), to spot which live sessions are moving.

**anonymized\_at** `string | null`

When the session's PII text and screenshots were irreversibly anonymized. `null` if not anonymized.

```bash CLI theme={"system"}
holo sessions list --size 5
```

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

client = Client()

page = client.sessions.list_sessions(size=5)
for summary in page.items:
    print(summary.id, summary.status)
```

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

const client = new HaiAgentsClient();

const page = await client.sessions.listSessions({ size: 5 });
for (const summary of page.items) {
  console.log(summary.id, summary.status);
}
```

```bash cURL theme={"system"}
curl "https://agp.eu.hcompany.ai/api/v2/sessions?size=5" \
  -H "Authorization: Bearer $HAI_API_KEY"
```

```json 200 theme={"system"}
{
  "items": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "agent": "h/web-surfer-flash",
      "agent_revision": 4,
      "status": "completed",
      "agent_view_url": "https://platform.hcompany.ai/agents/sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "first_message": {"type": "user_message", "message": "Open Hacker News and list the top 3 stories with their URLs.", "images": [], "files": [], "caller_id": "user"},
      "created_at": "2026-05-07T14:30:00Z",
      "started_at": "2026-05-07T14:30:02Z",
      "finished_at": "2026-05-07T14:31:15Z",
      "last_activity_at": "2026-05-07T14:31:15Z",
      "anonymized_at": null
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "agent": "web-price-finder",
      "agent_revision": null,
      "status": "running",
      "agent_view_url": "https://platform.hcompany.ai/agents/sessions/b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "first_message": {"type": "user_message", "message": "Find direct flights CDG to NRT", "images": [], "files": [], "caller_id": "user"},
      "created_at": "2026-05-07T14:25:00Z",
      "started_at": "2026-05-07T14:25:01Z",
      "finished_at": null,
      "last_activity_at": "2026-05-07T14:29:58Z",
      "anonymized_at": null
    }
  ],
  "page": 1,
  "total": 47
}
```

## More examples

### Filter by status and agent

```python Python theme={"system"}
page = client.sessions.list_sessions(status=["running"], agent=["web-price-finder"])
```

```typescript TypeScript theme={"system"}
const page = await client.sessions.listSessions({
  status: ["running"],
  agent: ["web-price-finder"],
});
```

```bash cURL theme={"system"}
curl "https://agp.eu.hcompany.ai/api/v2/sessions?status=running&agent=web-price-finder" \
  -H "Authorization: Bearer $HAI_API_KEY"
```

### List all sessions in a group

```python Python theme={"system"}
page = client.sessions.list_sessions(group_id="trip-planning-001")
```

```typescript TypeScript theme={"system"}
const page = await client.sessions.listSessions({ groupId: "trip-planning-001" });
```

```bash cURL theme={"system"}
curl "https://agp.eu.hcompany.ai/api/v2/sessions?group_id=trip-planning-001" \
  -H "Authorization: Bearer $HAI_API_KEY"
```

### Find the subagents a session spawned

Pass a [manager](https://hub.hcompany.ai/agents-api/multi-agent.md) session's ID as `parent_session_id` to list its child sessions, each labeled with the `agent` that ran it. Recurse on a child's ID for deeper trees.

```python Python theme={"system"}
page = client.sessions.list_sessions(parent_session_id=parent_session_id)
```

```typescript TypeScript theme={"system"}
const page = await client.sessions.listSessions({ parentSessionId });
```

```bash cURL theme={"system"}
curl "https://agp.eu.hcompany.ai/api/v2/sessions?parent_session_id=$PARENT_SESSION_ID" \
  -H "Authorization: Bearer $HAI_API_KEY"
```

```json Response theme={"system"}
{
  "items": [
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-234567890abc",
      "agent": "fast-searcher",
      "agent_revision": null,
      "status": "completed",
      "agent_view_url": "https://platform.hcompany.ai/agents/sessions/c3d4e5f6-a7b8-9012-cdef-234567890abc",
      "first_message": {"type": "user_message", "message": "Search EV market-share figures for 2025", "images": [], "files": [], "caller_id": "user"},
      "created_at": "2026-05-07T14:30:05Z",
      "started_at": "2026-05-07T14:30:06Z",
      "finished_at": "2026-05-07T14:30:41Z",
      "last_activity_at": "2026-05-07T14:30:41Z",
      "anonymized_at": null
    }
  ],
  "page": 1,
  "total": 1
}
```


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