Skip to main content
Send a message to a session and get the agent’s turn back. Set stream to choose the response shape. POST /v1/sessions/{session_id}/messages - POST /{org}/{agent}/v1/sessions/{session_id}/messages

Request

text
string
required
The message to send.
agent
string
Route this turn to a named sub-agent. Defaults to the session’s current sub-agent.
participant_name
string
The sending participant; messages are attributed to it.
participant_type
string
human or ai.
thinking
boolean
default:"false"
Surface extended-thinking / reasoning events.
stream
boolean
default:"false"
true -> Server-Sent Events. false -> a single accumulated JSON response.

Unary response (stream: false)

Streaming response (stream: true)

The stream is the typed event model: text, tool_use, reasoning, step_start, step_finish, input_required, error, done. A turn may pause with input_required to request approval - resolve it via Inputs.

Status codes

Want to drive an agent with an existing OpenAI or Anthropic client instead of this native shape? Use a consumer adapter
  • same turn, re-framed into those wire formats.