List test suites
curl --request GET \
--url https://api.lehar.ai/ca/api/v0/agent-test-suites \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.lehar.ai/ca/api/v0/agent-test-suites"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.lehar.ai/ca/api/v0/agent-test-suites', 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.lehar.ai/ca/api/v0/agent-test-suites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-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"
"net/http"
"io"
)
func main() {
url := "https://api.lehar.ai/ca/api/v0/agent-test-suites"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lehar.ai/ca/api/v0/agent-test-suites")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lehar.ai/ca/api/v0/agent-test-suites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "test_suite_01hzy8x2m4q7r8s9t0v1w2x3y4",
"agent_id": "agent_sales_hi",
"name": "Renewal objections",
"scenarios": [
{
"label": "Price objection",
"instructions": "You are a budget-conscious customer who thinks the renewal price is too high. Push back on cost before agreeing to anything.",
"agent_expectations": "Acknowledge the concern, explain the value, and offer to book a callback.",
"judges": [
"task_completion",
"safety"
],
"runs": 2,
"max_turns": 8,
"variables": {
"callee_name": "Jane"
}
}
],
"config": {
"judges": [
"task_completion",
"tool_use",
"safety",
"accuracy",
"relevancy"
],
"variables": {
"company": "Acme"
},
"max_parallel": 3
},
"created_by_user_id": "user_01EXAMPLE",
"created_at": "2026-05-22T10:00:00Z",
"updated_at": "2026-05-22T10:00:00Z"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 1
}
}{
"error": {
"code": "invalid_request",
"message": "limit and offset must be non-negative integers"
}
}Agent Testing
List test suites
Lists the workspace’s agent test suites, newest first. Optionally filter by agent_id. Powers the dashboard Test Runner’s suite list. Scope sessions:read.
GET
/
agent-test-suites
List test suites
curl --request GET \
--url https://api.lehar.ai/ca/api/v0/agent-test-suites \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.lehar.ai/ca/api/v0/agent-test-suites"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.lehar.ai/ca/api/v0/agent-test-suites', 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.lehar.ai/ca/api/v0/agent-test-suites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-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"
"net/http"
"io"
)
func main() {
url := "https://api.lehar.ai/ca/api/v0/agent-test-suites"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lehar.ai/ca/api/v0/agent-test-suites")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lehar.ai/ca/api/v0/agent-test-suites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "test_suite_01hzy8x2m4q7r8s9t0v1w2x3y4",
"agent_id": "agent_sales_hi",
"name": "Renewal objections",
"scenarios": [
{
"label": "Price objection",
"instructions": "You are a budget-conscious customer who thinks the renewal price is too high. Push back on cost before agreeing to anything.",
"agent_expectations": "Acknowledge the concern, explain the value, and offer to book a callback.",
"judges": [
"task_completion",
"safety"
],
"runs": 2,
"max_turns": 8,
"variables": {
"callee_name": "Jane"
}
}
],
"config": {
"judges": [
"task_completion",
"tool_use",
"safety",
"accuracy",
"relevancy"
],
"variables": {
"company": "Acme"
},
"max_parallel": 3
},
"created_by_user_id": "user_01EXAMPLE",
"created_at": "2026-05-22T10:00:00Z",
"updated_at": "2026-05-22T10:00:00Z"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 1
}
}{
"error": {
"code": "invalid_request",
"message": "limit and offset must be non-negative integers"
}
}
