List test runs
curl --request GET \
--url https://api.lehar.ai/ca/api/v0/agent-test-runs \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.lehar.ai/ca/api/v0/agent-test-runs"
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-runs', 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-runs",
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-runs"
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-runs")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lehar.ai/ca/api/v0/agent-test-runs")
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_run_01hzyb3c5d6e7f8g9h0j1k2l3m",
"suite_id": "test_suite_01hzy8x2m4q7r8s9t0v1w2x3y4",
"agent_id": "agent_sales_hi",
"status": "passed",
"prompt_fingerprint": "9f2c1a7b4e6d8f0a1b2c3d4e5f607182",
"total_scenarios": 3,
"passed_scenarios": 3,
"pass_rate": 1,
"cost_credits": 0.42,
"temporal_workflow_id": "agent-test-test_run_01hzyb3c5d6e7f8g9h0j1k2l3m",
"error": null,
"created_at": "2026-05-22T10:05:00Z",
"updated_at": "2026-05-22T10:07:30Z"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 1
}
}{
"error": {
"code": "invalid_request",
"message": "limit and offset must be non-negative integers"
}
}Agent Testing
List test runs
Lists agent test runs, newest first. Filter by suite_id and/or agent_id. Powers the dashboard Test Runner’s run history. Scope sessions:read.
GET
/
agent-test-runs
List test runs
curl --request GET \
--url https://api.lehar.ai/ca/api/v0/agent-test-runs \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.lehar.ai/ca/api/v0/agent-test-runs"
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-runs', 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-runs",
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-runs"
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-runs")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lehar.ai/ca/api/v0/agent-test-runs")
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_run_01hzyb3c5d6e7f8g9h0j1k2l3m",
"suite_id": "test_suite_01hzy8x2m4q7r8s9t0v1w2x3y4",
"agent_id": "agent_sales_hi",
"status": "passed",
"prompt_fingerprint": "9f2c1a7b4e6d8f0a1b2c3d4e5f607182",
"total_scenarios": 3,
"passed_scenarios": 3,
"pass_rate": 1,
"cost_credits": 0.42,
"temporal_workflow_id": "agent-test-test_run_01hzyb3c5d6e7f8g9h0j1k2l3m",
"error": null,
"created_at": "2026-05-22T10:05:00Z",
"updated_at": "2026-05-22T10:07:30Z"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 1
}
}{
"error": {
"code": "invalid_request",
"message": "limit and offset must be non-negative integers"
}
}Authorizations
ApiKeyAuthBearerAuth
Query Parameters
Filter to runs of one suite.
Filter to runs against one agent.
Items to return (max 100).
Required range:
x <= 100Items to skip.
Response
Paginated test runs

