cURL
curl --request POST \
--url https://api.cekura.ai/test_framework/v1/scenarios/scenario-agent/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"user_message": "",
"agent_id": 123,
"project_id": 123,
"session_id": 123,
"num_scenarios": 1,
"knowledge_base": [
123
],
"tool_ids": [
"<string>"
],
"inbound_phone_numbers": [
123
]
}
'import requests
url = "https://api.cekura.ai/test_framework/v1/scenarios/scenario-agent/"
payload = {
"user_message": "",
"agent_id": 123,
"project_id": 123,
"session_id": 123,
"num_scenarios": 1,
"knowledge_base": [123],
"tool_ids": ["<string>"],
"inbound_phone_numbers": [123]
}
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({
user_message: '',
agent_id: 123,
project_id: 123,
session_id: 123,
num_scenarios: 1,
knowledge_base: [123],
tool_ids: ['<string>'],
inbound_phone_numbers: [123]
})
};
fetch('https://api.cekura.ai/test_framework/v1/scenarios/scenario-agent/', 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/v1/scenarios/scenario-agent/",
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([
'user_message' => '',
'agent_id' => 123,
'project_id' => 123,
'session_id' => 123,
'num_scenarios' => 1,
'knowledge_base' => [
123
],
'tool_ids' => [
'<string>'
],
'inbound_phone_numbers' => [
123
]
]),
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/v1/scenarios/scenario-agent/"
payload := strings.NewReader("{\n \"user_message\": \"\",\n \"agent_id\": 123,\n \"project_id\": 123,\n \"session_id\": 123,\n \"num_scenarios\": 1,\n \"knowledge_base\": [\n 123\n ],\n \"tool_ids\": [\n \"<string>\"\n ],\n \"inbound_phone_numbers\": [\n 123\n ]\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/v1/scenarios/scenario-agent/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_message\": \"\",\n \"agent_id\": 123,\n \"project_id\": 123,\n \"session_id\": 123,\n \"num_scenarios\": 1,\n \"knowledge_base\": [\n 123\n ],\n \"tool_ids\": [\n \"<string>\"\n ],\n \"inbound_phone_numbers\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v1/scenarios/scenario-agent/")
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 \"user_message\": \"\",\n \"agent_id\": 123,\n \"project_id\": 123,\n \"session_id\": 123,\n \"num_scenarios\": 1,\n \"knowledge_base\": [\n 123\n ],\n \"tool_ids\": [\n \"<string>\"\n ],\n \"inbound_phone_numbers\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"progress_id": "<string>",
"session_id": 123
}{
"field_name": [
"<string>"
]
}Improve Evaluators
Improve Evaluators with AI
Improve evaluators using AI by providing natural language feedback.
POST
/
test_framework
/
v1
/
scenarios
/
scenario-agent
/
cURL
curl --request POST \
--url https://api.cekura.ai/test_framework/v1/scenarios/scenario-agent/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"user_message": "",
"agent_id": 123,
"project_id": 123,
"session_id": 123,
"num_scenarios": 1,
"knowledge_base": [
123
],
"tool_ids": [
"<string>"
],
"inbound_phone_numbers": [
123
]
}
'import requests
url = "https://api.cekura.ai/test_framework/v1/scenarios/scenario-agent/"
payload = {
"user_message": "",
"agent_id": 123,
"project_id": 123,
"session_id": 123,
"num_scenarios": 1,
"knowledge_base": [123],
"tool_ids": ["<string>"],
"inbound_phone_numbers": [123]
}
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({
user_message: '',
agent_id: 123,
project_id: 123,
session_id: 123,
num_scenarios: 1,
knowledge_base: [123],
tool_ids: ['<string>'],
inbound_phone_numbers: [123]
})
};
fetch('https://api.cekura.ai/test_framework/v1/scenarios/scenario-agent/', 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/v1/scenarios/scenario-agent/",
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([
'user_message' => '',
'agent_id' => 123,
'project_id' => 123,
'session_id' => 123,
'num_scenarios' => 1,
'knowledge_base' => [
123
],
'tool_ids' => [
'<string>'
],
'inbound_phone_numbers' => [
123
]
]),
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/v1/scenarios/scenario-agent/"
payload := strings.NewReader("{\n \"user_message\": \"\",\n \"agent_id\": 123,\n \"project_id\": 123,\n \"session_id\": 123,\n \"num_scenarios\": 1,\n \"knowledge_base\": [\n 123\n ],\n \"tool_ids\": [\n \"<string>\"\n ],\n \"inbound_phone_numbers\": [\n 123\n ]\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/v1/scenarios/scenario-agent/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_message\": \"\",\n \"agent_id\": 123,\n \"project_id\": 123,\n \"session_id\": 123,\n \"num_scenarios\": 1,\n \"knowledge_base\": [\n 123\n ],\n \"tool_ids\": [\n \"<string>\"\n ],\n \"inbound_phone_numbers\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v1/scenarios/scenario-agent/")
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 \"user_message\": \"\",\n \"agent_id\": 123,\n \"project_id\": 123,\n \"session_id\": 123,\n \"num_scenarios\": 1,\n \"knowledge_base\": [\n 123\n ],\n \"tool_ids\": [\n \"<string>\"\n ],\n \"inbound_phone_numbers\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"progress_id": "<string>",
"session_id": 123
}{
"field_name": [
"<string>"
]
}Authorizations
api_keyoauth2supabase_session
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Clarify what a batch of evaluator scenarios should cover before generating them.
Improving existing evaluators is not done here — the Cekura agent reads the
evaluators attached to its turn and writes changes back with the ordinary
scenario write endpoints. See test_framework.scenario_chat_context.