

# Agent view
<a name="agent-view"></a>

The *Agent view* provides a curated dashboard for your account's agents. You can view data from agents hosted on AWS native services like AgentCore Runtime, Lambda, or Amazon EC2. The view also displays agents that emit telemetry to CloudWatch.

**Overview**

The metrics and dashboards show data from sampled agent spans. For information about agent spans, see [Spans](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability-telemetry.html#agent_spans).

The following Agent metrics are supported:
+ Agents/Endpoints – Number of agents and aliases instrumented and emitting spans
+ Sessions – Number of sessions created by instrumented agents emitting spans. A session is similar to a conversation and contains the broad context
+ Traces – Number of traces created by instrumented agents emitting spans. A trace is a individual request-response cycle within a session
+ Error rate – Percentage of errors in agent interactions
+ Throttle rate – Percentage of throttled agent interactions

Choose **View details** to see the Agent metrics in graphs.

![\[Agents view\]](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/images/GenAI_AgentCoreGraphs.png)


**Runtime metrics**

The Runtime metrics and dashboards display data from the Runtime primitive. Using this primitive, you can host your agents on the Amazon Bedrock AgentCore runtime. For more information, see [Creating an AgentCore Runtime ](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agents-runtime-create.html).

AgentCore Runtime supports these metrics
+ Runtime Agents/Aliases – Tracks number of agents and aliases hosted on AgentCore Runtime
+ Runtime sessions – Tracks number of sessions created by agents running in AgentCore Runtime. A session is similar to a conversation and contains the broad context of the entire interaction flow. Useful for monitoring overall platform usage, capacity planning, and understanding user engagement patterns
+ Runtime invocations – Total number of requests made to the Data Plane API. Each API call counts as one invocation, regardless of the request payload size or response status
+ Runtime errors – The number of system and user errors. For system and user error definitions, see [AgentCore provided runtime metrics](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability-runtime-metrics.html)
+ Runtime throttles – The number of requests throttled by the service due to exceeding allowed TPS (Transactions Per Second). These requests return ThrottlingException with HTTP status code 429. Monitor this metric to determine if you need to review your service quotas or optimize request patterns

View metric changes over time in the default dashboard. Expand **View details** to display metric graphs.

![\[Runtime view\]](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/images/GenAI_Runtime.png)


**Agents**

Agents are components that collect and send monitoring data from your applications. The Agents table displays all agents configured in your account. These agents can be hosted on AWS native services like AgentCore Runtime, Lambda, or Amazon EC2. The table also displays other agents that are instrumented to emit telemetry to CloudWatch.

You can use **Filter agents** to find a specific agent that you want to deep dive or you can also use the column names to sort the agents to find the required agent. Select the gear icon to show or hide additional columns.

![\[Runtime agents view\]](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/images/GenAI_agents.png)


You can view the details of the Agent by expanding the agent name.

![\[Runtime agents overview\]](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/images/GenAI_agentsdetails_new.png)


**Agent details- Overview**

The Overview tab displays automatic dashboards for your agent metrics. These metrics come from sampled spans and Runtime metrics (when the agent uses AgentCore Runtime).

The **Evaluators** dashboard includes insights derived from spans with evaluations enabled.
+ Top deltas in evaluator scores — Shows the agent evaluators that experienced the most change since the last period based on the time period you selected.
+ Evaluation configuration metrics — Show the operational status metrics for the agent evaluators, including the number of times the evaluations were executed and the number of errors encountered.

To edit an evaluation configuration using the Amazon Bedrock AgentCore console, click the link in the **Evaluator** or **Evaluation configuration** column. To review the evaluator results, click a score in the **Avg. score** column. To view all evaluations for the agent, choose the **Evaluations** tab. For more information, see [Agent details - Evaluations](session-traces-evaluations.md).

The **Agent metrics** dashboard include metrics which are derived from sampled spans:
+ Sessions and Traces – Count of sessions and traces for this agent
+ FM token usage – Total count of Foundational Model token consumption. You can filter the chart into a particular Foundational Model
+ System and client errors – Count of system errors during request processing. High levels of server-side errors can indicate potential infrastructure or service issues that require investigation. Client errors are errors resulting from invalid requests. High levels of client-side errors can indicate issues with request formatting or permissions
+ Errors and latency by span – The error rates and latency by a particular span. Note that a span can appear in many agents
+ Throttles – Number of requests throttled by the service due to exceeding allowed TPS (Transactions Per Second)
+ Inbound Auth:Authorization and access token calls – Number of incoming authentication requests processed by the agent, including authorization checks and access token validations from external clients or services
+ Outbound Auth:Usage distribution – Distribution pattern of outbound authentication methods used by the agent, showing the frequency and types of authentication mechanisms employed when accessing external services

The **Runtime metrics** dashboard includes metrics that AgentCore Runtime automatically generates:
+ Runtime sessions and invocations – Count of sessions and invocations that this particular agent has generated while being hosted on Runtime
+ Runtime latency – Latency of requests by agents hosted on Runtime
+ Runtime throttles – Number of requests throttle by the service due to exceeding allowed TPS (Transactions Per Second)

# Agent details - Sessions
<a name="session-sessions-view"></a>

An Agent can have several Sessions. View session in the *Sessions* tab. Use the **Filter sessions** or sort the columns to find the required session.

Choose the **Session ID** to view the session summary metrics and the list of traces belonging to that session. Session metrics include:
+ Traces – Number of traces belonging to the sessions
+ Server errors – Count of system errors during request processing. High levels of server-side errors can indicate potential infrastructure or service issues that require investigation
+ Client errors – Client errors are errors resulting from invalid requests. High levels of client-side errors can indicate issues with request formatting or permissions
+ Throttles – Number of requests throttled relevant to this session due to exceeding allowed TPS (Transactions Per Second)
+ Sessions details – Meta data about the session such as start time, end time, and session ID

To analyze a list of Traces in a session, choose **Filter traces** to narrow down or sort the table columns to bubble up the particular Trace you want to investigate.

After you select a Trace, the right-pane displays the details of the Trace. For each Trace, you can see the Trace summary, Spans, and Trace content details.

Under **Trace summary**, you can view the following metrics:

**Note**  
Summary page fields are consistent across **Agent view**, **Sessions view**, and **Traces view**.
+ Spans – Number of spans within a Trace
+ Server errors – Count of system errors during request processing. High levels of server-side errors can indicate potential infrastructure or service issues that require investigation
+ Client errors – Client errors are errors resulting from invalid requests. High levels of client-side errors can indicate issues with request formatting or permissions
+ Throttles – Number of requests throttle relevant to this session due to exceeding allowed TPS (Transactions Per Second)
+ P95 span latency – The 95-percentile latency of across all invocation of this particular span. Note that a span can be used across many agents
+ Trace details – Meta data about the trace such as start time, end time, and Trace ID

![\[Span view\]](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/images/GenAI_span.png)


Choose **Timeline** to view the duration of each span and to understand the span that took the longest and contributed to a slow response.

![\[Trajectory view\]](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/images/GenAI_agenttrajectory.png)


To analyze span relationships and subsequent calls choose **Trajectory** to understand the interconnected relationship of the spans and subsequent calls from these spans.

Under **Spans**, select an individual span event to review the span data in its original form. Review the span data in its original form. For granular troubleshooting, select the **Events** tab to examine model inputs and outputs.

# Agent details - Traces
<a name="session-traces-view"></a>

Each agent might have multiple traces. View trace details in the **Traces** tab. Choose **Filter traces** or sort the columns to find the required Trace.

![\[Trace summary view\]](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/images/Trace-summary.png)


# Agent details - Evaluations
<a name="session-traces-evaluations"></a>

Evaluations provides continuous quality monitoring metrics for your AI agents. You can use the information provided by the dashboard to assess the performance, quality, and reliability of your AI agents. 

Instead of relying on simulated test cases, evaluations capture real user sessions and agent interactions, providing a comprehensive view of agent performance, from input to final output. With agent evaluations, you can define sampling rules to evaluate only a percentage of the sessions or traces, and then apply a variety of evaluators to asses and score an AI agent's operational performance. The resulting assessments and scores are displayed in the Evaluations dashboard, allowing you to monitor trends, identify potential quality issues, set alarms, and investigate and diagnose potential issues.

The Evaluations dashboard lists all of the evaluations that have been enabled and configured for the selected agent. For more information about configuring evaluations for an agent, see [ AgentCore evaluations](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/evaluations.html). You can expand each evaluation to view the sessions, traces, and spans that were evaluated. 

![\[Evaluations\]](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/images/evals_overview.png)


**Topics**
+ [

## Evaluations details
](#session-traces-evaluations-details)
+ [

## Evaluations graphs
](#session-traces-evaluations-graphs)
+ [

## Work with evaluation results
](#session-traces-evaluations-raw-results)

## Evaluations details
<a name="session-traces-evaluations-details"></a>

For each evaluation, the dashboard includes the following sections:

------
#### [ Evaluation configuration metrics ]

Provides metrics for the overall evaluation configuration. An evaluator defines how to assess a specific aspect of an AI agent's performance. To view more details about an evaluator, choose its name in the **Evaluator** column. To view a bar chart and analyze trends for an evaluator, choose the value in the **Count** column.

![\[Evaluation configuration metrics\]](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/images/evals_01.png)


------
#### [ Session evaluations ]

Provides evaluation results for evaluators at the session level. A session represents a logical grouping of related interactions from a single user or workflow. A session can contain one or more traces. You can choose a session to filter down to the list of traces within that session in the **Trace evaluations** section.

![\[Session evaluations\]](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/images/evals_02.png)


------
#### [ Trace evaluations ]

Provides evaluation results for evaluators at the trace level. A trace is a complete record of a single agent execution or request. A trace can contain one or more spans. Choose a trace to view the trace details along with all the evaluators that were run on that trace.

![\[Trace evaluations\]](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/images/evals_03.png)


------
#### [ Span evaluations ]

Provides evaluation results for evaluators at the span level. A span represents the individual operations performed during that execution. Choose a span to view the span details along with all the operations performed during that span.

![\[Span evaluations\]](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/images/evals_04.png)


------

## Evaluations graphs
<a name="session-traces-evaluations-graphs"></a>

The Evaluations dashboard also includes a bar graph for each evaluator. The graphs show the trends for each evaluator over time, and enable you to set alarms for specific metric values. To set an alarm, click a bar in the graph, and then choose **Alarm** (bell) icon. For more information, see [Using Amazon CloudWatch alarms](CloudWatch_Alarms.md).

![\[Evaluations graphs\]](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/images/evals_graphs.png)


## Work with evaluation results
<a name="session-traces-evaluations-raw-results"></a>

If you need direct access to your evaluation results data, or if you want to create custom visualizations or work outside the AgentCore Evaluations console, you can access your evaluation results directly through CloudWatch Logs, CloudWatch Metrics, and CloudWatch dashboards.

**Topics**
+ [

### Accessing evaluation results in CloudWatch Logs
](#accessing-evaluation-results-logs)
+ [

### Accessing evaluation metrics in CloudWatch Metrics
](#accessing-evaluation-metrics)
+ [

### Creating Custom Dashboards
](#creating-custom-dashboards)
+ [

### Setting alarms on evaluation metrics
](#setting-alarms-evaluation-metrics)
+ [

### Additional Resources
](#additional-resources)

### Accessing evaluation results in CloudWatch Logs
<a name="accessing-evaluation-results-logs"></a>

Your evaluation results are automatically published to CloudWatch Logs in Embedded Metric Format (EMF).

**To find your evaluation results log group**

1. Open the CloudWatch console.

1. In the navigation pane, choose **Logs Management** > **Log groups**.

1. Search for or navigate to the log groups with prefix: `/aws/bedrock-agentcore/evaluations/`.

1. Within this log group, the log events contain the evaluation results.

For more information about working with log groups and querying log data, see [Working with Log Groups and Log Streams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html) and [Analyzing Log Data with CloudWatch Logs Insights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html).

### Accessing evaluation metrics in CloudWatch Metrics
<a name="accessing-evaluation-metrics"></a>

Evaluation results metrics are automatically extracted from the Embedded Metric Format (EMF) logs and published to CloudWatch Metrics.

**To find your evaluation metrics**

1. Open the CloudWatch console.

1. In the navigation pane, choose **Metrics** > **All metrics**.

1. Select the **Bedrock AgentCore/Evaluations** namespace.

1. Browse available metrics by dimensions.

For more information about viewing and working with metrics, see [ Using CloudWatch Metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html) and [Graphing Metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph_metrics.html).

### Creating Custom Dashboards
<a name="creating-custom-dashboards"></a>

You can create custom dashboards to visualize your evaluation metrics alongside other operational metrics.

**To create a dashboard with evaluation metrics**

1. In the CloudWatch console, choose **Dashboards** from the navigation pane.

1. Choose **Create dashboard**.

1. Add widgets and select metrics from the **Bedrock AgentCore/Evaluations** namespace.

1. Customize the time range, statistic, and visualization type for your needs.

For detailed instructions, see [ Creating and Working with Custom Dashboards](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/create_dashboard.html) and [ Using CloudWatch Dashboards](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html).

### Setting alarms on evaluation metrics
<a name="setting-alarms-evaluation-metrics"></a>

You can set alarms to notify you when evaluation metrics cross specified thresholds that you have specified, such as when correctness drops below acceptable levels.

**To create an alarm on evaluation metrics**

1. In the CloudWatch console, choose **Alarms** > **All alarms**.

1. Choose **Create alarm**.

1. Choose **Select metric** and navigate to the **Bedrock AgentCore/Evaluations** namespace.

1. Select the metric you want to monitor.

1. Configure the threshold conditions (dynamic anomaly detection threshold available where you don't need to specified a static number threshold) and notification actions.

For detailed instructions, see [Using CloudWatch Alarms](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Alarms.html) and [Creating a CloudWatch Alarm Based on a Static Threshold](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ConsoleAlarms.html).

### Additional Resources
<a name="additional-resources"></a>
+ [CloudWatch Embedded Metric Format](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Monitoring-CloudWatch-Metrics.html)
+ [CloudWatch Logs Insights Query Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html)
+ [Creating Composite Alarms](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Composite_Alarm.html)