Skip to main content
GET
Get Task'S Thread
Retrieve the root conversation thread for a task/thread ID as a simple array. When you continue a conversation by passing the same invocation id, the new turns are appended here under that same task/thread ID.

Path Parameters

string
required
Unique identifier of the task (UUID format)

Response

Returns an array of message objects representing the root conversation:
array
Array of conversation messages

Example Request

Example Response

Multi-turn conversation thread:

Parsing Examples

Pretty print the conversation:
Count messages in the thread:
Extract the latest assistant response:

Use Cases

  • View conversation history - See the complete interaction between user and agent
  • Review agent responses - Understand what the agent said and its reasoning
  • Track token usage - Monitor LLM API costs per message
  • Audit conversations - Review interaction history for compliance

Notes

  • Returns only the root task’s messages (excludes sub-task buckets)
  • Continuing a conversation with the same invocation id appends new turns to this array
  • For multi-agent workflows with sub-tasks, use Get Task Thread (Full)
  • Messages are ordered chronologically by creation time

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

task_id
string
required

Response

Successful Response