Tell the assistant what you want done
post/agents/assistant/threads/{id}/messages
Tell the assistant what you want done; it answers as a stream of events (words, plan, previews, approval requests, results).
Before you call
- Credential
Authorization: Bearer $KEY- Scope
agents:write- Sdk
agents.assistant.message- Cli
agents assistant message
Parameters
- idstringrequiredIn the path
Request bodyapplication/json, required
- messagestringrequiredAt most 8000 characters.
- modestringOne of: ask, plan, do_with_approval, do_within_rules. Default: do_with_approval.
- mentionslist of objectDefault: [].
- attachmentslist of objectDefault: [].
Responses
- 200text/event-streamSuccess
string - 400application/jsonThe request was malformed
- errorstringrequired
- messagestring
- 401application/jsonNo valid credential
- errorstringrequired
- messagestring
- 403application/jsonThe credential lacks the scope, origin or address
- errorstringrequired
- messagestring
- 429application/jsonOver the key's rate limit; see Retry-After
- errorstringrequired
- messagestring