Skip to main content
GET
/
api
/
v2
/
sessions
List sessions
curl --request GET \
  --url https://agp.eu.hcompany.ai/api/v2/sessions \
  --header 'Authorization: Bearer <token>'
Returns a paginated list of sessions visible to the authenticated user. Results are sorted by creation date (newest first) by default. Returns a paginated list of Session summary objects.

Query parameters

page
integer
default:"1"
Page number (1-based).
size
integer
default:"10"
Items per page. Maximum: 1000.
sort
string
default:"-created_at"
Sort order. Options: created_at, -created_at.
status
string[]
Filter by session status. Multi-value. Values: pending, running, paused, idle, completed, failed, timed_out, interrupted.
agent
string[]
Filter by agent identifier. Multi-value. Example: web-price-finder.
group_id
string
Filter by group ID. Returns all sessions tagged with this group.
parent_session_id
string
Filter by parent session ID. Returns only child sessions of the given parent.
owner
string
default:"me-in-organization"
Access scope. Default: me-in-organization.

Examples

List your recent sessions

curl "https://agp.eu.hcompany.ai/api/v2/sessions?size=5" \
  -H "Authorization: Bearer $H_API_KEY"
Response
{
  "items": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "agent": "h/web-surfer-holo3-1-35b",
      "status": "completed",
      "first_message": {"type": "user_message", "message": "Top 3 stories on Hacker News?", "images": [], "caller_id": "user"},
      "created_at": "2026-05-07T14:30:00Z",
      "started_at": "2026-05-07T14:30:02Z",
      "finished_at": "2026-05-07T14:31:15Z"
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "agent": "web-price-finder",
      "status": "running",
      "first_message": {"type": "user_message", "message": "Find direct flights CDG to NRT", "images": [], "caller_id": "user"},
      "created_at": "2026-05-07T14:25:00Z",
      "started_at": "2026-05-07T14:25:01Z",
      "finished_at": null
    }
  ],
  "page": 1,
  "total": 47
}

Filter by status and agent

curl "https://agp.eu.hcompany.ai/api/v2/sessions?status=running&agent=web-price-finder" \
  -H "Authorization: Bearer $H_API_KEY"

List all sessions in a group

curl "https://agp.eu.hcompany.ai/api/v2/sessions?group_id=trip-planning-001" \
  -H "Authorization: Bearer $H_API_KEY"

Find the subagents a session spawned

Multi-agent runs delegate work to child sessions. The parent’s status lists their IDs in subagent_session_ids; pass the parent’s ID to parent_session_id to pull the whole roster in one call, each child labeled with the agent that ran it. Walk deeper trees by recursing on a child’s own ID.
curl "https://agp.eu.hcompany.ai/api/v2/sessions?parent_session_id=$PARENT_SESSION_ID" \
  -H "Authorization: Bearer $H_API_KEY"
Response
{
  "items": [
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-234567890abc",
      "agent": "fast-searcher",
      "status": "completed",
      "first_message": {"type": "user_message", "message": "Search EV market-share figures for 2025", "images": [], "caller_id": "user"},
      "created_at": "2026-05-07T14:30:05Z",
      "started_at": "2026-05-07T14:30:06Z",
      "finished_at": "2026-05-07T14:30:41Z"
    },
    {
      "id": "d4e5f6a7-b8c9-0123-def4-34567890abcd",
      "agent": "visual-verifier",
      "status": "running",
      "first_message": {"type": "user_message", "message": "Verify the 2025 figure on the source page", "images": [], "caller_id": "user"},
      "created_at": "2026-05-07T14:30:42Z",
      "started_at": "2026-05-07T14:30:43Z",
      "finished_at": null
    }
  ],
  "page": 1,
  "total": 2
}
Each child is a session like any other: open it by id to poll its status, read its answer from /changes, or replay its events.