Create an evaluator
Changed onscenarios_create: Create a test scenario (evaluator) that simulates a caller interacting with your agent. Required: name, instructions or program (see modes), and an agent or project to attach to.
Prefer generation for instruction scenarios: scenarios_generate_bg grounds them in the agent's description, knowledge base and mock tools, and auto-attaches a test profile and the project's metrics — even for a single scenario (num_scenarios: 1, with the case described in extra_instructions). Use this create tool for conditional_actions scenarios whose structure is exactly known, or to save instruction text the user supplied verbatim — not to hand-write behavioral instructions a generation call could produce.
Two modes — pick one via scenario_type:
-
instruction — plain-text caller instructions in the instructions field. The simulated caller uses an LLM to paraphrase your instructions during the call. Prefer scenarios_generate_bg for these (see above).
-
conditional_actions — deterministic, rule-based caller. Provide the structured conditional_actions object: an optional first_message, then conditions of when / say / then. Steps are spoken verbatim unless wrapped in <ai_generated>...</ai_generated>. Use either conditional_actions or instructions — not both.
Common companion fields:
- personality (required) — caller voice/personality ID. Browse via GET /personalities/. It also sets the caller's spoken language.
- expected_outcome_prompt — what a passing call looks like, graded statement by statement after each run. It is evaluated ONLY when the project's Expected Outcome metric is attached to the scenario, so attach that metric every time you set this field.
- metrics — list of metric IDs to evaluate after each run. A scenario created here starts with NO metrics attached (unlike generated ones): always attach the project's baseline set, including the Expected Outcome metric.
- tags — for grouping and later selection via run_scenarios?tags=[...].
- folder_path — e.g. "Sales.Inbound" for folder organization.
- test_profile — a test profile ID providing caller metadata (order_id, user_email, etc.).
To run evaluators after creating: call run_scenarios (voice), run_scenarios_text, run_scenarios_with_websockets, or run_scenarios_pipecat with the scenario ID(s) returned here.
Request
- Base URLhttps://api.cekura.ai
- URLhttps://api.cekura.ai/test_framework/v1/scenarios/
- Auth
- API key in header X-CEKURA-API-KEY
- or HTTP bearer
- or HTTP bearer
Request body
Example request
{
"tool_ids": [
"TOOL_DTMF",
"TOOL_END_CALL",
"TOOL_END_CALL_ONLY_ON_TRANSFER"
]
}Response
Changes
- info
endpoint added
- info