BedrockAgentRuntime not returning Trace despite enableTrace(true) #5997
Unanswered
eskivelevolution
asked this question in
Q&A
Replies: 3 comments
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Previously, there was a misunderstanding—I thought only the final trace was being returned. In reality, each TracePart represents an individual step of the agent's trace. I modified the implementation to capture every TracePart (i.e., each step), and now I have the complete trace. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Hello,
I'm using the AWS Bedrock Java SDK (v2) to enable agent tracing by calling enableTrace(true) on InvokeAgentRequest. However, even with this flag set, I'm not receiving any trace information in the onTrace(...) callback of the InvokeAgentResponseHandler.Visitor. The trace data is simply never provided.
Steps to Reproduce
Expected Behavior
The onTrace(Trace trace) callback should be triggered at some point during the streaming, providing Trace/TracePart objects that detail the agent’s intermediate reasoning steps (e.g., calls, messages, etc.).
Is trace data delivered in multiple TracePart segments over time, or only as a single final TracePart? If the trace can arrive incrementally, what is the correct approach for handling repeated onTrace(...) calls to ensure that all parts of the trace are captured?
SDK version: 2.31.1
Java version: 17
Beta Was this translation helpful? Give feedback.
All reactions