Cancel run
cancel_runStop an in-flight agent run asynchronously, returning 'cancelling' status; poll get_run_result until it shows 'cancelled'.
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. |