Create Evaluator
Create a test scenario (evaluator) that simulates a caller interacting with your agent.
Authorizations
API Key Authentication. It should be included in the header of each request.
Body
Name of the evaluator
The personality of the evaluator
ID of the agent. Either agent or project must be provided.
ID of the project. Either agent or project must be provided.
Alternative to agent ID - the assistant ID to use for this scenario
Example: "asst_1234567890"
Type of scenario to create:
instruction: Standard instruction-based scenario where the instructions field contains plain textconditional_actions: Conditional action-based scenario where the instructions field contains a JSON structure
Default: instruction
instruction- Instructionconditional_actions- Conditional Actions
instruction, conditional_actions Scenario Instructions - the format depends on the scenario_type:
For scenario_type="instruction":
Provide plain text instructions that describe the scenario behavior.
Example: "You are a customer calling to inquire about your order status. Be polite and provide order number 12345 when asked."
For scenario_type="conditional_actions":
Use the structured conditional_actions field instead. If you send via instructions, pass a JSON-formatted string with the following structure:
{
"role": "A friendly customer calling about an appointment",
"conditions": [
{
"id": 0,
"condition": "FIRST_MESSAGE",
"action": "Hi, I'd like to check on my upcoming appointment <silence time=\"1.5s\" />",
"type": "standard",
"fixed_message": true
},
{
"id": 1,
"condition": "The agent asks for your name",
"action": "My name is Sarah Johnson",
"type": "standard",
"fixed_message": true
},
{
"id": 2,
"condition": "The agent asks for your date of birth",
"action": "January first, nineteen ninety",
"type": "standard",
"fixed_message": true
},
{
"id": 3,
"condition": "The agent confirms your identity and provides appointment details",
"action": "Thank you, that's all I needed <silence time=\"1.0s\" />",
"type": "standard",
"fixed_message": true
},
{
"id": 4,
"condition": 3,
"action": "<endcall />",
"type": "action_followup",
"fixed_message": true
}
]
}Note: When sent via instructions, the value must be a JSON-formatted string (e.g. JSON.stringify(...) / json.dumps(...)). For new integrations, use the structured conditional_actions field below.
Structure Details:
-
role(string): Personality/role description for the scenario actor -
conditions(array): Ordered list of conditional actions that define the conversation flowEach condition object has:
-
id(integer): Unique sequential identifier (0, 1, 2, 3...) -
condition(string | integer): The trigger that activates this action"FIRST_MESSAGE"— Triggers at conversation start (use forid: 0)- Natural-language description of the main agent's observable action, written from a third-person observer perspective (e.g.
"The agent asks for your date of birth","The agent confirms the cancellation"). Matched semantically against the conversation context. - Integer (e.g.
3) — References another condition'sidfor sequentialaction_followupchaining
-
action(string): What the scenario actor says or does- SSML pause tags:
<silence time="1.5s" />(interruptible) or<hold time="2s" />(not interruptible).<silence>lets the main agent jump in mid-pause;<hold>enforces dead air. - Emotion markers:
[laughter],[sigh], etc. (can repeat like[laughter] [laughter]) - Special actions:
<endcall />to end the call
- SSML pause tags:
-
type(string): Either"standard"(normal response) or"action_followup"(fires on the testing agent's next turn after the referenced condition — one main-agent reply elapses in between, regardless of its content; never fires in the same turn as its parent) -
fixed_message(boolean): Set totruefor fixed responses,falsefor dynamic
-
Usage Tips:
- Always start with
id: 0andcondition: "FIRST_MESSAGE" - Write conditions as third-person descriptions of what the main agent does (e.g.
"The agent confirms the cancellation") - Use the last condition to trigger
<endcall />for clean call termination - Combine SSML tags and emotion markers naturally:
"Great <silence time=\"1.5s\" /> [laughter] [laughter]"
Structured conditional-actions object for scenario_type="conditional_actions". Use either conditional_actions (structured) or instructions (plain text) — not both.
Expected Outcome Prompt
Example: "The user should be able to complete the order"
List of metric IDs to associate with this evaluator
Example: [123, 456, 789]
List of tags to associate with the evaluator
Example: ["tag1", "tag2", "tag3"]
List of tool IDs to use for evaluator
[
"TOOL_DTMF",
"TOOL_END_CALL",
"TOOL_END_CALL_ONLY_ON_TRANSFER"
]The test profile ID to use for the evaluator
The phone number ID to use for the evaluator (works for both inbound and outbound)
(Deprecated) The inbound phone number ID to use for the evaluator. Use phone_number instead, which works for both inbound and outbound.
Dot-separated path of the folder to assign this evaluator to (e.g. "Sales.Inbound"). Folders must be created before use — they are not auto-created. Use scenarios_create_folder_create to create each level before assigning evaluators. Example: to use "Sales.Inbound", first create "Sales", then create "Inbound" inside it.
Response
Name of the evaluator
Agent ID
Example: 2142
ID of the personality
Name of the personality
Name of the agent associated with this scenario
Example: "Customer Support Agent"
List of tags of the evaluators
Example: ["tag1", "tag2", "tag3"]
List of tool IDs to associate with this scenario
Example: ["TOOL_DTMF", "TOOL_END_CALL"]
List of metric IDs
Example: [123, 456, 789]
List of metric names
Example: ["Metric 1", "Metric 2", "Metric 3"]
Phone number eg: +17776666333
Phone number used for outbound calls in this scenario
Example: "+1234567890"
First message of the evaluator
(Deprecated) Phone number used for inbound calls in this scenario. Use outbound_phone_number_data instead.
After CEK-6517, both phone_number and inbound_phone_number fields are synced, so outbound_phone_number_data contains the unified phone number for both inbound and outbound calls.
Example: {"id": 123, "number": "+1234567890", "phone_number_id": "abc123"}
Scenario Instructions - format depends on scenario_type:
- For
instructiontype: Plain text instructions - For
conditional_actionstype: JSON string with role and conditions array. Each condition has id, condition trigger (FIRST_MESSAGE, a natural-language third-person description of the main agent's observable action — e.g."The agent asks for your date of birth", matched semantically — or an integer reference to another condition's id), action (text with optional<silence time="1.5s" />(interruptible) or<hold time="2s" />(not interruptible) and[laughter]tags), type (standard/action_followup), and fixed_message flag
Simulation Description
Information fields of the evaluator Example:
{
"user_name": "John Doe",
"user_email": "john.doe@example.com",
}Expected outcome prompt of the evaluator
Example: "The user should be able to complete the order"
Language of the scenario
af- Afrikaansar- Arabicbn- Bengalibg- Bulgarianzh- Chinese Simplifiedcs- Czechda- Danishnl- Dutchen- Englishet- Estonianfi- Finnishfr- Frenchde- Germanel- Greekgu- Gujaratihi- Hindihe- Hebrewhu- Hungarianid- Indonesianit- Italianja- Japanesekn- Kannadako- Koreanms- Malayml- Malayalammr- Marathimulti- Multilingualno- Norwegianpl- Polishpa- Punjabipt- Portuguesero- Romanianru- Russiansk- Slovakes- Spanishsv- Swedishth- Thaitr- Turkishtl- Tagalogta- Tamilte- Teluguuk- Ukrainianvi- Vietnamese
af, ar, bn, bg, zh, cs, da, nl, en, et, fi, fr, de, el, gu, hi, he, hu, id, it, ja, kn, ko, ms, ml, mr, multi, no, pl, pa, pt, ro, ru, sk, es, sv, th, tr, tl, ta, te, uk, vi Type of scenario:
instruction: Standard instruction-based scenario (plain text instructions)conditional_actions: Conditional action-based scenario (JSON with role, conditions, SSML tags, emotion markers)real_world_smart: Real world smart scenarioreal_world_fixed: Real world fixed scenario
Type of predefined suite (e.g., infrastructure)
undefined- Undefinedinfrastructure- Infrastructure
undefined, infrastructure Whether this is a predefined scenario (template)
Details of the test profile associated with this scenario Example:
{
"id": "<integer>",
"agent_id": "<integer>",
"name": "<string>",
"information": {
"user_name": "<string>",
"user_email": "<string>",
"order_id": "<string>",
},
}Generated values for the agent's dynamic variables for this scenario. Keys are variable names; values are the generated values.
Dot-separated path of the folder to assign this evaluator to (e.g. "Sales.Inbound"). Folders must be created before use — they are not auto-created. Use scenarios_create_folder_create to create each level before assigning evaluators. Example: to use "Sales.Inbound", first create "Sales", then create "Inbound" inside it.
Max call duration in seconds for this scenario. If not provided or set to null, the scenario will use the project's max_call_duration setting.
Valid range: 10-3600 seconds (10 seconds to 60 minutes)
Example: 600 (10 minutes)