

# Turn on trace analysis

You turn on trace analysis for each Agent Context. Until you do, AWS Context doesn’t accept or analyze traces for it.

Before you start, create a trace analysis role, and make sure that you have the `iam:PassRole` permission for it (see [Trace analysis role](trace-analysis-role.md)).

**To turn on trace analysis**

1. Open the AWS Context console, and then open your Agent Context.

1. Choose the **Feedback analysis** tab.

1. Under **Trace analysis configurations**, choose **Edit**.

1. Turn on **Analyze agent traces**.

1. For **Trace access role**, choose your trace analysis role. The role is required. AWS Context assumes this role to evaluate the learnings that it extracts from your traces before it proposes them.

1. To make sure that AWS Context analyzes the traces of your `AgenticRetrieve` calls, select **Include AWS Context agent traces**. Other conditions also apply (see [AWS Context agent traces](feedback-trace-sources.md#feedback-agentic-traces)).

1. Choose **Save changes**.

For more information about what happens after you turn on trace analysis, see [How trace analysis works](feedback-how-it-works.md).