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

await platic.agents.evals.runs.cancel("agent_123", "launch_123");

Path parameters

ParameterTypeDescriptionRequired
agentIdstringAgent ID✓
launchIdstringThe launch you cancel✓

The request has no body.

Response

202: the cancellation was requested.

{
  "status": "success",
  "data": { "launchId": "lch_2c9f41", "status": "cancelling" }
}

Response fields

FieldDescription
launchIdThe launch.
statuscancelling: the cancellation is in progress.

Errors

Statusdetails.codeWhen
404AGENT_NOT_FOUNDThe agent does not exist or belongs to another workspace.
404EVAL_NOT_FOUNDThe launch does not exist or belongs to another agent.
409EVAL_CONFLICTThe 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.