generated from amazon-archives/__template_Apache-2.0
-
Couldn't load subscription status.
- Fork 452
Open
Labels
area-asyncRelated to asynchronous flows or multi-threadingRelated to asynchronous flows or multi-threadingenhancementNew feature or requestNew feature or request
Description
Problem Statement
As we're refactoring and adding asyncio support, it'd be great to add support of a "CancellationToken" throughout the SDK. This allows for convenient support of features like adding a stop/cancel button to the AI app. Sample implementation in autogen can be found here.
Proposed Solution
- requirement for this feature is to have asyncio support.
- Add CancellationToken to the agent entrypoint and pass it throughout the sdk (sample reference).
- Link the futures to the token.
Use Case
- stop/cancel API for the AI app
- complex multi-agent systems where the orchestrator agent can decide to stop the child agents
Alternatives Solutions
No response
Additional Context
No response
Lou1415926 and efekarakus
Metadata
Metadata
Assignees
Labels
area-asyncRelated to asynchronous flows or multi-threadingRelated to asynchronous flows or multi-threadingenhancementNew feature or requestNew feature or request