Cancel
Task and run cancellation mechanisms
Overview
The cancel module provides mechanisms to cancel running tasks and agent runs. It enables graceful cancellation and cleanup of in-progress operations.
Features
- Task Cancellation: Cancel individual tasks
- Run Cancellation: Cancel entire agent runs
- Graceful Shutdown: Gracefully shutdown operations
- Cleanup: Clean up resources after cancellation
Usage
Cancellation enables users and systems to stop agent operations when needed, ensuring resource efficiency and user control.
Integration
Cancel integrates with:
- Timeout: Works with timeout mechanisms
- Executor: Cancels executing tasks
- Orchestrator: Coordinates cancellation across agents