Run evaluators against an agent over any transport
curl --request POST \
--url https://api.cekura.ai/test_framework/v2/scenarios/run/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"transport": "vapi_webrtc",
"agent": 12,
"scenarios": [
101,
102
],
"frequency": 1,
"name": "Q3 regression",
"concurrency_limit": 5
}
'import requests
url = "https://api.cekura.ai/test_framework/v2/scenarios/run/"
payload = {
"transport": "vapi_webrtc",
"agent": 12,
"scenarios": [101, 102],
"frequency": 1,
"name": "Q3 regression",
"concurrency_limit": 5
}
headers = {
"X-CEKURA-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-CEKURA-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
transport: 'vapi_webrtc',
agent: 12,
scenarios: [101, 102],
frequency: 1,
name: 'Q3 regression',
concurrency_limit: 5
})
};
fetch('https://api.cekura.ai/test_framework/v2/scenarios/run/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cekura.ai/test_framework/v2/scenarios/run/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'transport' => 'vapi_webrtc',
'agent' => 12,
'scenarios' => [
101,
102
],
'frequency' => 1,
'name' => 'Q3 regression',
'concurrency_limit' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CEKURA-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cekura.ai/test_framework/v2/scenarios/run/"
payload := strings.NewReader("{\n \"transport\": \"vapi_webrtc\",\n \"agent\": 12,\n \"scenarios\": [\n 101,\n 102\n ],\n \"frequency\": 1,\n \"name\": \"Q3 regression\",\n \"concurrency_limit\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-CEKURA-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cekura.ai/test_framework/v2/scenarios/run/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transport\": \"vapi_webrtc\",\n \"agent\": 12,\n \"scenarios\": [\n 101,\n 102\n ],\n \"frequency\": 1,\n \"name\": \"Q3 regression\",\n \"concurrency_limit\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v2/scenarios/run/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transport\": \"vapi_webrtc\",\n \"agent\": 12,\n \"scenarios\": [\n 101,\n 102\n ],\n \"frequency\": 1,\n \"name\": \"Q3 regression\",\n \"concurrency_limit\": 5\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"id": 123,
"agent": 123,
"agent_inbound": true,
"status": "pending",
"success_rate": 0,
"run_as_text": false,
"is_cronjob": "<string>",
"runs": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"field_name": [
"<string>"
]
}Evaluators
Run Evaluator V2
Start evaluator runs against an agent. Pick how the simulated user reaches the agent with transport; it must be one of the agent’s enabled_connections (see aiagents_retrieve), and a transport that is not enabled is rejected with the list of enabled ones. Fields that belong to another transport are rejected.
POST
/
test_framework
/
v2
/
scenarios
/
run
/
Run evaluators against an agent over any transport
curl --request POST \
--url https://api.cekura.ai/test_framework/v2/scenarios/run/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"transport": "vapi_webrtc",
"agent": 12,
"scenarios": [
101,
102
],
"frequency": 1,
"name": "Q3 regression",
"concurrency_limit": 5
}
'import requests
url = "https://api.cekura.ai/test_framework/v2/scenarios/run/"
payload = {
"transport": "vapi_webrtc",
"agent": 12,
"scenarios": [101, 102],
"frequency": 1,
"name": "Q3 regression",
"concurrency_limit": 5
}
headers = {
"X-CEKURA-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-CEKURA-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
transport: 'vapi_webrtc',
agent: 12,
scenarios: [101, 102],
frequency: 1,
name: 'Q3 regression',
concurrency_limit: 5
})
};
fetch('https://api.cekura.ai/test_framework/v2/scenarios/run/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cekura.ai/test_framework/v2/scenarios/run/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'transport' => 'vapi_webrtc',
'agent' => 12,
'scenarios' => [
101,
102
],
'frequency' => 1,
'name' => 'Q3 regression',
'concurrency_limit' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CEKURA-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cekura.ai/test_framework/v2/scenarios/run/"
payload := strings.NewReader("{\n \"transport\": \"vapi_webrtc\",\n \"agent\": 12,\n \"scenarios\": [\n 101,\n 102\n ],\n \"frequency\": 1,\n \"name\": \"Q3 regression\",\n \"concurrency_limit\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-CEKURA-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cekura.ai/test_framework/v2/scenarios/run/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transport\": \"vapi_webrtc\",\n \"agent\": 12,\n \"scenarios\": [\n 101,\n 102\n ],\n \"frequency\": 1,\n \"name\": \"Q3 regression\",\n \"concurrency_limit\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v2/scenarios/run/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transport\": \"vapi_webrtc\",\n \"agent\": 12,\n \"scenarios\": [\n 101,\n 102\n ],\n \"frequency\": 1,\n \"name\": \"Q3 regression\",\n \"concurrency_limit\": 5\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"id": 123,
"agent": 123,
"agent_inbound": true,
"status": "pending",
"success_rate": 0,
"run_as_text": false,
"is_cronjob": "<string>",
"runs": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"field_name": [
"<string>"
]
}Authorizations
api_keyoauth2supabase_session
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
How the simulated user reaches the agent. Must be enabled on the agent; aiagents_retrieve lists the options under enabled_connections. websocket and pipecat_v1 carry their connection details per scenario instead.
voice- Voicesip- SIPtext- Textemail- Emailvapi_webrtc- VAPI WebRTCretell_webrtc- Retell WebRTCelevenlabs- ElevenLabslivekit_v2- LiveKitpipecat_v2- Pipecat Cloudchirp- Raw-PCM WebSocketagora- Agorawebsocket- WebSocket (per-scenario URLs)pipecat_v1- Pipecat (per-scenario room URLs)
Available options:
voice, sip, text, email, vapi_webrtc, retell_webrtc, elevenlabs, livekit_v2, pipecat_v2, chirp, agora, websocket, pipecat_v1 Response
Current status of the result
running- Runningcompleted- Completedfailed- Failedpending- Pendingin_progress- In Progressevaluating- Evaluatingin_queue- In Queuetimeout- Timeoutcancelled- Cancelledscaling_up- Scaling Up
Available options:
running, completed, failed, pending, in_progress, evaluating, in_queue, timeout, cancelled, scaling_up