Create Evaluator API

Create a new evaluator for a specific agent with defined metrics and personality traits.

API Endpoint

MethodEndpoint
POSThttps://new-prod.vocera.ai/test_framework/v1/scenarios-external/

Authentication

Include your API key in the request headers:

HeaderDescription
X-VOCERA-API-KEYYour API key obtained from the dashboard

Request Parameters

ParameterTypeRequiredDescription
agentintegerYes*ID of the agent
assistant_idstringYes*The assistant ID associated with agent
namestringYesName of the evaluator
personalityintegerYesID of the personality to use
instructionsstringYesInstructions for the evaluator
agentintegerYes*ID of the agent
assistant_idstringYes*The assistant ID associated with agent
expected_outcome_promptstringNoPrompt to evaluate expected outcome
metricsarray|integer|stringNoMetrics to set to scenario, can be array of metric IDs or first N metrics or “all” to add all or “predefined” to add all predefined

* Only either of agent or assistant_id is required

Example Request Body

{
  "agent": 4,
  "name": "Demo evaluator",
  "personality": 2,
  "instructions": "Some instructions",
  "expected_outcome_prompt": "Issue was resolved with a refund or replacement",
  "metrics": [1,2]
}

Response

A successful request returns the created evaluator details.

Response Fields

FieldTypeDescription
idintegerUnique identifier for the evaluator
namestringName of the evaluator
agentintegerID of the associated agent
personalityintegerID of the personality used
personality_namestringHuman-readable name of the personality
runsarrayList of evaluator runs (empty for new evaluators)
instructionsstringEvaluator instructions
expected_outcome_promptstringPrompt to evaluate expected outcome
metricsarrayArray of metric IDs

Example Response

{
    "id": 202,
    "name": "Demo evaluator",
    "agent": 4,
    "personality": 2,
    "personality_name": "Frustrated Dutch, English",
    "runs": [],
    "instructions": "Some instructions",
    "expected_outcome_prompt": "Issue was resolved with a refund or replacement",
    "metrics": [1,2]
}

Code Examples

curl -X POST https://new-prod.vocera.ai/test_framework/v1/scenarios-external/ \
  -H "X-VOCERA-API-KEY: <your-api-key-here>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<evaluator-name>",
    "agent": <agent-id>,
    "personality": <personality-id>,
    "instructions": "<evaluator-instructions>",
    "metrics": [<metric-id>, <metric-ids>],
    "expected_outcome_prompt": "<expected-outcome-prompt>"
  }'