docs(bidi): migrate stop_conversation to strands_tools.stop and request_state#696
Open
agent-of-mkmeral wants to merge 1 commit intostrands-agents:mainfrom
Open
Conversation
…st_state Update all bidi streaming docs to reflect the new stop mechanism: - Replace stop_conversation imports with strands_tools.stop - Document request_state['stop_event_loop'] flag for custom stop tools - Add deprecation notices for legacy stop_conversation tool - Update 7 files: agent, events, quickstart, io, and 3 model pages Related: strands-agents/sdk-python#1954
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update all bidi streaming docs to reflect the new
request_state["stop_event_loop"]mechanism introduced in strands-agents/sdk-python#1954.Changes
request_state["stop_event_loop"]as the primary shutdown mechanism, withstop_conversationas deprecated fallback"user_request"close reason to referencestrands_tools.stopandrequest_statestrands_tools.stop, added custom tool example usingrequest_state["stop_event_loop"], added deprecation noticestop_conversation→strands_tools.stopin examplestop_conversation→strands_tools.stopin examplestop_conversation→strands_tools.stopin exampleMigration guidance added
The quickstart now shows three approaches:
from strands_tools import stop(drop-in replacement)@toolthat setsrequest_state["stop_event_loop"] = Truestop_conversationstill works but emitsDeprecationWarningRelated
request_state["stop_event_loop"]