Skip to main content
You can cancel a run by using the cancel_run function on the Team. Below is a basic example that starts an team run in a thread and cancels it from another thread, simulating how it can be done via an API. This is supported via AgentOS as well.
For a more complete example, see Cancel a run.