Pi Durable Platformdocs
ReferenceAgents, threads and templates

A conversation's transcript and the reply in progress

GET
/v1/agents/{agentId}/threads/{threadId}

Path Parameters

agentId*string
Formatuuid
threadId*string

Client-chosen thread ID (1-64 letters, digits, dashes or underscores)

Match^[A-Za-z0-9_-]{1,64}$

Response Body

The conversation

application/json
  1. response
data*
curl -X GET 'https://agents.example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/threads/string'
{  "data": {    "busy": true,    "messages": [      {        "id": "string",        "role": "user",        "text": "string",        "thinking": "string",        "toolCalls": [          {            "id": "string",            "name": "string",            "arguments": {},            "startedAt": 0,            "endedAt": 0          }        ],        "error": "string",        "toolCallId": "string",        "name": "string",        "isError": true,        "author": {          "kind": "user",          "id": "string",          "name": "string",          "via": "string"        },        "at": 0,        "model": {          "provider": "string",          "id": "string"        },        "usage": {          "input": 0,          "output": 0,          "cacheRead": 0,          "cacheWrite": 0,          "total": 0        },        "stopReason": "string"      }    ],    "partial": {      "text": "string",      "thinking": "string"    },    "tools": [      {        "callId": "string",        "name": "string",        "status": "string",        "output": "string"      }    ]  }}