> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.middesk.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.middesk.com/_mcp/server.

# Thread object

> A container that holds context and history for agent work.

A thread is a container that holds the context and history for agent work. Threads are commonly associated with a specific context such as a `business_id` and persist across multiple runs.

## Thread object

**`Example JSON response`**

```json title="Example JSON response"
{
  "object": "thread",
  "id": "b1c2d3e4-5678-90ab-cdef-1234567890ab",
  "created_at": "2026-01-15T12:00:00.000Z",
  "updated_at": "2026-01-15T12:30:00.000Z",
  "status": "completed",
  "metadata": null,
  "requester": null,
  "steps": []
}
```

## Thread attributes

| Attribute    | Type               | Description                                                                                                                                                   |
| ------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `object`     | string             | Object type identifier. Always `thread`.                                                                                                                      |
| `id`         | string (uuid)      | Unique identifier for the thread.                                                                                                                             |
| `created_at` | string (date-time) | ISO 8601 timestamp of when the thread was created.                                                                                                            |
| `updated_at` | string (date-time) | ISO 8601 timestamp of when the thread was last updated.                                                                                                       |
| `status`     | string             | Current lifecycle status. One of `running`, `completed`, `error`, or `interrupted`.                                                                           |
| `metadata`   | object \| null     | Internal metadata associated with the thread.                                                                                                                 |
| `requester`  | object \| null     | Requester context associated with the thread.                                                                                                                 |
| `steps`      | Step\[]            | Execution steps emitted by the underlying agent state. Only included when requesting thread details with step state. See [Step attributes](#step-attributes). |

## Status values

| Status        | Description                                              |
| ------------- | -------------------------------------------------------- |
| `running`     | The thread is active and processing a run.               |
| `completed`   | All runs in the thread have completed.                   |
| `error`       | A run in the thread encountered an error.                |
| `interrupted` | A run in the thread has paused and is waiting for input. |

> **Get a demo**
>
> Contact your account manager or [contact sales](https://www.middesk.com/contact-sales) to inquire about access.