Threads & Runs

Threads are conversations with an assistant. Each thread maintains a full message history so the assistant has context across multiple exchanges.

The Thread/Run Model

This separation means you can inspect exactly what happened in each invocation, including intermediate tool calls.

Creating a Thread

  1. Go to Threads in the sidebar.
  2. Click New Thread.
  3. Select an assistant and give the thread a name (up to 200 characters).
  4. Click Create — you're taken to the conversation view.

Sending Messages

Type your message in the input box and press Enter (or click Send). The assistant processes your message and streams its response back in real-time.

Streaming Responses

Responses arrive as a stream of Server-Sent Events (SSE). You'll see text appear token-by-token as the model generates it. The stream includes:

If the assistant uses tools, you'll see the tool invocation and its result before the final answer.

Message History

All messages in a thread are persisted. When you reopen a thread, the full conversation history is loaded. The assistant uses this history as context for future responses.

You can also retrieve the thread's state history to see how the conversation evolved over time (useful for debugging).

Thread Naming

Give threads descriptive names so you can find them later. The name is set when you create the thread and can be updated afterward.

Listing Threads

The Threads page shows all threads in your current project, ordered by most recently updated. Results are paginated (up to 100 per page).

Deleting Threads

Delete a thread to permanently remove it and all its messages. This cannot be undone.

API Reference

Operation Endpoint
List threads GET /threads/
Create thread POST /threads/
Get thread GET /threads/{tid}
Delete thread DELETE /threads/{tid}
Get thread state GET /threads/{tid}/state
Add to thread state POST /threads/{tid}/state
Get thread history GET /threads/{tid}/history
Stream a run POST /runs/stream

See the full API documentation at /docs#Threads.