Skip to content

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
agent-of-mkmeral:docs/bidi-stop-event-loop-deprecation
Open

docs(bidi): migrate stop_conversation to strands_tools.stop and request_state#696
agent-of-mkmeral wants to merge 1 commit intostrands-agents:mainfrom
agent-of-mkmeral:docs/bidi-stop-event-loop-deprecation

Conversation

@agent-of-mkmeral
Copy link

Summary

Update all bidi streaming docs to reflect the new request_state["stop_event_loop"] mechanism introduced in strands-agents/sdk-python#1954.

Changes

File What changed
agent.mdx Updated tool execution section to describe request_state["stop_event_loop"] as the primary shutdown mechanism, with stop_conversation as deprecated fallback
events.mdx Updated "user_request" close reason to reference strands_tools.stop and request_state
quickstart.mdx Rewrote "Graceful Shutdown" section: new primary example uses strands_tools.stop, added custom tool example using request_state["stop_event_loop"], added deprecation notice
nova_sonic.mdx stop_conversationstrands_tools.stop in example
gemini_live.mdx stop_conversationstrands_tools.stop in example
openai_realtime.mdx stop_conversationstrands_tools.stop in example
io.mdx Updated all 6 code examples: imports and tool usage

Migration guidance added

The quickstart now shows three approaches:

  1. Recommended: from strands_tools import stop (drop-in replacement)
  2. Custom: Any @tool that sets request_state["stop_event_loop"] = True
  3. Deprecated: stop_conversation still works but emits DeprecationWarning

Related

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant