Indicates whether the execution should wait until completion. The timeout is 100 seconds. For longer executions, use wait_execution=false in combination with the Get Agent Response endpoint with a polling strategy (default: false).
For chat type templates, the messages array supports the following roles:
Role
Required
Description
user
Yes
User messages. Must be paired with assistant messages.
assistant
Yes
Assistant messages. Must be paired with user messages.
developer
No
Optional developer message. Only allowed as the first message in the array.
system
No
Not supported. Using this role will cause an error.
Important rules:
Messages must alternate between user and assistant roles (after the optional developer message).
The developer role can only appear as the first message in the array and will be extracted before processing the rest.
If two consecutive messages have the same role (e.g., two user messages), the API will return a validation error: “Chat messages must be a pair of user/assistant”.
The system role is not supported and will cause an error.
Example with developer message:
Copy
Ask AI
{ "messages": [ { "role": "developer", "content": "You are a helpful assistant." }, { "role": "user", "content": "Hello!" }, { "role": "assistant", "content": "Hi there! How can I help you?" }, { "role": "user", "content": "What's the weather like?" } ]}
Example without developer message:
Copy
Ask AI
{ "messages": [ { "role": "user", "content": "Hello!" }, { "role": "assistant", "content": "Hi there! How can I help you?" }, { "role": "user", "content": "What's the weather like?" } ]}
Get more details of which options are accepted by this Agent requesting this endpoint: Get Agent