Thursday, December 3, 2026 Edition No. 257
Search
Review Human-led, AI-assisted · Infrastructure · 21 min read

AgentCore Agent Cost Visibility: First Impressions from the Preview

By Fabio Douek

Human-led, AI-assisted. Research and implementation done with AI tools, led, tested and edited by me. How posts are labeled

Jump to section
Explain (TLDR) like I am...
What is this?

Imagine every toy robot in your room had a little price sticker that showed how many coins it used each time it played. You could see right away which robot was the hungry one, instead of waiting for the end of the month to find the piggy bank empty.

Now AWS sticks those price stickers onto the steps an AI helper takes. I tried it with two helpers: one cheap, one greedy. The greedy one's sticker showed it right away, and a little alarm rang when it spent too much, even before it had finished playing.

Consider this an internal reporting control for agent spend. AgentCore now attaches an estimated cost, at public list prices, to each recorded step of an agent's work, so spend can be attributed to an agent, a session and, across an organization, an account.

The control has limits worth recording. The figures are estimates, not invoices: no discounts or credits, some charges not covered, and compute arriving up to about 35 minutes late. It reports and alarms; it does not cap or block spend. The fleet view is preview and needs organization level setup.

The condition is invisible spend: an agent that rereads its whole conversation on every model call can cost about fifteen times more per session than its neighbour, and the bill only shows it weeks later. The new test reads an estimated cost on every span, within minutes.

In my trial the reading matched a hand calculation to the hundredth of a cent for model calls. Contraindications: it is an estimate at list price, compute results arrive 15 to 35 minutes late, and alerting needs a metric you switch on, plus a filter of your own in my setup.

Cost anxiety around agents is real: nobody wants to be the one whose experiment shows up as a surprise on the monthly bill. A per-session price tag turns a vague worry into a question a team can talk about calmly: which session, which agent, why.

That shift matters. In my test the expensive session stood out at the top of a sorted list, so the conversation moves from blame to a fix, like not rereading every report on every call. It is an estimate, so keep the bill as the final word.

Think of each agent session as a take in the studio. Until now you only learned what the session cost when the invoice arrived, like getting the studio bill a month after the gig. Now every take gets its price on the track sheet as you record.

My cheap helpdesk takes cost a fraction of a cent of model time; the long research take, which replayed the whole tape on every overdub, cost about twelve cents. You hear the expensive habit right away, and an alarm can tap you on the shoulder.

The pitch is simple: see what each AI agent costs, per conversation, in the console you already use, without building a pipeline. For a team running many agents, that turns cost from a monthly surprise into a number you can sort, chart and alarm on.

The fine print: it is a preview, it shows estimates at list price, and the cross-account fleet view needs an AWS Organizations setup. In my test it found the expensive sessions straight away, and an alarm fired before one had even finished.

Level 100 · How it works

Level 200 · Walkthrough

Level 100 · How it works

Overview

On December 1, 2026 AWS announced cost visibility for agents built on Amazon Bedrock AgentCore. There are two parts, both in preview, in US East (N. Virginia), US East (Ohio) and US West (Oregon):

  • AgentCore Observability shows an estimated cost for every span, trace, session and agent, split into model inference, Runtime compute, Memory, Gateway, Browser, Code Interpreter and online evaluations.
  • AWS Agent Registry adds a fleet view for agents on AgentCore Runtime: the same costs across every account of an AWS Organization, by agent, by account and by resource type, with the costliest sessions.

This level is an explainer. Level 200 runs it on two real agents. The question it answers: which agent, and which conversation, is spending the money? Until now the bill answered “Amazon Bedrock” and “AgentCore”, a month later.

Architecture

