Skip to main content
Hand turn-taking the inbound messages as they arrive and get back whether the agent should speak now or stay silent. Call it on every inbound message, or on a small batch — turn-taking weighs the timing and content to decide if this is the agent’s moment to reply. When the decision is speak, draft your agent’s reply and submit it with respond, passing back the turn_epoch from this response. This call is billable, unless the decision is short-circuited by skip_decide or has_media. See Billing. This call is idempotent: retrying the same batch does not double-record it.

Authorization

string
required
Your bearer token: Bearer <token>. See Authentication.

Request body

string
required
The thread to submit to, from open_thread.
InboundMessage[]
required
The inbound messages, in order. 1–20 per call.
string
Optional system-prompt text — the agent’s identity, character, and rules (such as when to join in versus stay quiet) — applied to this decision. Up to 100,000 characters. Sent per request, so each agent in a group chat can send its own.
boolean
default:"false"
Set true to declare that this batch needs no speak / stay-silent decision: the response is always speak, and the call is not billed. Use it in 1:1 chats where every inbound message is addressed to the agent and silence is never the right answer.The batch is still recorded and the turn is still advanced, so the returned turn_epoch is valid for respond as usual. Sent per request — it is never sticky on the thread.
Request
A 1:1 chat that always replies, with a screenshot attached — both short-circuits in one call:
Request (short-circuited)

Response

string
speak if the agent should reply now, or stay_silent if it should wait. On speak, call respond; on stay_silent, do nothing and wait for the next inbound message.
integer
The thread’s current turn. Pass it back in the matching respond so a reply drafted against stale context is dropped. See Interruptions and turn_epoch.
string[]
Behavioural tags for this batch (for example ["fast", "comeback"]). Empty unless the thread enables behavioural signals.
string
What the agent remembers about the people in this conversation, as a short prose block — recalled once for this turn. Empty unless the thread enables social memory and the memory bank has history. Reuse it when you draft the reply, and fold it into the system_prompt you pass to respond so the whole reply path shares the same context without a second lookup.
200 OK

Errors

See Errors for the envelope shape.

Example

Next

  • Respond — submit the agent’s reply when the decision is speak.