> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancelling a Run

> Cancel running agent, team, or workflow executions.

Run cancellation provides the ability to stop running agent, team, or workflow executions. This feature is useful for managing long-running operations, implementing timeouts, or allowing users to interrupt processes.

## How It Works

The `cancel_run()` function records cancellation intent for a run. Agent, team, and workflow runs stop when they reach the next cooperative cancellation checkpoint. An operation already in progress may finish, and cancellation does not roll back external side effects.

**Cancellation Behavior:**

* **Non-Streaming Runs**: The `RunOutput` object is returned with status set to `RunStatus.cancelled`.
* **Streaming Runs**: A `RunCancelledEvent` is emitted when cancellation occurs. Workflows emit a `WorkflowCancelledEvent`.

## Cancellation Methods

> **[Agent Run Cancellation](https://agno-v2.mintlify.site/run-cancellation/agent-cancel-run.md)**
>
> Cancel agent runs programmatically or via API endpoints.

> **[Team Run Cancellation](https://agno-v2.mintlify.site/run-cancellation/team-cancel-run.md)**
>
> Cancel team runs and handle member run cancellations.

> **[Workflow Run Cancellation](https://agno-v2.mintlify.site/run-cancellation/workflow-cancel-run.md)**
>
> Cancel workflow executions and manage step-level cancellation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.