AssistantEvent
AssistantEvent objectOne server-sent event (data: <json>) of a turn
typestring requiredAllowed values:"text""tool""action""usage""waiting""done""error"textstring optionalusageobject optionalinput_tokensinteger optionaloutput_tokensinteger optionalcache_read_tokensinteger optionalcache_write_tokensinteger optional
codestring optionalmessagestring optional
Used by
| POST | /api/v1/tenants/{tid}/assistant/conversations/{cid}/messages | Send a message; the answer streams as server-sent events. Tools run as the caller through these same routes; changes wait for the user (event action). Errors before the stream starts are ordinary problems (ASSISTANT_RATE_LIMITED, ASSISTANT_BUSY) |
| POST | /api/v1/tenants/{tid}/assistant/conversations/{cid}/actions/{aid} | Approve or decline a change the assistant proposed. Approved, it runs as the caller through its own route, audited with via=assistant, plus assistant.action; then the answer continues as server-sent events |