List Threads
/api/threadsLists threads in descending activity order by default. A caller without the admin role receives only their own threads.
agent_idstringFilter threads by current or original agent name
user_idstringFilter threads by owner identifier. Only admins can select another owner.
limitnumberdefault: 50Maximum number of threads to return
offsetnumberdefault: 0Number of threads to skip for pagination
sortstringdefault: activityactivity sorts by recent activity.
created sorts by newest creation time.
oldest sorts by oldest creation time.
searchstringEach word must match the thread ID, tags, or message preview.
startDatenumberEarliest creation time in Unix seconds.
endDatenumberLatest creation time in Unix seconds.
statusstringFilters by run state: idle, running, or failed.
executingboolean1 or true selects executing threads.
0 or false selects threads without an active execution.
terminatedboolean1 or true selects terminated threads.
0 or false selects open threads.
include_childrenbooleanSet 1 to include descendants of threads that match agent_id.
include_totalbooleandefault: trueSet 0 or false to skip the count.
total will be null.
hasMore will still indicate another page.
Additional filters are root_only, has_failed_descendant, awaiting_human,
model, min_cost, max_cost, min_run_seconds, max_run_seconds,
started_by, and status_reason.
The first three accept 1/true or 0/false.
Cost and duration bounds accept non-negative numbers.
threadsarrayrequiredArray of thread objects
totalnumber | nullrequiredTotal number of threads matching the filter
hasMorebooleanrequiredWhether more threads exist beyond the current page
Thread Object
Each thread also includes origin_agent_id, parent, terminated,
last_activity_at, executing, status, status_reason,
last_message_preview, and last_message_at.
status is a run-state string.
status_reason is non-null only for a failed run.
terminated uses microseconds since the Unix epoch.
The activity and message timestamps use seconds.
threads[].idstringrequiredUnique thread identifier
threads[].agent_idstringrequiredThe agent name associated with this thread
threads[].user_idstring | nullUser identifier if set
threads[].tagsarrayrequiredArray of string tags
threads[].created_atnumberrequiredUnix timestamp in seconds
threads[].agentobjectAgent details including title, side backings, description, and icon
threads[].agent.titlestringHuman-readable agent title
threads[].agent.side_a_backing'human' | 'prompt' | 'handler'What backs side A of the agent
threads[].agent.side_b_backing'human' | 'prompt' | 'handler'What backs side B of the agent
threads[].agent.descriptionstringAgent description if set
threads[].agent.iconstringFull URL to agent icon (absolute paths are resolved to full URLs)