> ## Documentation Index
> Fetch the complete documentation index at: https://docs.standardagents.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Thread

Retrieves thread details including metadata, agent info, and statistics.

**threadId** `string` *required*

The unique thread identifier (UUID)

### Response Structure

**thread** `object` *required*

Thread metadata object

**thread.id** `string` *required*

Unique thread identifier

**thread.agent\_id** `string` *required*

The agent name associated with this thread

**thread.user\_id** `string | null`

User identifier if set

**thread.tags** `array` *required*

Array of string tags for categorization

**thread.created\_at** `number` *required*

Unix timestamp in seconds

**agent** `object | null`

Agent definition details (null if agent no longer exists)

**agent.id** `string`

Agent identifier (same as `thread.agent_id`)

**agent.title** `string`

Human-readable agent title

**agent.type** `string`

Agent type: `ai_human` or `dual_ai`

**agent.description** `string`

Agent description if set

**agent.icon** `string`

Full URL to agent icon (absolute paths are resolved to full URLs using the request origin)

**stats** `object` *required*

Thread statistics

**stats.message\_count** `number`

Total number of messages in the thread

**stats.log\_count** `number`

Total number of execution logs

**status** `object` *required*

Authoritative run status (`ThreadStatus`). The same value streams live as
`thread_status` frames on the [WebSocket stream](https://docs.standardagents.ai/api-reference/websocket/stream.md).

**status.state** `string` *required*

`idle`, `running`, or `failed`. A run that handed the turn to a human side
is `idle`.

**status.since** `number` *required*

When the thread entered this state, microseconds since epoch (`0` if it has
never run).

**status.reason** `string | null`

Raw 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.

```bash cURL theme={null}
curl https://your-worker.workers.dev/api/threads/550e8400-e29b-41d4-a716-446655440000
```

```typescript JavaScript theme={null}
const response = await fetch(
  'https://your-worker.workers.dev/api/threads/550e8400-e29b-41d4-a716-446655440000'
);
const data = await response.json();
```

```json 200 theme={null}
{
  "thread": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "agent_id": "support_agent",
    "user_id": "user_abc123",
    "tags": ["support", "priority"],
    "created_at": 1699900000
  },
  "agent": {
    "id": "support_agent",
    "title": "Support Agent",
    "type": "ai_human",
    "description": "Handles customer inquiries and resolves support issues",
    "icon": "https://your-worker.workers.dev/icons/support.svg",
    "side_a_label": "Customer",
    "side_b_label": "Agent"
  },
  "stats": {
    "message_count": 12,
    "log_count": 3
  },
  "status": {
    "state": "idle",
    "since": 1699900042000000,
    "reason": "stop_on_response"
  }
}
```

```json 404 theme={null}
{
  "error": "Thread not found: 550e8400-e29b-41d4-a716-446655440000"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.