CreateExperimentRun
Executes an experiment.
Operation description
Calls CreateExperimentRun to initiate an experiment execution based on an existing experiment plan. For online experiments, you typically only need to pass experimentPlanId. For offline experiments, you need to pass offlineExperiments (1 to 5 items).
Try it now
Test
RAM authorization
Request syntax
POST /api/v1/experimentruns/{agentSpace}/execute HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| agentSpace |
string |
No |
The AgentSpace name. |
al-playground-cn-hongkong |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| clientToken |
string |
No |
Optional. |
a1b2c3d4-1234-5678-90ab-cdef12345678 |
| body |
object |
No |
The request body. |
{"experimentPlanId": "exp-plan-0242d983f5d340fd8479cf2c19eb279e"} |
| experimentPlanId |
string |
Yes |
The experiment plan ID. |
exp-plan-0242d983f5d340fd8479cf2c19eb279e |
| recordName |
string |
No |
The experiment record name. If not specified, the default value is the plan name plus a timestamp. |
arms_agent_experiment 2026/07/22 20:02:55 |
| status |
string |
No |
The initial status. If not specified, the default value is Valid values:
|
pending |
| totalTasks |
integer |
No |
The total number of tasks. For online experiments, if not specified, the value is calculated based on the number of generated tasks. |
40 |
| completedTasks |
integer |
No |
The number of completed tasks. If not specified, the default value is 0. |
0 |
| failedTasks |
integer |
No |
The number of failed tasks. If not specified, the default value is 0. |
0 |
| executedAt |
integer |
No |
The execution time, in millisecond-level UNIX timestamp. |
1784721775379 |
| completedAt |
integer |
No |
The completion time, in millisecond-level UNIX timestamp. |
1784721811392 |
| offlineExperiments |
array |
No |
The list of offline experiment configurations. Required when the plan type is offline. The number of items ranges from 1 to 5. |
[{"label": "experimentA", "name": "experimentA"}] |
|
OfflineExperimentConfig |
No |
A single offline experiment group, containing label, name, and an optional desc. |
Online experiment request example\n\n```json\n{
"experimentPlanId": "exp-plan-0242d983f5d340fd8479cf2c19eb279e"
}\n\n\n### Offline experiment request example\n\njson\n{
"experimentPlanId": "exp-plan-e95bff54685a4ae29ff3a834c1008a71",
"offlineExperiments": [
{
"label": "experimentA",
"name": "experimentA"
}
]
}\n```
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response for executing an experiment. |
||
| requestId |
string |
The request ID. |
019F89B5-1B07-3BB3-A32E-F5B007029E9C |
| recordId |
string |
The experiment record ID. For online experiments, the format is typically exp-run-{uuid32}. For offline experiments, the format may also be a standard UUID. |
exp-run-f6d419b0ed3d43a7b585948a55efc07b |
| status |
string |
The experiment record status. After creation, the status is typically pending. Valid values:
|
pending |
| message |
string |
The message. |
Experiment created, execution started. |
For a successful online experiment, message is "Experiment created, execution started". For a successful offline experiment, message is "Offline experiment record created. Update the execution progress by calling the UpdateExperimentRun operation".\n\n### Online experiment response example\n\njson\n{ "recordId": "exp-run-f6d419b0ed3d43a7b585948a55efc07b", "requestId": "019F89B5-1B07-3BB3-A32E-F5B007029E9C", "message": "Experiment created, execution started", "status": "pending" }\n\n\n### Offline experiment response example\n\njson\n{ "recordId": "a5397261-6e6d-4e45-bf52-feb8686f7524", "requestId": "019F89B5-1B07-3BB3-A32E-F5B007029E9C", "message": "Offline experiment record created. Update the execution progress by calling the UpdateExperimentRun operation", "status": "pending" }\n
Examples
Success response
JSON format
{
"requestId": "019F89B5-1B07-3BB3-A32E-F5B007029E9C",
"recordId": "exp-run-f6d419b0ed3d43a7b585948a55efc07b",
"status": "pending",
"message": "实验已创建,开始执行"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.