Get Thread
/api/threads/{threadId}Retrieves thread details including metadata, agent info, and statistics.
threadIdstringrequiredThe unique thread identifier (UUID)
Response Structure
threadobjectrequiredThread metadata object
thread.idstringrequiredUnique thread identifier
thread.agent_idstringrequiredThe agent name associated with this thread
thread.user_idstring | nullUser identifier if set
thread.tagsarrayrequiredArray of string tags for categorization
thread.parentstring | nullrequiredParent thread ID, or null for a root thread.
thread.terminatednumber | nullrequiredTermination time in microseconds since the Unix epoch, or null for an open thread.
thread.created_atnumberrequiredUnix timestamp in seconds
agentobject | nullAgent definition details (null if agent no longer exists)
agent.idstringAgent identifier (same as thread.agent_id)
agent.titlestringHuman-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.descriptionstringAgent description if set
agent.iconstringFull URL to agent icon (absolute paths are resolved to full URLs using the request origin)
statsobjectrequiredThread statistics
stats.message_countnumberTotal number of messages in the thread
stats.log_countnumberTotal number of execution logs
statusobjectrequiredAuthoritative run status (ThreadStatus). The same value streams live as
thread_status frames on the WebSocket stream.
status.statestringrequiredidle, running, or failed. A run that handed the turn to a human side
is idle.
status.sincenumberrequiredWhen the thread entered this state, microseconds since epoch (0 if it has
never run).
status.reasonstring | nullRaw 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.