Assistants
Create an assistant
Create a new AI Assistant.
post/ai/assistants
Request body
Example request
{
"conversation_flow": {
"edges": [
{
"condition": {
"prompt": "The caller is asking about a bill or charge.",
"type": "llm"
},
"id": "e_intake_to_billing",
"start_node_id": "n_intake",
"target": {
"node_id": "n_billing",
"type": "node"
}
},
{
"condition": {
"prompt": "The caller has explicitly asked for a human.",
"type": "llm"
},
"id": "e_intake_to_escalation_assistant",
"start_node_id": "n_intake",
"target": {
"assistant_id": "assistant-human-handoff",
"position": {
"x": 600,
"y": 80
},
"type": "assistant",
"voice_mode": "distinct"
}
}
],
"nodes": [
{
"id": "n_intake",
"instructions": "Greet the caller and ask what they're calling about.",
"name": "Intake",
"position": {
"x": 120,
"y": 80
},
"shared_tool_ids": [
"tool-faq-kb"
],
"type": "prompt"
},
{
"id": "n_billing",
"instructions": "Focus on billing questions. Look up the caller's latest invoice with the billing tool before answering.",
"instructions_mode": "append",
"model": "moonshotai/Kimi-K2.6",
"name": "Billing",
"position": {
"x": 420,
"y": 80
},
"shared_tool_ids": [
"tool-billing-lookup"
],
"tools_mode": "append",
"type": "prompt"
}
],
"start_node_id": "n_intake"
},
"tools": [
{
"webhook": {
"body_parameters": {
"properties": {
"age": {
"description": "The age of the customer.",
"type": "integer"
},
"location": {
"description": "The location of the customer.",
"type": "string"
}
},
"required": [
"age",
"location"
],
"type": "object"
},
"path_parameters": {
"properties": {
"id": {
"description": "The id of the customer.",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"query_parameters": {
"properties": {
"page": {
"description": "The page number.",
"type": "integer"
}
},
"required": [
"page"
],
"type": "object"
},
"url": "https://example.com/api/v1/function"
}
}
]
}Response
Successful Response
Example response
{
"conversation_flow": {
"edges": [
{
"condition": {
"prompt": "The caller is asking about a bill or charge.",
"type": "llm"
},
"id": "e_intake_to_billing",
"start_node_id": "n_intake",
"target": {
"node_id": "n_billing",
"type": "node"
}
},
{
"condition": {
"prompt": "The caller has explicitly asked for a human.",
"type": "llm"
},
"id": "e_intake_to_escalation_assistant",
"start_node_id": "n_intake",
"target": {
"assistant_id": "assistant-human-handoff",
"position": {
"x": 600,
"y": 80
},
"type": "assistant",
"voice_mode": "distinct"
}
}
],
"nodes": [
{
"id": "n_intake",
"instructions": "Greet the caller and ask what they're calling about.",
"name": "Intake",
"position": {
"x": 120,
"y": 80
},
"shared_tool_ids": [
"tool-faq-kb"
],
"type": "prompt"
},
{
"id": "n_billing",
"instructions": "Focus on billing questions. Look up the caller's latest invoice with the billing tool before answering.",
"instructions_mode": "append",
"model": "moonshotai/Kimi-K2.6",
"name": "Billing",
"position": {
"x": 420,
"y": 80
},
"shared_tool_ids": [
"tool-billing-lookup"
],
"tools_mode": "append",
"type": "prompt"
}
],
"start_node_id": "n_intake"
},
"tools": [
{
"webhook": {
"body_parameters": {
"properties": {
"age": {
"description": "The age of the customer.",
"type": "integer"
},
"location": {
"description": "The location of the customer.",
"type": "string"
}
},
"required": [
"age",
"location"
],
"type": "object"
},
"path_parameters": {
"properties": {
"id": {
"description": "The id of the customer.",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"query_parameters": {
"properties": {
"page": {
"description": "The page number.",
"type": "integer"
}
},
"required": [
"page"
],
"type": "object"
},
"url": "https://example.com/api/v1/function"
}
}
]
}