Cancel run
cancel_runRequest cancellation of a run that has not ended by run_id; it returns cancelling and later cancelled, while finished runs are refused.
Instructions
Request cancellation of a run that has not ended. Returns status "cancelling" at once; the run then ends with status "cancelled", which get_run_result reports. A run that has already ended is refused with 409 run already finished.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | The run to cancel. | |
| agent_id | No | The agent that runs the run (agent_id in the run result). Give this or workspace_id. | |
| workspace_id | No | The Workspace the run belongs to. Give this or agent_id; with both, agent_id is used. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | Yes | The run whose cancellation was requested. | |
| status | Yes | Cancellation request status. |