Skip to main content
A thread is one conversation (or one run) owned by an agent. Inside it, a turn is one admitted input plus all the work it sets off, and an event is one permanent entry in the log. Threads never cross agents. A message is an ordered content array of text, image, and file blocks, not a plain string. POST /v1/agents/{agentId}/threads creates a thread and admits its first turn; maxCost caps what the whole thread may spend, and model pins one exact catalog ID. POST /v1/threads/{threadId}/messages sends more with a mode: queue waits its turn, steer redirects the turn in flight, interrupt stops it and goes now. The event log is the source of truth: complete, replayable, paginated by cursor, down to the model’s thinking summaries. The SSE streams are best-effort hints for a live UI; when correctness matters, read the log. Agents delegate to their own threads with thread.create, thread.send, and thread.cancel; none of them block. Input from another thread carries principal.sourceThreadId, the return address for results. wait ends a turn until the next message or a timer, whichever comes first. A thread a Slack message starts is bound to that conversation: every turn’s reply posts there, and the sender can answer its approvals.
Belongs to one agent · Has many turns → events · Status is running | awaiting | idle | failed | cancelled

Rules

  • Each admitted turn freezes its configuration. See How it fits together.
  • Sibling threads share memory, credentials, and the sandbox, never a context window.

API

  • Events, waits, list filters, block limits: Thread events. wait bounds: Limits.
  • POST /v1/threads/{threadId}/cancel drops active and queued work and keeps the history; .../turns/{turnId}/cancel stops one turn and leaves the queue.
  • GET /v1/threads?state=waiting for everything parked on a person.