YOUR AGENT Agent on Runtime ADOT instrumented Model calls Memory, Gateway Browser, Code Interpreter each step becomes an OpenTelemetry span spans AGENTCORE PRICES THE SPAN Usage × public list price tokens, vCPU-hours, GB-hours, events aws.cost.total = 0.00101 aws.cost.currency = USD no discounts, credits or savings plans CloudWatch Logs agent log group and aws/spans WAYS TO READ IT AgentCore Observability cost per session, trace, span Cost tab, cost by agent Cost metrics and alarms opt in per agent, then CloudWatch alarms Agent Registry fleet view centralization rule copies spans from every member account Your own Logs Insights queries read the same spans.

How It Works

The price is written onto the span

An agent instrumented with the AWS Distro for OpenTelemetry (ADOT) already records a span for each model call, and AgentCore records spans for Runtime, Memory, Gateway and the tools. What is new is that AgentCore now adds an estimated cost to every span it can price, per Cost estimate coverage and limits and the attribute reference:

AttributeOn which spansExample
aws.cost.total, aws.cost.currencyevery priced span0.00101, USD
aws.cost.inference.token.input / .outputmodel calls6.2E-4, 3.9E-4
aws.agentcore.compute.vcpu_hours / .gb_hoursRuntime, Browser, Code Interpreterusage, with a .type naming the price-list entry
aws.agentcore.memory.*, aws.agentcore.gateway.*Memory and Gateway callsbytes, retrievals, invocations

The estimate is usage times the public AWS list price. How cost estimates are calculated says it applies no discounts, Savings Plans or credits and is not reconciled to the bill. Prices are refreshed about once an hour, and past figures stay as they were. A span that can’t be priced says unavailable, and the console shows a dash rather than $0. You don’t turn the stamping on: it happens once the prerequisites are in place.

Three timings

Model calls, Memory and Gateway are priced per call, so they appear within minutes. Runtime compute is measured for the session as a whole and, the docs say, “arrives about 15 to 35 minutes after the session ends”. Browser and Code Interpreter running time arrives on the same delay, per the cost metrics page. Until then a session shows only its model and per-call costs. Billed amounts, the ones in Cost Explorer, come later still.

Prerequisites

StepWho does it
ADOT in the agent, started with opentelemetry-instrumentThe AgentCore CLI’s Python templates ship it
CloudWatch Transaction Search, per account and Regionagentcore deploy turns it on
Tracing on the Runtime and on each Memory, Gateway, Browser, Code InterpreterYou, in the console or with CloudWatch Logs deliveries (the managed harness does it for you)
Cost metrics for alarms, per agent and RegionYou, in the console (off by default, CloudWatch charges apply)

