Evaluate a trace
curl --request POST \
--url https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}/evaluate \
--header 'Content-Type: application/json' \
--cookie session= \
--data '
{
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_config_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}/evaluate"
payload = {
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_config_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"cookie": "session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
collection_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
model_config_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}/evaluate', 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://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}/evaluate",
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([
'collection_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'model_config_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_COOKIE => "session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}/evaluate"
payload := strings.NewReader("{\n \"collection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"model_config_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "session=")
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://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}/evaluate")
.header("cookie", "session=")
.header("Content-Type", "application/json")
.body("{\n \"collection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"model_config_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"collection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"model_config_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"averageScore": 123,
"passRate": 123,
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluator_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluator_name": "<string>",
"eval_type": "offline_deterministic",
"score": 0.5,
"passed": true,
"reasoning": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}Evaluate a trace
Runs every evaluator in a collection against the trace and stores the results. Offline (deterministic) evaluators run without a model. LLM-judge evaluators call the model in model_config_id with your organization’s stored provider key, which is required if the collection contains any. Runs synchronously.
Auth: session. Permission: run_agents or manage_agents.
POST
/
projects
/
{projectId}
/
traces
/
{traceId}
/
evaluate
Evaluate a trace
curl --request POST \
--url https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}/evaluate \
--header 'Content-Type: application/json' \
--cookie session= \
--data '
{
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_config_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}/evaluate"
payload = {
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_config_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"cookie": "session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
collection_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
model_config_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}/evaluate', 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://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}/evaluate",
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([
'collection_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'model_config_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_COOKIE => "session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}/evaluate"
payload := strings.NewReader("{\n \"collection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"model_config_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "session=")
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://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}/evaluate")
.header("cookie", "session=")
.header("Content-Type", "application/json")
.body("{\n \"collection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"model_config_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pillarforge.corepillar.ai/api/v1/projects/{projectId}/traces/{traceId}/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"collection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"model_config_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"averageScore": 123,
"passRate": 123,
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluator_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluator_name": "<string>",
"eval_type": "offline_deterministic",
"score": 0.5,
"passed": true,
"reasoning": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}Authorizations
The session cookie set when you sign in to AgentHub or ModelHub in a browser. The cookie name shown here is illustrative. There are no API tokens for these endpoints.
Path Parameters
Project id.
Your trace_id, URL-encoded.
Body
application/json
Response
Run completed.
Show child attributes
Show child attributes