---
title: "Get an agent thread's run tree"
method: GET
path: "/agent/threads/{thread_id}"
tags: ["agent"]
---

# Get an agent thread's run tree

`GET /agent/threads/{thread_id}`

Get the runs of a thread as a tree (via parent\_run\_id). Use it to detect branches (sibling runs from edit/regenerate) and pick a run to restore (restore via the run events endpoints).

Required scope: \`inference:run\`

## Path parameters

- `thread_id` string, required

## Query parameters

- `principal_id` string

## Response `200`

Agent thread run tree

- AgentThreadDetail
  - `thread_id` string, required
  - `runs` AgentRunNode[], required — All runs in the thread as a tree (via parent_run_id).
    - `run_id` string, required
    - `parent_run_id` string, nullable
    - `status` 'QUEUED' | 'RUNNING' | 'CANCELLING' | 'SUCCEEDED' | 'FAILED' | 'CANCELLED', required — Agent run lifecycle state.
    - `title` string, nullable
    - `created_at` string, date-time

## Other responses

- `401` — Unauthorized
- `404` — Not Found

## Changes

> 71 revisions in range; 18 not diffed.

- **2026-07-10** `05d4c3bc46f2` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/qlonolink/apis/qaip-apis/changes/agent/threads/:thread_id/get.md)

---

[API](https://skmtc.dev/qlonolink/apis/qaip-apis.md) · [All operations](https://skmtc.dev/qlonolink/apis/qaip-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/qlonolink/qaip-apis/revisions/61dc40676905/schema)
