View a markdown version of this page

Choose your setup path - Amazon Bedrock AgentCore

Choose your setup path

When you are about to set up, you want to find the scenario that matches how your agent runs, so you follow the right steps and know what you get.

AgentCore agent cost visibility works from the telemetry your agent already emits. Cost is attributed when that telemetry is produced by the AWS Distro for OpenTelemetry (ADOT). The more managed your agent, the less you do; the more control you take, the more you configure.

The four scenarios

Scenario Where the agent runs What you do What you get

Managed harness

AgentCore managed harness

Nothing

All in-path primitives attributed automatically

Strands on AgentCore Runtime

AgentCore Runtime

Instrument with ADOT (the default), and turn on tracing for the agent runtime and each AgentCore resource it uses

All in-path primitives

Third-party framework on AgentCore Runtime

AgentCore Runtime

Instrument with ADOT and turn on tracing for the agent runtime and each AgentCore resource it uses; add a provider package and one setting in some cases

All in-path primitives

Self-hosted compute

Amazon EKS, AWS Lambda, Amazon ECS or Amazon EC2, or another cloud

Turn on tracing for each AgentCore resource you call, send signed telemetry to AWS X-Ray, give the agent an identity, and pass attributes

Model cost and the AgentCore tools you call. No Runtime compute

Note

On AgentCore Runtime, plain OpenTelemetry (non-ADOT) also attributes cost when the agent emits the required model-call span and adds the AWS X-Ray trace format to its propagators. See the row for Strands or Third-party framework and the non-ADOT section in Self-hosted compute.

Find your scenario:

  • Do you use the AgentCore managed harness? → Managed harness.

  • Do you run a Strands agent on AgentCore Runtime? → Strands on AgentCore Runtime.

  • Do you run another framework (LangChain, LlamaIndex, CrewAI, or the OpenAI Agents SDK) on AgentCore Runtime? → Third-party frameworks on AgentCore Runtime.

  • Does your agent run somewhere other than AgentCore? → Self-hosted compute.

  • Did you build a custom agent without a framework? ADOT-based cost visibility is supported. The model cost is priced on the botocore Amazon Bedrock client span that ADOT creates for each Converse or InvokeModel call, so an agent that calls Amazon Bedrock through boto3 with no framework gets the same model cost as a framework agent. A model called another way (raw HTTP, or another provider’s SDK) needs its own model-call span. Follow the setup that matches where the agent runs (Runtime or self-hosted), and make sure each model call emits the required CLIENT span. See Pass the required session and agent attributes.

What is automatic versus what you configure

  • Managed harness and AgentCore Runtime create the session identity and the agent identity for you and propagate them. You instrument with ADOT; the managed harness even does that for you. On AgentCore Runtime you also turn on tracing for the agent runtime and each AgentCore resource it uses; on the managed harness that is automatic.

  • Self-hosted means you give the agent its identity, send telemetry to X-Ray yourself, and pass the identity values on each call.

For the exact values involved, see Pass the required session and agent attributes.

Which instrumentation is supported

Cost attribution depends on ADOT producing the telemetry, because ADOT is where the token counts and identity can be relied on.

Supported:

  • Strands Agents with ADOT.

  • LangChain, LlamaIndex, CrewAI, and the OpenAI Agents SDK with ADOT, either with ADOT’s built-in instrumentors or paired with a third-party instrumentation library (Traceloop/OpenLLMetry, OpenInference, or OpenLIT).

  • Custom agents (built without a framework) with ADOT.

Not supported:

  • Telemetry producers that do not emit the required model-call span in the form cost needs (for example, OpenInference’s session helpers on their own, or Langfuse). Plain OpenTelemetry (non-ADOT) is supported on AgentCore Runtime and on self-hosted compute through the documented non-ADOT path, when the agent emits the required model-call span.

  • Frameworks that ADOT does not instrument (for example, Google ADK, AutoGen, or Pydantic AI).

Note

Plain OpenTelemetry (non-ADOT) on AgentCore Runtime. An agent on AgentCore Runtime that is instrumented with plain OpenTelemetry instead of ADOT attributes cost when it emits the required model-call span, adds the AWS X-Ray trace format to its propagators (tracecontext,xray,baggage), and copies the identity values onto its own spans. AgentCore Runtime already supplies the agent identity and the session id, so you do not set those yourself. For the steps, see the non-ADOT section in Self-hosted compute, Strands agents on AgentCore Runtime, or Third-party frameworks on AgentCore Runtime.

Which cost dimensions each scenario covers

On the managed harness and on Runtime, every in-path primitive is covered (model, Runtime compute, Gateway, Memory, Browser, Code Interpreter, and online evaluations when in the path). Self-hosted covers the model calls and the AgentCore tools you call, but not Runtime compute, because Runtime is not in the path. See Cost estimate coverage and limits.

When cost starts

Work that ran before you set up cost shows blank, not a figure. Set up first, then the cost of later work appears.