Cancel run
cancel_runStops an in-flight agent run asynchronously: returns 'cancelling', then poll get_run_result until run is 'cancelled'. Cannot stop finished runs.
Instructions
Stop an in-flight agent run. Cancellation is asynchronous: a successful call returns status "cancelling"; poll get_run_result until the run becomes "cancelled". A run that already finished cannot be cancelled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | The run id returned by invoke_agent. | |
| agent_id | Yes | The agent's UUID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | Yes | The run whose cancellation was requested. | |
| status | Yes | Cancellation request status. |