---
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 roles: All, App

## 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` string, required — Agent run status. Values are QUEUED, RUNNING, SUCCEEDED, FAILED, or CANCELLED.
    - `title` string, nullable
    - `created_at` string, date-time

## Other responses

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

---

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