Skip to content

Get Thread

GET/api/threads/{threadId}

Retrieves thread details including metadata, agent info, and statistics.

threadIdstringrequired

The unique thread identifier (UUID)

Response Structure

threadobjectrequired

Thread metadata object

thread.idstringrequired

Unique thread identifier

thread.agent_idstringrequired

The agent name associated with this thread

thread.user_idstring | null

User identifier if set

thread.tagsarrayrequired

Array of string tags for categorization

thread.parentstring | nullrequired

Parent thread ID, or null for a root thread.

thread.terminatednumber | nullrequired

Termination time in microseconds since the Unix epoch, or null for an open thread.

thread.created_atnumberrequired

Unix timestamp in seconds

agentobject | null

Agent definition details (null if agent no longer exists)

agent.idstring

Agent identifier (same as thread.agent_id)

agent.titlestring

Human-readable agent title

agent.side_a_backing'human' | 'prompt' | 'handler'

What backs side A of the agent

agent.side_b_backing'human' | 'prompt' | 'handler'

What backs side B of the agent

agent.descriptionstring

Agent description if set

agent.iconstring

Full URL to agent icon (absolute paths are resolved to full URLs using the request origin)

statsobjectrequired

Thread statistics

stats.message_countnumber

Total number of messages in the thread

stats.log_countnumber

Total number of execution logs

statusobjectrequired

Authoritative run status (ThreadStatus). The same value streams live as thread_status frames on the WebSocket stream.

status.statestringrequired

idle, running, or failed. A run that handed the turn to a human side is idle.

status.sincenumberrequired

When the thread entered this state, microseconds since epoch (0 if it has never run).

status.reasonstring | null

Raw stop reason code of the last transition out of running (for example stop_on_response, stop_tool, awaiting_human, hook_blocked, aborted_by_user, step_error, execution_lost). Opaque; null while running.