Skip to main content
PATCH
/
agents
/
{agent_id}
/
evaluation-config
cURL
curl -X PATCH 'https://api.gumloop.com/api/v1/agents/AGENT_ID/evaluation-config' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "enabled": true,
    "criteria": [
      {
        "name": "Accuracy",
        "prompt": "The agent provided factually correct information.",
        "type": "other",
        "priority": "needs_attention"
      }
    ],
    "data_points": [
      {
        "name": "Customer Intent",
        "data_type": "string",
        "description": "Summarize the customer primary intent in 2-5 words."
      }
    ]
  }'
import requests

response = requests.patch(
"https://api.gumloop.com/api/v1/agents/AGENT_ID/evaluation-config",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"enabled": True,
"criteria": [
{
"name": "Accuracy",
"prompt": "The agent provided factually correct information.",
"type": "other",
"priority": "needs_attention"
}
]
}
)
config = response.json()["config"]
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
model_name: '<string>',
include_auto_tags: true,
criteria: [{name: '<string>', prompt: '<string>'}],
tags: [{name: '<string>', description: '<string>'}],
data_points: [{name: '<string>', description: '<string>'}],
sentiment: {enabled: true, affects_grade: true, description: '<string>'}
})
};

fetch('https://api.gumloop.com/api/v1/agents/{agent_id}/evaluation-config', 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.gumloop.com/api/v1/agents/{agent_id}/evaluation-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'model_name' => '<string>',
'include_auto_tags' => true,
'criteria' => [
[
'name' => '<string>',
'prompt' => '<string>'
]
],
'tags' => [
[
'name' => '<string>',
'description' => '<string>'
]
],
'data_points' => [
[
'name' => '<string>',
'description' => '<string>'
]
],
'sentiment' => [
'enabled' => true,
'affects_grade' => true,
'description' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.gumloop.com/api/v1/agents/{agent_id}/evaluation-config"

payload := strings.NewReader("{\n \"enabled\": true,\n \"model_name\": \"<string>\",\n \"include_auto_tags\": true,\n \"criteria\": [\n {\n \"name\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n ],\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"data_points\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"sentiment\": {\n \"enabled\": true,\n \"affects_grade\": true,\n \"description\": \"<string>\"\n }\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.gumloop.com/api/v1/agents/{agent_id}/evaluation-config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"model_name\": \"<string>\",\n \"include_auto_tags\": true,\n \"criteria\": [\n {\n \"name\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n ],\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"data_points\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"sentiment\": {\n \"enabled\": true,\n \"affects_grade\": true,\n \"description\": \"<string>\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.gumloop.com/api/v1/agents/{agent_id}/evaluation-config")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"model_name\": \"<string>\",\n \"include_auto_tags\": true,\n \"criteria\": [\n {\n \"name\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n ],\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"data_points\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"sentiment\": {\n \"enabled\": true,\n \"affects_grade\": true,\n \"description\": \"<string>\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "config": {
    "agent_id": "<string>",
    "enabled": true,
    "is_active": true,
    "model_name": "<string>",
    "frequency": "<string>",
    "language": "<string>",
    "include_auto_tags": true,
    "interaction_types": [
      "<string>"
    ],
    "criteria": [
      {
        "id": "<string>",
        "name": "<string>",
        "prompt": "<string>",
        "type": "<string>",
        "priority": "<string>"
      }
    ],
    "tags": [
      {
        "name": "<string>",
        "description": "<string>"
      }
    ],
    "data_points": [
      {
        "id": "<string>",
        "name": "<string>",
        "data_type": "<string>",
        "description": "<string>"
      }
    ],
    "sentiment": {
      "enabled": true,
      "affects_grade": true,
      "description": "<string>"
    },
    "updated_ts": "<string>"
  }
}

Authorizations

Authorization
string
header
required

A personal API key or an OAuth 2.0 access token. Personal API keys also require the x-auth-key header with your user ID.

Path Parameters

agent_id
string
required

ID of the agent.

Body

application/json
enabled
boolean

Whether evaluations are enabled for this agent.

model_name
string

LLM model to use for evaluation.

include_auto_tags
boolean

Allow the evaluator to suggest tags beyond your predefined vocabulary.

criteria
object[]

Quality criteria to check (replaces existing list). Max 30.

tags
object[]

Tag vocabulary (replaces existing list). Max 50.

data_points
object[]

Data points to extract (replaces existing list). Max 40.

sentiment
object

Response

Updated evaluation configuration.

config
object