Create test

Creates a new agent response test.

Headers

xi-api-keystringRequired

Request

This endpoint expects an object.
chat_historylist of objectsRequired
success_conditionstringRequired
A prompt that evaluates whether the agent's response is successful. Should return True or False.
success_exampleslist of objectsRequired

Non-empty list of example responses that should be considered successful

failure_exampleslist of objectsRequired

Non-empty list of example responses that should be considered failures

namestringRequired
tool_call_parametersobject or nullOptional

How to evaluate the agent’s tool call (if any). If empty, the tool call is not evaluated.

check_any_tool_matchesboolean or nullOptional
If set to True this test will pass if any tool call returned by the LLM matches the criteria. Otherwise it will fail if more than one tool is returned by the agent.
dynamic_variablesmap from strings to nullable strings or doubles or integers or booleansOptional
Dynamic variables to replace in the agent config during testing
typeenumOptional
Allowed values:
from_conversation_metadataobject or nullOptional

Metadata of a conversation this test was created from (if applicable).

Response

Successful Response
idstring

Errors