Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview

List threads for user

Return the caller’s own threads in their current org context, plus org-visible threads they have pinned.

A user who belongs to several orgs gets one org’s threads per request, not a merged list across orgs.

Rows sort by pin time first, most recently pinned at the top of the pinned block, then by thread creation time. A pinned thread the caller did not create stays behind a visibility check, so it drops out once its creator un-shares it.

Access control

  • requires_org
  • Restricted tokens need the API scope api.everything_else
GET/v1/ai/threads
Authorization
AuthorizationBearer token · headerrequired
Query parameters
page_tokenstring
Header parameters
X-Roboto-Org-Idstring
X-Roboto-User-Idstring
Responses
200

OK

dataobjectrequired
Show properties
itemsAgentThreadRecord[]required
Show properties
Array of AgentThreadRecord
thread_idstringrequired
createdstring<date-time>required
created_bystringrequired
created_by_principalstring | null
default: null
Show properties
Any of:
string
string
null
null
org_idstringrequired
messagesAgentMessage[]
Show properties
Array of AgentMessage
roleAgentRolerequired

Enumeration of possible roles in an agent thread.

Defines the different participants that can send messages in a thread.

Allowed:userassistantroboto
contentAgentTextContent | AgentToolUseContent | AgentToolResultContent | AgentErrorContent | AgentDeletedContent | AgentCompressionFillerContent | AgentClientContextEntry[]required
Show properties
Array of AgentTextContent | AgentToolUseContent | AgentToolResultContent | AgentErrorContent | AgentDeletedContent | AgentCompressionFillerContent | AgentClientContextEntry
Any of:
AgentTextContent
textstringrequired
AgentToolUseContent
content_typestring
default: "tool_use"
tool_namestringrequired
tool_use_idstringrequired
inputobject | null
default: null
Show properties
Any of:
object
object
null
null
raw_requestobject | null
default: null
Show properties
Any of:
object
object
null
null
AgentToolResultContent
content_typestring
default: "tool_result"
tool_namestringrequired
tool_use_idstringrequired
runtime_msintegerrequired
statusstringrequired
payloadstring | object | any[] | null
default: null
Show properties
Any of:
string
string
object
object
any[]
Array of any
any
null
null
raw_responseobject | null
default: null
Show properties
Any of:
object
object
null
null
AgentErrorContent
content_typestring
default: "error"
error_messagestringrequired
error_codestring | null
default: null
Show properties
Any of:
string
string
null
null
AgentDeletedContent
content_typestring
default: "deleted"
AgentCompressionFillerContent
content_typestring
default: "compression_filler"
AgentClientContextEntry
content_typestring
default: "client_context"
contextClientViewingContextrequired

What the Roboto client (e.g. the Web UI) is currently viewing when the user composed a message.

Passed to the agent as implicit context for resolving deictic references — "this dataset", "those files", "the visualizer state I'm looking at" — that the user would otherwise have to spell out. This type is purely informational; it is not enforced and never gates tool authorization.

Distinct from:

  • :class:AnalysisScope, which is a hard analysis window honored by individual tools on the server side.
  • :class:~roboto.ai.goals.AgentGoal, which declares typed outcomes the agent runner must drive the turn to satisfy.

The corresponding wire-format field is client_context (with a one-release context alias for migration).

Show properties
dataset_idsstring[]
file_idsstring[]
collection_idsstring[]
device_idsstring[]
view_idsstring[]
table_stateobject | null
default: null
Show properties
Any of:
object
object
null
null
display_time_anchor_nsinteger | null
default: null
Show properties
Any of:
integer
integer
null
null
display_time_anchor_labelstring | null
default: null
Show properties
Any of:
string
string
null
null
visualizer_stateobject | null
default: null
Show properties
Any of:
object
object
null
null
misc_contextobject | null
default: null
Show properties
Any of:
object
object
null
null
statusAgentMessageStatus

Enumeration of possible message generation states.

Tracks the lifecycle of message generation from initiation to completion.

Allowed:not_startedgeneratingcompletedfailedcancelled
createdstring<date-time>
continuation_tokenstringrequired
statusAgentThreadStatusrequired

Enumeration of possible agent thread states.

Tracks the overall status of an agent thread from creation to termination.

Allowed:not_starteduser_turnroboto_turnclient_tool_turngoals_failed
titlestring | null
default: null
Show properties
Any of:
string
string
null
null
model_profilestring | null
default: null
Show properties
Any of:
string
string
null
null
forked_from_thread_idstring | null
default: null
Show properties
Any of:
string
string
null
null
forked_from_message_sequence_numinteger | null
default: null
Show properties
Any of:
integer
integer
null
null
visibilityThreadVisibility

Read-scope for an :class:AgentThreadRecord.

Set when the thread is created, and changed afterwards only by the thread's creator, via :meth:roboto.ai.agent_thread.AgentThread.set_visibility (POST /v1/ai/threads/<thread_id>/visibility). Roboto admins read every thread but cannot re-scope one they did not create.

