

# Find and filter your most expensive agents and sessions

When you want to know what is driving your spend, you want to rank your agents and spot outlier sessions, so you can focus on the costliest work first.

## Read the fleet total and the cost-by-agent ranking
<a name="_read_the_fleet_total_and_the_cost_by_agent_ranking"></a>

 **To read the fleet total and ranking (console)** 

1. Open the cost view in Amazon Bedrock AgentCore Observability and choose a time range.

1. Read the **total estimated cost** for all your agents in that range.

1. Read the **Cost by agent** list to see which agents are most expensive. The list is ordered by cost, highest first.

## Spot outlier sessions
<a name="_spot_outlier_sessions"></a>

The **Cost** tab plots individual sessions over time in the **Session cost over time** chart, so unusually expensive ones stand out.

1. Look for points that sit apart from the rest; these are the outlier sessions.

1. Switch the **Cost view** toggle between **By session** and **By resource type** to see sessions or the components that drive the total. The **Overview**, **Sessions**, **Traces**, and **Spans** view tabs, and the graph tabs **Usage**, **Errors**, **Latency**, **Cost**, and **Tokens**, switch the rest of the page.

## Scope to one agent
<a name="_scope_to_one_agent"></a>

Use the **Agent** selector (and the **Endpoint** selector) to scope the view to a single agent and see only its total, its sessions, and its breakdown.

To narrow further, see [Scope and filter by tag or tenant](#acv-scope-and-filter-cost).

## Move from an outlier to its session
<a name="_move_from_an_outlier_to_its_session"></a>

In the **Sessions** view, sort by **Total cost** to surface outlier sessions, then choose a session to open its traces and drill into its spans. See [Investigate an agent session’s cost](acv-see-what-one-session-cost.md).

## Scope and filter by tag or tenant
<a name="acv-scope-and-filter-cost"></a>

When you own part of a fleet, you want to narrow the cost views to your tag or one tenant, so you see only the spend you are responsible for.

### Filter by resource tag
<a name="_filter_by_resource_tag"></a>

Filter by a resource tag, for example a team tag, to see only the agents that carry it. Choose **Add filter**, then use the **Filter by tag, tenant or user ID** field. An applied filter appears as a token, for example **Tag = environment:prod**; use **Remove filter** to drop one, or **Clear filters** to drop all. The Tag filter uses the tags on the agent’s **AgentCore Runtime** resource (the agent’s runtime).

**Note**  
The Tag filter is not available for an agent hosted outside AgentCore Runtime (a self-hosted agent), because it reads the tags on the AgentCore Runtime resource. See [Self-hosted compute](acv-self-hosted-compute.md).

### Scope by endpoint
<a name="_scope_by_endpoint"></a>

There is no agent-version filter. To narrow to one agent, use the **Agent** selector, then the **Endpoint** selector to choose one of its endpoints (for example, **DEFAULT**). The agent version is shown as an attribute but is not a filter and does not split an agent into separate rows on its own.

### Filter by a customer-defined tenant
<a name="_filter_by_a_customer_defined_tenant"></a>

Filter by a tenant value that your agent sets, to isolate the cost driven by one tenant. The tenant is a customer-defined attribute you pass when you invoke the agent; see [Pass the required session and agent attributes](acv-pass-required-attributes.md).

**Note**  
The per-tenant figure is an **estimate** calculated from public list prices, so it can differ from your AWS bill. The tenant value is whatever your agent passes when it is invoked.

### Filter by a user
<a name="_filter_by_a_user"></a>

Filter by the user a session ran for, to isolate the cost driven by one user. On AgentCore Runtime, the user value is set by AgentCore Runtime from the caller’s IAM principal or from incoming JWT claims (the role ARN that called `InvokeAgentRuntime`); you do not pass it, and `runtimeUserId` does not set it. For a self-hosted agent, you pass the user value yourself in baggage (`user.id`). See [Required session and agent attributes](acv-pass-required-attributes.md).

### These filters apply across all views
<a name="_these_filters_apply_across_all_views"></a>

Tag and tenant filters apply across all Observability views, not only the cost views, so you can narrow traces, latency, and quality to the same scope.