View the trace
The following describes how to view the trace. Choose the tab for your preferred method, and then follow the steps:
- Console
-
To view the trace during a conversation with an agent
Sign in to the AWS Management Console with an IAM identity that has permissions to use the Amazon Bedrock console. Then, open the Amazon Bedrock console at https://console.aws.amazon.com/bedrock
. -
In the Agents section, select the link for the agent that you want to test from the list of agents.
-
The Test window appears in a pane on the right.
-
Enter a message and choose Run. While the response is generating or after it finishes generating, select Show trace.
-
You can view the trace for each Step in real-time as your agent performs orchestration.
-
- API
-
To view the trace, send an InvokeAgent request with a Agents for Amazon Bedrock runtime endpoint and set the
enableTracefield toTRUE. By default, the trace is disabled. or example code, see Invoke an agent from your application.If you enable the trace, in the InvokeAgent response, each
chunkin the stream is accompanied by atracefield that maps to a TracePart object. Within the TracePart is atracefield that maps to a Trace object.