sideagentDocs

Reference

Wire protocol

The request bodies and server-sent events the agent endpoint speaks.

On this page

The endpoint takes POST with a JSON body. A chat turn answers with server-sent events; history actions answer with JSON.

Requests

{ "threadId"?: string, "message": string, "context"?: unknown }
{ "threadId": string, "approval": { "token": string, "decision": "approve" | "reject" } }
{ "action": "threads.list" }
{ "action": "threads.get", "threadId": string }
{ "action": "threads.delete", "threadId": string }

Events in a turn

EventMeaning
turn.startCarries the threadId.
text.deltaA piece of the assistant's text.
tool.startThe agent began calling an operation.
approval.requestThe call needs approval. Carries the arguments, a token and an expiry.
tool.completeThe call finished: HTTP status, arguments, result, and tags to invalidate.
tool.rejectedThe user rejected the call.
errorA code and a message.
turn.endThe turn is over.