Skip to main content
profClaw supports two streaming mechanisms: SSE (Server-Sent Events) for agentic execution, and inline SSE for streaming completions.

Agentic SSE Stream

Endpoint: POST /api/chat/conversations/:id/messages/agentic The response uses Content-Type: text/event-stream. Each line follows the SSE format:

Request body

Event Types

user_message

Sent immediately with the saved user message.

session:start

Agent session initialized.

thinking:start / thinking:update / thinking:end

Reasoning process events (when showThinking: true and the model supports extended thinking).

step:start / step:complete

Each autonomous step the agent takes.

tool:call

tool:result

summary

complete

message_saved

error

The special code TIMEOUT is sent when the 3-minute session timeout is reached.

Streaming Completions (SSE)

For POST /api/chat/completions with "stream": true, each chunk is:

JavaScript Example