Skip to main content

Connect to event stream

Open a persistent SSE connection to receive events for a session.
Returns text/event-stream. See Streaming for event types.

Send message

Useful request fields: Response:
The assistant response arrives on the SSE stream.

Submit tool result

Approve or reject a pending tool call.

Background a run

Move an active agent run into background mode. The UI is unblocked immediately and results are delivered via SSE when complete.

Cancel

Cancel a running agent loop by run or session.
Or:
Cancel a foreground subagent tool call:

Queued injections

If a message is queued for injection into an active run, cancel it by client id:

Run status

Background tasks and child agents

Child agents created by research/workflow tools can be inspected and controlled:

Context usage

Response includes model, context limit, message count, and visible/deferred/loaded tool counts.

Compact context

Compress conversation history to free token space.