Skip to main content
Read the durable log with GET /v1/threads/{threadId}/events, oldest first by default, by cursor or afterSeq, optionally for one turnId. Every event carries seq, eventId, threadId, turnId, type, and occurredAt. Everything else depends on type.

Event types

If you see a tool_intent with no tool_result after it, that call is parked on a wait. reveal on a tool_result is how tool_search works: it names the tool families and tools that result made callable for the rest of the thread. A user_message from another thread has an agent principal with sourceThreadId, the thread that sent it: a thread.create or thread.send from the same agent, or an agents.ask from another one. When a wait timer runs out, the input that wakes the thread has principal type wait.

Failures

turn_failed carries a failureCode and plain-text failureText. failureDetails, when present, is one of two shapes: Running out of workspace credits doesn’t fail a turn. It parks on a billing_credits wait and carries on when credits are added.

Waits

wait on wait_created and wait_resolved says where the turn parked (point), who can close it (target), and why (reason). A wait’s status is pending, resolved, expired, or withdrawn. Withdrawn means it closed unanswered: another check on the same tool call denied it, or an approver allowed the call with edited input, so every check runs again. GET /v1/threads/{threadId}/turns/{turnId}/result lists the ones a deny withdrew under withdrawn, each with the denier’s reason.

Thread status

The thread record reports one coarse status: GET /v1/threads and GET /v1/agents/{agentId}/threads take two filters:

Submit modes

POST /v1/threads/{threadId}/messages takes an optional mode: The thread.send tool defaults to steer instead.

Content blocks

content is an ordered array of blocks, on both user and assistant messages: One message holds at most 40 blocks and 512 KiB of encoded JSON. To attach a file, POST /v1/agents/{agentId}/files with its source (api for your own uploads), a stable id, name, contentType, size, and head, the base64 of its first 512 bytes (all of it, if smaller). The response’s block goes straight into content. When the bytes aren’t stored yet it also returns upload: PUT exactly size bytes to upload.url with every header in upload.headers before upload.expiresAt. Treat that URL as a secret. A readable image the agent’s model accepts comes back as an image block instead, and repeating the request for a stored file returns the same block with no upload.

Streams

GET /v1/threads/{threadId}/events/stream, GET /v1/agents/{agentId}/events/stream, and GET /v1/events/stream push Server-Sent Events for one thread, one agent, or the whole workspace. They are best-effort activity hints, not a replay log. Whenever correctness matters, reconnect and read the durable log. Add include=text_progress to the thread stream to also get event: text_progress: cumulative snapshots of the reasoning summary (thinking) and visible text of the sample in flight, up to 64 KiB each. They aren’t replayed or stored; the thinking and assistant_message events are the record.