Skip to main content

Overview

Threads represent conversation sessions between users and the Loom AI agent. Each thread contains a sequence of messages, tool calls, and execution state. Ownership: Users can only access threads they own. System administrators can access all threads.

Create or Update Thread

Creates a new thread or updates an existing one. Supports optimistic concurrency control via the If-Match header.

Path Parameters

id
string
required
Thread ID (must match ID in request body)

Headers

If-Match
integer
Expected thread version for optimistic locking

Request Body

Send the full Thread object (see loom-common-thread schema):
id
string
required
Thread ID (must match path parameter)
title
string
Thread title
workspace
string
Workspace root path
visibility
string
required
Visibility level: "private", "shared", or "public"
messages
array
required
Array of message objects
version
integer
required
Thread version (increment on each update)
updated_at
string
required
ISO 8601 timestamp (server will overwrite)

Response

id
string
Thread ID
version
integer
New version number after upsert
updated_at
string
ISO 8601 timestamp of last update

Example

Response (200 OK):
Error (409 Conflict) if version mismatch:

Get Thread

Retrieves a single thread by ID. Only the thread owner (or system admin) can access.

Path Parameters

id
string
required
Thread ID

Response

Returns the full Thread object.

Example

Error (404 Not Found) if thread doesn’t exist or user doesn’t own it:

List Threads

Lists threads owned by the authenticated user. Supports filtering by workspace and pagination.

Query Parameters

workspace
string
Filter by workspace root path
limit
integer
default:"50"
Maximum number of results (1-100)
offset
integer
default:"0"
Number of results to skip for pagination

Response

threads
array
Array of ThreadSummary objects (lightweight version without full message history)
total
integer
Total number of threads matching the filter
limit
integer
Limit from request
offset
integer
Offset from request

Example

Delete Thread

Soft-deletes a thread. Only the thread owner (or system admin) can delete.

Path Parameters

id
string
required
Thread ID

Response

Returns 204 No Content on success.

Example

Response: 204 No Content Error (404 Not Found) if thread doesn’t exist or user doesn’t own it.

Update Thread Visibility

Updates only the thread visibility without syncing the full thread content. Supports optimistic locking.

Path Parameters

id
string
required
Thread ID

Headers

If-Match
integer
Expected thread version

Request Body

visibility
string
required
New visibility: "private", "shared", or "public"

Response

Returns the updated Thread object with incremented version.

Example

Search Threads

Full-text search across thread titles and messages. Searches only threads owned by the authenticated user.

Query Parameters

q
string
required
Search query
workspace
string
Filter by workspace root
limit
integer
default:"50"
Maximum number of results
offset
integer
default:"0"
Pagination offset

Response

hits
array
Array of search results with relevance scores
hits[].summary
object
ThreadSummary object
hits[].score
number
Relevance score (higher = more relevant)
limit
integer
Limit from request
offset
integer
Offset from request

Example

Error (400 Bad Request) if search query is empty: