Run one turn of the assistant builder conversation.
Not released and not yet evaluated by a human; do not build on it. There is no on/off setting: wherever the platform key is configured this endpoint answers and the platform pays for each call.
Sends the whole conversation so far and receives the builder's next message, plus a draft assistant configuration once it has enough information. Nothing is saved: the draft only fills the AI create form, and the user reviews it and saves it through POST /ais.
The server keeps no conversation. The client sends the full history on every turn, so a refresh does not lose it only if the client stored it. Each message must be user or assistant, and the last one must be user. Strict alternation is not enforced.
The request body may not exceed 160 KiB (163840 bytes), which is enforced while the body is read; a larger body is answered with BUILDER_INPUT_TOO_LARGE (400). The per-message and total limits are reported by GET /ai_builder/status.
Each call counts against a per-customer daily limit, from the moment it starts running. That includes a call that then fails (a provider error, a timeout, or a model answer that could not be used). A call refused because the request was invalid, the builder was unavailable, or the service was busy, is not counted.
Requires an Agent identity with the customer admin or manager permission.
Request body
Example request
{
"messages": [
{
"role": "user",
"content": "I run a dental clinic and want an assistant that answers the phone."
}
],
"current_draft": {
"name": "Clinic front desk",
"detail": "Answers calls, books appointments and hands urgent cases to staff.",
"init_prompt": "You are the front desk assistant of a dental clinic. Greet the caller, ask what they need, and book or move appointments.",
"tool_names": [
"connect_call",
"stop_service"
]
}
}Response
The builder's next message and, when ready, a draft.
Example response
{
"message": "What should the assistant do when nobody is free to take a call?",
"draft": {
"name": "Clinic front desk",
"detail": "Answers calls, books appointments and hands urgent cases to staff.",
"init_prompt": "You are the front desk assistant of a dental clinic. Greet the caller, ask what they need, and book or move appointments.",
"tool_names": [
"connect_call",
"stop_service"
]
},
"assumptions": [
"Opening hours are weekdays 9 to 18."
],
"draft_warnings": [
"tool_removed: create_call"
]
}Changes
Changed in 1 of the 97 revisions of this API.1
- ○
endpoint added
endpoint-added
- ○