Chat events after a cursor — JSON polling, or server-sent events with `Accept text/event-stream`
const url = 'http://localhost:8300/v1/studio/assistant/threads/example/events?since=0';const options = { method: 'GET', headers: {'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:8300/v1/studio/assistant/threads/example/events?since=0' \ --header 'Authorization: Bearer <token>' \ --header 'x-api-key: <x-api-key>'Like the batch events, numbered by a per-chat seq: JSON gives the events with seq > since (at most 500) and last_seq; SSE replays seq > since (or Last-Event-ID, which wins), then streams, id: = seq, event: = entry (a stored entry: your message, the assistant’s words, a line, a card) or thread (the chat’s state and the tab that runs it), data: = the AssistantEvent JSON, : keep-alive every 15 s. A step that asks for actions sends them in the thread event’s pending; only the drawer whose client_id matches runs them.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”An assistant chat’s UUID (another user’s or malformed = 404)
Query Parameters
Section titled “Query Parameters”Cursor — the last seq the client has
Header Parameters
Section titled “Header Parameters”SSE resume: the last id: received (an integer)
Responses
Section titled “Responses”Events
object
object
Type entry: a new or changed entry (same id replaces: a line going from running to done, a card answered)
object
User, assistant, notice: shown as text, never HTML
object
<thread_id>:
A Using skill line: the skill read (tap to see: GET /v1/studio/skills/{skill})
A plugin tool’s line (media tools): the takes it made; its Undo deletes them (DELETE /v1/studio/takes/{take_id}), no Redo
object
Yes or Not now is a message of kind answer
object
<thread_id>:
Plugin: a plugin tool with a risk flag
object
object
The drawer unlocks once the current cap is above it
Absent on other entries
Absent when none
Type thread: the chat’s state, tab and pending
object
The chat’s Auto switch (starts off): safe steps run without asking
From the first message; New chat before
Working: the agent is thinking; waiting: parked on actions, cards or a run
What the parked turn waits on: actions for the tab client_id to run, cards (ids of card entries) to answer
object
object
<thread_id>:
object
(Auto mode): pipelines lets it run by itself: a generation on your machines within the Auto caps runs without its card, a safe save in a dialog (a new item) saves itself; its line starts Auto · and has Undo. Absent = false
Auto is on but this one still asks: the waiting line above its card (Auto stops here: deleting needs you, Auto paused · 8 of 8 takes this hour)
object
With Auto on, the takes Auto mode started for you in the last hour (the chip 4 of 8 takes this hour); absent with Auto off
The chat’s last message, turn end or Continue here; a summary landing does not move it. The list is newest first by it
Next since (unchanged when the page is empty)
Example
{ "events": [ { "type": "entry", "entry": { "kind": "user", "line": { "status": "running" }, "card": { "kind": "look", "state": "waiting" }, "error": { "code": "cap_message" }, "steer": "waiting" }, "thread": { "state": "idle" } } ]}Missing or invalid x-api-key (Kong), or missing/invalid/expired/revoked bearer token
object
Example generated
{ "detail": "example"}Not found
object
Example generated
{ "detail": "example"}Invalid input
object
Example generated
{ "detail": "example"}Retryable
object
Example generated
{ "detail": "example"}