thread session object is an append-only stream of structured items. The envelope marks the
object as a thread and holds optional metadata about it; items themselves live in a separate store
with their own read/write commands.
Envelope
Upload a thread envelope withupload_session_object, setting value.type to "thread":
thread object inside value carries two optional sub-fields:
| Field | Type | Description |
|---|---|---|
attributes | object | Optional named metadata: id, created_at, name, description. |
metadata | object | Optional arbitrary JSON. |
download_session_object. No items are included in that
response — items are fetched exclusively through the thread item commands.
Thread Items
Each item posted to a thread has the following shape:| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Server-generated unique item id. |
session_id | string | Yes | Session that owns this item. |
revision_id | string | Yes | Revision that owns this item. |
alias | string | Yes | Alias of the thread envelope this item belongs to. |
created_at | string | Yes | ISO 8601 timestamp stamped by the server on creation. |
user_id | string | Yes | Id of the user who posted the item. |
content | array of object | Yes | Ordered list of content blocks. Each block has a type field: "text" or "json". |
parent_id | string | No | Optional reference to a parent item id (stored only; not enforced by the server). |
metadata | object | No | Optional arbitrary JSON for application-level annotation. |
Content Blocks
Each entry incontent is an object with a type discriminator:
type | Additional field | Description |
|---|---|---|
"text" | text (string) | Plain text content. |
"json" | json (any) | Arbitrary JSON payload. |
Operations
| Operation | Description |
|---|---|
| Post Session Thread Item | Append an item to the thread. |
| List Session Thread Items | Page items, sorted by created_at. |
| Get Session Thread Item | Fetch a single item by id. |
alias of the thread envelope. If the envelope does not exist or its
value.type is not "thread", the server returns invalid_thread_envelope.
Events
After eachpost_session_thread_item call the server emits a
session_thread_item_posted event:
item_id together with created_since in
list_session_thread_items to fetch only new items since the last known position.
See also
- Session Objects — Introduction — envelope mechanics and the full list of session object types.
- Session Events — full event reference.