Import as :class:roboto.ai.agent_thread.ThreadVisibility.

Allowed:privateorg
created_from_agent_idstring | null
default: null
Show properties
Any of:
string
string
null
null
created_from_trigger_idstring | null
default: null
Show properties
Any of:
string
string
null
null
originThreadOrigin | null
default: null
Show properties
Any of:
ThreadOrigin
string
null
null
pinned_atstring<date-time> | null
default: null
Show properties
Any of:
string<date-time>
string<date-time>
null
null
goalsAgentThreadGoalRecord[] | null
default: null
Show properties
Any of:
AgentThreadGoalRecord[]
Array of AgentThreadGoalRecord
goal_typestringrequired
goal_dataobjectrequired
statusAgentGoalStatusrequired

Lifecycle of a per-turn declared goal.

Goals begin PENDING when registered. They transition to ACHIEVED when the corresponding achieve-tool reports success, or to FAILED when the runner's corrective re-prompt budget for the turn is exhausted (or when the worker cannot construct an achieve-tool for the goal).

Allowed:pendingachievedfailed
message_sequence_numintegerrequired
createdstring<date-time>required
concluded_atstring<date-time> | null
default: null
Show properties
Any of:
string<date-time>
string<date-time>
null
null
achieve_tool_use_idstring | null
default: null
Show properties
Any of:
string
string
null
null
null
null
tasksAgentTask[] | null
default: null
Show properties
Any of:
AgentTask[]
Array of AgentTask
task_idintegerrequired
positionintegerrequired
titlestringrequired
statusAgentTaskStatusrequired

Lifecycle state of a top-level agent task.

Allowed:pendingin_progresscompleted
descriptionstring | null
default: null
Show properties
Any of:
string
string
null
null
conclusionstring | null
default: null
Show properties
Any of:
string
string
null
null
startAgentTaskBoundary | null
default: null
Show properties
Any of:
AgentTaskBoundary
message_sequence_numintegerrequired
content_sequence_numintegerrequired
null
null
endAgentTaskBoundary | null
default: null
Show properties
Any of:
AgentTaskBoundary
message_sequence_numintegerrequired
content_sequence_numintegerrequired
null
null
subtasksAgentSubtask[]
Show properties
Array of AgentSubtask
titlestringrequired
statusAgentSubtaskStatusrequired

Lifecycle state of a sub-task.

Sub-tasks are never activated independently — they are implicitly active with their parent task — so they have no in_progress state.

Allowed:pendingdone
null
null
next_tokenstring | null
default: null
Show properties
Any of:
string
string
null
null
total_countinteger | null
default: null
Show properties
Any of:
integer
integer
null
null
400

Thrown when the conversation context (messages, system prompt, tool results) exceeds the model's context window limit.

The token estimate and the model's context limit are not carried on the exception, so a caller cannot read usage numbers off it.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
401

Thrown when authentication fails

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
403

Thrown if an operation would exceed a user or org level limit.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
404

Thrown if a user is attempting to perform an action unrecognized by the Roboto platform.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
409

Thrown if there is a conflict between a resource you're creating and another existing resource

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
410

Thrown if a resource is missing or expired.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
500

An error the platform reported that this SDK release cannot resolve to a specific exception class.

Reported for an element of a :py:class:~roboto.http.BatchResponse whose error names a code this release defines no class for, or that arrived without a code, without a message, or as text that is not an error envelope at all. It carries whatever code and message the platform sent, so a caller handling the failure still learns what went wrong; when no message could be read, the message is the error's raw text.

The error envelope carries no status code, so http_status_code reports the 500 inherited from :py:class:RobotoDomainException rather than the status the failure actually had.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
501

Thrown by shimmed out APIs which have not yet been implemented

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
503

Thrown when a service is unavailable, such as when it's under heavy load and can't accept new requests. This is expected to be transient and ought to be retried.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
504

Thrown when the service times out while processing a request. This is exepcted to be transient and ought to be retried.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
507

Thrown when the server cannot complete the request because the response payload exceeds a storage or transport capacity limit (e.g., Lambda response size). This is NOT expected to be transient and should NOT be retried.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.roboto.ai/v1/ai/threads' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "data": {
    "items": [
      {
        "thread_id": "string",
        "created": "2019-08-24T14:15:22Z",
        "created_by": "string",
        "created_by_principal": null,
        "org_id": "string",
        "messages": [
          {
            "role": "user",
            "content": [
              {
                "text": "string"
              }
            ],
            "status": "not_started",
            "created": "2019-08-24T14:15:22Z"
          }
        ],
        "continuation_token": "string",
        "status": "not_started",
        "title": null,
        "model_profile": null,
        "forked_from_thread_id": null,
        "forked_from_message_sequence_num": null,
        "visibility": "private",
        "created_from_agent_id": null,
        "created_from_trigger_id": null,
        "origin": null,
        "pinned_at": null,
        "goals": null,
        "tasks": null
      }
    ],
    "next_token": null,
    "total_count": null
  }
}