test_framework

POST /test_framework/v1/scenarios/create-from-transcript-bg/

Changed on

Create a new evaluator from a call transcript. Analyzes the transcript to extract caller behavior, expected outcomes, and conversation flow.

transcript_json format: array of message objects. Each object requires:

  • role — must be one of: "Main Agent", "Testing Agent", "Function Call", "Function Call Result"
  • content — the message text
  • start_time (optional) — seconds from call start as a float

Note: this endpoint accepts only the above role names. The role names used in the observability transcript ingestion API ("agent", "user", etc.) are not valid here.

Example transcript_json:

[
  {"role": "Main Agent", "content": "Hello, how can I help?", "start_time": 0.0},
  {"role": "Testing Agent", "content": "I need to reschedule.", "start_time": 2.1},
  {"role": "Main Agent", "content": "Sure, what date works?", "start_time": 3.5}
]

Agent lookup: the agent field looks up agents scoped to the project associated with your API key. If the agent belongs to a different project, use assistant_id instead, Returns a progress_idimmediately; poll GET /scenarios/create-from-transcript-progress/?progress_id={id} until

Deprecated: POST /test_framework/v3/scenarios/create-from-transcript/ does this in one call and returns the result.

Request

  • Base URL
    https://api.cekura.ai
  • URL
    https://api.cekura.ai/test_framework/v1/scenarios/create-from-transcript-bg/
  • Auth
    • API key in header X-CEKURA-API-KEY
    • or HTTP bearer
    • or HTTP bearer

Request body

personalityinteger

ID of the personality to use in the simulation

agentinteger

ID of the agent to use in the simulation

assistant_idstring

Assistant ID to use in the simulation

namestring

Name for the simulated scenario

expected_outcome_promptstring

Prompt describing the expected outcome of the scenario

folder_pathstring nullable

Folder path to assign the scenario to, e.g. "Sales" or "Sales.Inbound". Created when it does not already exist; a new folder nests at most one level deep.

Response

progress_idstring

Changes