Where you read it

  • AgentCore console > Observability, also on CloudWatch’s generative AI observability page: Total token cost, Total cost and Avg cost / session at the top, a Total cost column on Sessions and Traces, and a Cost tab with an estimated-cost chart (by session or by resource type) and Cost by agent.
  • Cost metrics: once switched on, the namespace AgentCore/CostGovernance gets EstimatedCostByAgent and EstimatedCostTotal, built by Logs metric filters at one-minute granularity, with no backfill. AgentCore creates no alarms; you set them in CloudWatch, anomaly detection included. You cannot alarm on a single session. In Level 200 the built-in filters missed the model calls, which new agents write to their own log group.
  • AWS Agent Registry > Observability tab, for an organization-scoped registry owned by the management account or a delegated administrator. A CloudWatch Logs centralization rule copies every member account’s spans (aws/spans, /aws/bedrock-agentcore/runtimes/*, /aws/bedrock-agentcore/evaluations/*) to the registry’s account. The tab runs Logs Insights queries there and joins the results to registry records by agent ARN, so it shows fleet totals, cost by resource type, by agent and by account, and the costliest sessions with their call trees. The rule copies only spans written after it exists.

What Cost Visibility Can’t Do

LimitWhat it means
It is an estimateList price only. Use Cost Explorer or the Cost and Usage Report for what you owe.
Not everything is pricedNo Runtime instance fee or data transfer, no Memory storage or Gateway tool indexing, no batch or on-demand evaluations, no Amazon Nova models. Non-Bedrock model providers show tokens but no cost. The fleet view also adds the cost of batch evaluation results, so its totals can differ from AgentCore Observability’s.
No capsIt shows and alarms. It does not stop an agent or block spend. For a hard stop on Bedrock, see the AI budgets in AWS AI Cost Governance.
Alarms are opt-inThe cost metrics are a console switch per agent and Region, with CloudWatch charges, and they only count spans after the switch.
The fleet view needs OrganizationsTrusted access for CloudWatch, a centralization rule, and an organization-scoped registry in the management or delegated admin account.
Reading costs moneyThe fleet tab’s Logs Insights queries are billed to the registry account. The feature itself has no stated fee; the spans, metrics and queries are CloudWatch pricing.
Preview, three RegionsFeatures and APIs may change before general availability.

Verdict

This is the piece that agent cost reporting has been missing on AWS. Before it, per-agent cost meant tagging IAM roles for Cost Explorer, or building your own metric filters on token counts and multiplying by the model price yourself, as AWS’s own per-agent cost guide still describes (its alarms are on tokens, not dollars). Now AgentCore does the multiplication for you, on every span, and the console sums it per session and per agent. Observability tools that price traces from token counts, like Langfuse or LangSmith, have shown model cost for a while; what AgentCore adds is pricing for its own services (Runtime compute, Memory, Gateway, tools) next to the model calls.

Treat it as an early-warning gauge, not a ledger: list prices, compute that arrives up to about 35 minutes late, and a few charges left out. The fleet view is the part to watch if you run agents in many accounts, but it needs the most setup. Level 200 shows what the numbers look like on two real agents.

Level 200 · Walkthrough

Overview

This walkthrough deploys two agents to AgentCore Runtime with the AgentCore CLI, then does every piece of configuration in the AWS console: tracing on each resource, the built-in cost metrics, a metric filter and a CloudWatch alarm. It runs cheap sessions and deliberately expensive ones, finds the expensive ones by cost in the console and with a Logs Insights query, compares the estimate with Cost Explorer, and cleans up. Level 100 explains what the cost figure is, its limits and where it comes from.

Everything ran on December 2, 2026 in us-west-2, in one member account of an AWS Organization. The model was Claude Haiku 4.5 through the global cross-Region profile, at $1 per million input tokens and $5 per million output tokens.

Setup

I used the AgentCore CLI 1.5.0 (npm package @aws/agentcore) to create, deploy and invoke the agents, and an administrator session in the AWS console for everything I configured. The template default model, Claude Sonnet 5.5, is not enabled in this account, so I switched both agents to global.anthropic.claude-haiku-4-5-20251001-v1:0. The AWS Agent Registry calls (ListRegistries) were denied in this account, so the fleet view stays at Level 100.

The Demo: Finding the Expensive Session

Step 1: Two agents

agentcore create --name costdemo --template agent-python-strands --region us-west-2
cd costdemo
agentcore add runtime --name helpdesk --language python

The template’s runtime became researcher; helpdesk got a copy of its code without tools or memory.

  • helpdesk answers shop questions in two sentences: one model call per question.
  • researcher has a tool, read_report(region), that returns about 7,100 tokens of quarterly sales data, plus the template’s AgentCore Memory. Asked to read all five regions one at a time, it re-sends the whole conversation on every model call.

The template already brings ADOT: aws-opentelemetry-distro is in pyproject.toml, and the deployed runtime starts with opentelemetry-instrument main.py.

agentcore deploy --region us-west-2

The deploy took about 7 and a half minutes (7 min 38 s), including the CDK bootstrap of the Region. Among its steps was “enabling CloudWatch Transaction Search”, already on in this account.

Step 2: Tracing, in the console

The deploy did not turn on tracing for the runtimes or the memory: aws logs describe-delivery-sources came back empty. In the AgentCore console, each resource’s page has Manage observability configuration; under Tracing I chose Edit, switched it on and saved. I did it for researcher, helpdesk and the memory. Behind the scenes the console creates a CloudWatch Logs delivery source, an X-Ray delivery destination and a delivery for each resource.

Step 3: Cost metrics, in the console

Observability > Trends and distribution > Manage lists each agent with its CloudWatch Metric status, “Not enabled” by default. I selected both agents and chose Enable. The switch created five CloudWatch Logs metric filters, all on the aws/spans log group: an “Own” and a “Callee” filter per agent, which publish EstimatedCostByAgent (dimensions AgentId and Currency), and one for EstimatedCostTotal, in the AgentCore/CostGovernance namespace.

Step 4: Cheap and expensive sessions

I ran 20 normal sessions (12 helpdesk questions, 8 researcher questions about one region), then the expensive ones. agentcore invoke streams Server-Sent Events, so a small jq filter prints the token usage of each model call:

text() { sed -n 's/^data: //p' | jq -rj '.event.contentBlockDelta.delta.text // (.event.metadata.usage | select(.) | "\n  [model call: \(.inputTokens) tokens in, \(.outputTokens) out]\n") // empty'; }
agentcore invoke --runtime helpdesk --session-id cheap-helpdesk-session-0001-$(uuidgen) \
  --payload '{"prompt": "Do you ship to Canada?"}' | text
agentcore invoke --runtime researcher --session-id expensive-research-session-01-$(uuidgen) \
  --payload '{"prompt": "Read the five regional reports one at a time: north, south, east, west, central. After each one, note its best store. Then rank the regions by total units sold, in five lines."}' | text
  [model call: 35 tokens in, 41 out]
  [model call: 674 tokens in, 72 out]
  [model call: 7785 tokens in, 88 out]
  [model call: 14912 tokens in, 88 out]
  [model call: 22039 tokens in, 125 out]
  [model call: 29203 tokens in, 88 out]
  [model call: 36330 tokens in, 272 out]

The helpdesk question: 35 tokens in, 41 out. The researcher: six model calls, 110,943 input tokens and 733 output tokens. At list price that is 110,943 × $1/M + 733 × $5/M = $0.1146. Two more sessions like it (02 and 03) followed.

Step 5: The span carries the price

A few minutes later the model-call spans were in the researcher’s own log group, /aws/bedrock-agentcore/runtimes/<runtime id>-DEFAULT, not in aws/spans (new agents write there by default). One of the 620-token calls:

"name": "chat global.anthropic.claude-haiku-4-5-20251001-v1:0",
"aws.cost.currency": "USD",
"aws.cost.total": 0.001015,
"gen_ai.usage.output_tokens": 79,
"aws.cost.inference.token.output": 0.000395,
"aws.cost.inference.token.input": 0.00062,
"gen_ai.usage.input_tokens": 620

That is exactly 620 × $1/M plus 79 × $5/M. The same span also carries the temporary access key id that signed the call (aws.auth.account.access_key), so don’t paste raw spans into a ticket without a look.

Step 6: The console

In the AgentCore console, Observability with All agents and Last 3 hours (so only this run counts), once all the compute had arrived, about 50 minutes after the last session:

FieldValue
Sessions26 (13 helpdesk, 13 researcher)
Total token cost$0.573239
Total cost$0.78953719
Avg cost / session$0.03036681
Cost by agentresearcher (13 sessions) $0.69, helpdesk (13 sessions) $0.10
Cost by resource typeInference $0.57, Runtime $0.20 (researcher $0.10, helpdesk $0.10), Resources $0.014
Sessions tab, sorted by Total costthe expensive sessions on top

The Cost - preview tab has the estimated-cost chart with a By session / By resource type switch, and the Cost by agent list. On the Sessions tab, a click on the Total cost header sorts the sessions, and a click on a session lists its traces with a cost on each.

Step 7: The surprise: the idle timeout

The helpdesk sessions were the surprise. Each one ended at about $0.007 to $0.009, although its model call cost about $0.0002. The rest was Runtime compute. Summing the AgentCore.Runtime spans per session showed why: every session, a short helpdesk answer or a long research session, was priced for about 15 minutes of compute (14.8 to 16.1 minutes between its first and last compute span), $0.0067 to $0.0090 each. That is the runtime’s idleRuntimeSessionTimeout of 900 seconds, the default the CLI deployed:

aws bedrock-agentcore-control get-agent-runtime --agent-runtime-id <helpdesk runtime id> --query lifecycleConfiguration
{ "idleRuntimeSessionTimeout": 900, "maxLifetime": 28800 }

For the helpdesk, compute is about 30 times its model cost; for the researcher’s expensive sessions it is noise next to the tokens. The pricing page says Runtime v2 reclaims idle memory after 120 seconds, and also that the session you pay for runs through idle periods “until session termination”; Investigate an agent session’s cost says the machine “is billed for its whole lifetime, not for each turn”. The estimate on my sessions kept pricing compute for the whole 15 minutes, so check yours before you assume otherwise. I saw the same pattern in an earlier run of this demo the same day.

The compute also arrived late and in pieces: two spans a minute (vCPU and memory), well after the session’s last request; the docs say 15 to 35 minutes after the session ends. Read a session’s total as final only well after it ended.

Step 8: What the cost metric counts

Before creating an alarm, I checked what the built-in metric would see. The five filters from Step 3 all sit on aws/spans. The Runtime and Memory spans land there, but the model-call spans of these agents land in each agent’s own log group:

priced model-call spans in spans: 0
priced model-call spans in costdemo_default_researcher-<id>-DEFAULT: 42

So EstimatedCostByAgent saw Runtime compute and Memory, and missed every model call, which here was most of the cost. The cost metrics page says this metric counts “the agent’s own spans (its model calls and Runtime compute)”; for these new agents, whose model-call spans go to their own log group by default, it did not. Before I added a filter of my own, the researcher’s metric held only a few cents of Runtime and Memory, while its three expensive sessions alone had cost $0.35 in model calls.

The docs describe where the spans go: with UNIFIED_TRACES_DESTINATION_ENABLED=false on the runtime, its new spans go to the shared aws/spans log group (span destination). That should put the model calls where the built-in filters are, but I didn’t try it; I added a filter instead.

Step 9: An alarm on agent spend, in the console

In the CloudWatch console, on the researcher’s log group, Actions > Create metric filter:

FieldValue
Filter pattern{ $.attributes.['aws.cost.total'] > 0 }
Filter nameagent-cost-model-calls
Metric namespace / nameAgentCore/CostGovernance / EstimatedCostByAgent
Metric value$.attributes.['aws.cost.total']
DimensionsAgentId = $.resource.attributes.['cloud.resource_id'], Currency = $.attributes.['aws.cost.currency']

The key has dots in it, so the filter needs the ['...'] form, the one AWS’s own filters use. With the same namespace, metric name and dimensions, the model calls land on the same series as the built-in metric.

Then Alarms > Create alarm > Select metric > AgentCore/CostGovernance > AgentId, Currency > the researcher’s endpoint. Statistic Sum, period 5 minutes, Greater than 0.05, the notification removed for this test (in real use, an SNS topic), name researcher-cost-over-5-cents, Create alarm.

One more expensive session followed (session 05, six model calls, 111,347 input tokens). The alarm went from OK to In alarm at 17:40:14, about seven seconds before that session even finished:

Threshold Crossed: 1 out of the last 1 datapoints [0.06515484026347029 (02/12/26 17:35:00)] was greater than the threshold (0.05)

The five-minute window held about 6.5 cents: a shorter session I had run just before (session 04, which read all five reports at once in two model calls, about 3.8 cents) and the first calls of session 05.

Step 10: The same answer from the CLI, and the bill

The console’s Sessions column is a sum over spans, so Logs Insights gives the same answer:

aws logs start-query --log-group-names $LG aws/spans --start-time $(date -v-3H +%s) --end-time $(date +%s) \
  --query-string 'stats sum(attributes.aws.cost.total) as usd by attributes.session.id | sort usd desc | limit 6'
expensive-research-session-02-...   0.126
expensive-research-session-01-...   0.1243
expensive-research-session-03-...   0.1243
expensive-research-session-05-...   0.1237
expensive-research-session-04-...   0.04706
normal-researcher-b7795a5f-...      0.01825

Across the whole run, the estimate was $0.57 of model inference, $0.20 of Runtime compute and $0.014 of Memory, $0.79 in all.

Cost Explorer, asked the same evening for the day’s charges grouped by service, had one matching line, “Claude Haiku 4.5 (Amazon Bedrock Edition)” at $0.066, against more than $1.10 of model calls in the span estimates across my two runs that day. That is the point of the estimate: it is there within minutes, while the bill catches up later.

Cleanup

I switched the cost metrics off in the console (Manage > select the agents > Disable), which deletes their filters on aws/spans, then:

agentcore remove all --yes && agentcore deploy --yes --region us-west-2   # runtimes, memory, IAM roles
aws cloudwatch delete-alarms --alarm-names researcher-cost-over-5-cents
aws logs delete-delivery --id <id>                       # the console's three deliveries
aws logs delete-delivery-source --name <name>            # and their sources
aws logs delete-delivery-destination --name <name>       # and destinations
aws logs delete-log-group --log-group-name /aws/bedrock-agentcore/runtimes/<runtime id>-DEFAULT   # both agents; my metric filter goes with it
aws s3 rb s3://cdk-hnb659fds-assets-<account>-us-west-2 --force   # only if the deploy created the bootstrap stack:
aws cloudformation delete-stack --stack-name CDKToolkit             # empty its staging bucket, then delete the stack

The runtime log groups and the console’s tracing deliveries stay after the runtimes are removed, until you delete them. Transaction Search was on before I started, so I left it on.

Verdict

It works, and it is the fastest way I have seen to answer “which session cost what” on AWS. Model-call costs matched list price to the hundredth of a cent, and the expensive sessions sat at the top of a sorted list within minutes. With one extra metric filter, an alarm on the same number fired before an expensive session had even finished.

It also showed me two things I would not have seen on the bill: each session was priced for the whole 15-minute idle timeout, so for a cheap agent the runtime, not the model, was most of the cost; and the built-in cost metric only reads aws/spans, which for these agents left out the model calls, though the docs say it counts them.

What to know before you rely on it:

  • Tracing is still a manual step: agentcore deploy turned on Transaction Search but not the per-resource tracing, a switch per resource in the console.
  • Check what the cost metric counts. For agents that write their spans to their own log group, add a filter there before you alarm on it.
  • Totals keep moving for half an hour or more after a session, because Runtime compute arrives late and in pieces.
  • Watch the idle timeout. Every session was priced for about 15 minutes of compute. For short conversations, a shorter idleRuntimeSessionTimeout or a stop-runtime-session call when the conversation ends is worth testing.
  • It’s an estimate. Cost Explorer showed only part of the day’s model spend that evening.
  • The fleet view needs the organization. In a member account without access to the registry, you get the per-account view only. The registry’s Observability tab appears only on an organization-scoped registry, not on the account-scoped registries added in December 2026.

Start with the console view on the agents you already run; the view has no stated fee of its own, and you pay CloudWatch for the spans behind it. Add the cost metrics, check where your spans land, and alarm on the agents whose sessions vary the most.

The my2cents.ai email

AI and cloud tools, tested for real. In your inbox once a week.

The week's hands-on tests and the launches that matter, in one email.

Free, one email a week, unsubscribe any time. We’ll send you a link to confirm. Your address is stored encrypted and never shared. Privacy

Comments