Skip to content
Discussion options

You must be logged in to vote

Hi @hshabbirh, apologies for taking this long to circle back, this one deserved an answer months ago.

There are two different "thinkings" here. Native reasoning (e.g. Bedrock with thinking enabled, Gemini thinking models) is kept separate by the SDK: in agent.stream_async() those deltas arrive as events with a reasoningText key, while normal answer text arrives under data. So in a chatbot you just render event["data"] and drop the rest. Note the default Agent also prints everything to stdout, so pass callback_handler=None if you're consuming the stream yourself. Docs: https://strandsagents.com/docs/user-guide/concepts/streaming/

The <thinking> tags you're seeing are the second kind: the m…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by yonib05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants