Skip to main content

Message Types

Complete reference for all WebSocket message types.

Outgoing Messages (Client → Server)

init

Initialize a session with configuration options.

prompt

Send a one-shot prompt (stateless mode).

sdk_message

Send a message in an active session.

tool_result

Return a tool execution result.

control

Send control commands.

ping

Keep-alive ping.

Incoming Messages (Server → Client)

control

Server control messages.

sdk_message

Streaming response content.
Subtypes:

tool_call

Request tool execution from client.

result

Final response result.

error

Error message.

pong

Response to ping.