Skip to main content
PATCH
Update Agent Evaluation Test
Changes state - verify before retry Update an agent evaluation test to replace its saved name, folder, type, and configuration without starting a run.

Update Agent Evaluation Test

Get the agent and test IDs from List Agent Evaluation Tests. Preserve any configuration you want to keep.

Minimal request

Send all three required fields: name, type, and config. This operation is not a partial merge of config. Omit folder, or send null or an empty string, to clear the folder.
For a simulation, scenario describes the caller’s task and criteria lists the expected behavior. For next_reply, provide history ending in a caller turn and criteria for the next reply. For tool_call, save the conversation history and expected tool configuration. The config object is saved as supplied, so review its contents before running.

Verify the result

A 200 response contains the updated test in data. List tests again and compare the saved definition before starting another evaluation run.

Errors and recovery

400 indicates an invalid definition; 404 means the agent or test was not found in this workspace. Repeating the same replacement does not create another test, but it can overwrite a newer edit. Read the current definition before retrying. Missing, expired, or invalid API credentials return 401. See API authentication.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Agent ID from List Agents.

testId
string
required

Saved test ID from List Agent Evaluation Tests.

Body

application/json
name
string
required

Test name. Surrounding whitespace is removed.

Maximum string length: 200
type
enum<string>
required
Available options:
next_reply,
tool_call,
simulation
config
object
required

Test definition for the selected type. Use a scenario and criteria for a simulation, or history and criteria for a reply check. Saved as supplied; saving does not run the test.

folder
string | null

Optional folder. Omit, send null or an empty string to use no folder.

Maximum string length: 100

Response

Successful response.

success
enum<boolean>
required
Available options:
true
error
enum<boolean>
required
Available options:
false
statusCode
integer
required
Example:

200

message
string
required
Example:

"Success"

data
object
required
timestamp
string<date-time>
required