Cancel a launch
SDK platic.agents.evals.runs.cancel()
Stop the tests in a launch by sending its launchId. Pending trials do not start; running trials finish their turn. Completed results are preserved and cancelled trials do not count in the result.
Example
curl -X POST "https://api.platic.ai/v1/agents/$AGENT_ID/evals/runs/$LAUNCH_ID/cancel" \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.agents.evals.runs.cancel("agent_123", "launch_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Agent ID | ✓ |
launchId | string | The launch you cancel | ✓ |
The request has no body.
Response
202: the cancellation was requested.
{
"status": "success",
"data": { "launchId": "lch_2c9f41", "status": "cancelling" }
} Response fields
| Field | Description |
|---|---|
launchId | The launch. |
status | cancelling: the cancellation is in progress. |
Errors
| Status | details.code | When |
|---|---|---|
404 | AGENT_NOT_FOUND | The agent does not exist or belongs to another workspace. |
404 | EVAL_NOT_FOUND | The launch does not exist or belongs to another agent. |
409 | EVAL_CONFLICT | The launch already finished (completed or cancelled): there is nothing to cancel. details.status says how it ended. |
Notes
- You see the final state when you get the launch.
- It requires permission to edit the agent.