CreateEvaluator
Creates an evaluator.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
agentloop:CreateEvaluator |
create |
*Workspace
|
None | None |
Request syntax
POST /api/v1/evaluators/{agentSpace} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| agentSpace |
string |
Yes |
The AgentSpace name. |
prod-agentspace |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
{"name":"trace_task_completion","displayName":"Trace task completion","type":"AGENT","metricName":"agent_task_completion","version":"1.0.0"} |
| name |
string |
Yes |
The evaluator name. It cannot start with a system-reserved prefix and can be up to 128 characters in length. |
trace_task_completion |
| displayName |
string |
No |
The display name. It can be up to 128 characters in length. |
Trace task completion |
| type |
string |
Yes |
The evaluator type. Valid values:
|
AGENT |
| description |
string |
No |
The evaluator description. It can be up to 256 characters in length. |
Determines whether the agent completes the user task |
| metricName |
string |
Yes |
The evaluation metric name. |
agent_task_completion |
| version |
string |
Yes |
The initial version number. |
1.0.0 |
| versionDescription |
string |
No |
The version description. |
Initial version |
| config |
object |
No |
The evaluator configuration. LLM and AGENT evaluators typically include prompt, variables, and outputSchema. CODE evaluators typically include codeType, faasConfig, variables, and parameters. |
{"prompt":"Evaluate task completion","variables":[{"name":"input"}]} |
| annotations |
array |
No |
The list of annotation tags. |
["__en"] |
|
string |
No |
A single annotation tag. |
__en |
|
| properties |
object |
No |
The evaluator properties. |
{"agentEvaluatorMode":"raw_prompt"} |
| status |
string |
No |
The initial version status. Set this parameter to DRAFT to save the evaluator as a draft. If you omit this parameter, the initial version is directly published. |
DRAFT |
| skills |
array<object> |
No |
The list of business skills for the initial version of a standard agent evaluator. |
[{"skillName":"fact-check","files":[{"name":"SKILL.md","content":"---\nname: fact-check\ndescription: Verify the factual basis in the response\n---\nVerify the facts in the response item by item and list the evidence."}]}] |
|
array<object> |
No |
A business skill included in this version. |
{"skillName":"fact-check","files":[{"name":"SKILL.md","content":"---\nname: fact-check\ndescription: Verify the factual basis in the response\n---\nVerify the facts in the response item by item and list the evidence."}]} |
|
| skillName |
string |
No |
The skill name. It must be unique in the submitted skill list. |
fact-check |
| displayName |
string |
No |
The display name of the skill. |
Fact check |
| description |
string |
No |
The description of the skill purpose. |
Verify the factual basis in the response |
| enable |
boolean |
No |
Specifies whether to enable the skill. Default value: true. |
true |
| files |
array<object> |
No |
The complete list of files for the skill. The list must include SKILL.md in the root directory. |
[{"name":"SKILL.md","content":"---\nname: fact-check\ndescription: Verify the factual basis in the response\n---\nVerify the facts in the response item by item and list the evidence."}] |
|
object |
No |
A file in the skill. |
{"name":"SKILL.md","content":"---\nname: fact-check\ndescription: Verify the factual basis in the response\n---\nVerify the facts in the response item by item and list the evidence."} |
|
| name |
string |
No |
The path of the file relative to the skill root directory. |
SKILL.md |
| content |
string |
No |
The text content of the file. |
--- name: fact-check description: Verify the factual basis in the response --- Verify the facts in the response item by item and list the evidence |
| clientToken |
string |
No |
The idempotency token. CloudSpec declares this query parameter, but the backend does not perform idempotency checks. |
a1b2c3d4-1234-5678-90ab-cdef12345678 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
The request ID. |
3FE4CD1E-FF41-56BE-B590-7A021D9C1524 |
| name |
string |
The evaluator name. |
trace_task_completion |
| version |
string |
The created version number. |
1.0.0 |
Examples
Success response
JSON format
{
"requestId": "3FE4CD1E-FF41-56BE-B590-7A021D9C1524",
"name": "trace_task_completion",
"version": "1.0.0"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.