AI Explainers Infrastructure

Agent ROI Optimization on Amazon Bedrock: Cost Per Task, Not Per Token

Agent ROI optimization on Amazon Bedrock starts by pricing whole tasks, not tokens: tokenizer efficiency, verbosity, agent loops and reasoning all change the bill.

Illustration of scales comparing token stacks with a completed task, representing agent ROI optimization on Amazon Bedrock
AI-generated editorial illustration.

Why can an AI model with a lower list price end up costing more to run? On Amazon Bedrock, the price per token is only one input to the bill, and judging agent ROI optimization by that number alone can point a team at the wrong model.

AWS makes this argument in a recent post on its machine learning blog. It is the second part of a series, and it picks up where an earlier cost-control playbook stopped. That first part covered who spent money and how to cap it. This one asks whether the spending was worthwhile.

What does cost per task mean?

Cost per task is the full price of one complete unit of work. AWS gives examples such as resolving one support email, extracting fields from one invoice, or answering one user question. A task runs from the request to a usable result, however many model calls that takes.

AWS contrasts this with price per token, which is the published rate for a single token. A bill reflects tasks completed, not tokens in isolation. AWS also notes that none of the factors below appear on the Bedrock pricing page, so they only show up when a team measures its own workload.

Which hidden costs change the real price?

AWS names four model characteristics that decide what a published rate actually costs on a given workload.

Tokenizer efficiency

A token is a small chunk of text a model reads or writes, and it is not the same as a word. Each model family splits text differently, so the same email or data file produces different token counts. AWS gives a scenario: if Model A lists 15 percent cheaper but needs 40 percent more tokens for your data, Model B costs less. AWS adds that many tokenizers split non-Latin scripts into two to three times more tokens than equivalent English.

Output alignment and verbosity

AWS says output tokens commonly cost three to five times more than input tokens, with the ratio varying by model family. A model that ignores an instruction like "return only raw JSON" and adds filler words charges you that premium rate for text nobody needs. A model that follows formatting rules closely generates fewer of those expensive tokens.

Agentic loop efficiency

An agent often works in a loop: it reads the request, decides to call an outside tool, waits for the result, then writes an answer. AWS explains that each turn re-sends the full conversation history and tool results as input. A model needing four turns therefore costs far more than one finishing in a single pass, because the payload grows each time.

Reasoning overhead

Some models can think through a problem before giving a visible answer, a feature Bedrock documents as extended thinking. Those reasoning tokens bill as output. AWS’s example: 2,000 tokens of thinking before a 200-token answer bills as 2,200. Some models hide the reasoning while still charging for it. AWS suggests starting with reasoning off and enabling it only when benchmarks show a quality gap worth the cost.

How does the worked example play out?

AWS walks through a workflow that reads a 750-word customer email, extracts details, calls an API to check account status, and returns strict JSON. It uses illustrative prices and warns readers to benchmark against their own data and current pricing.

  • Model A (lower list price): $0.50 per million input tokens and $1.50 per million output tokens. Its tokenizer turns the email into 1,500 tokens, its final answer runs 450 tokens, and it needs three turns because of error correction. Cumulative usage is 6,150 input and 750 output tokens, for a task cost of $0.0042.
  • Model B (higher list price): $1.00 and $3.00 per million tokens. It uses 1,000 input tokens, writes 150 output tokens, and finishes in one turn. The task cost is $0.00145.

Despite a list price twice as high, Model B comes out about 65 percent cheaper in AWS’s example. AWS attributes this to three compounding effects: a less efficient tokenizer, padded output, and extra correction turns that each re-send a growing history.

What about tasks that fail?

The example assumes both models eventually succeed, which AWS says will not hold in production. It offers two formulas. For workflows that retry until they succeed, cost per successful task equals cost per attempt divided by the success rate. For workflows that hand off on failure, it equals cost per attempt plus the failure share multiplied by the escalation cost.

AWS also notes that when prompt caching is active, input splits into three buckets: uncached input at the base rate, cache reads priced below the base rate, and cache writes priced above it. Prompt caching lets a model reuse repeated parts of a prompt instead of reprocessing them each time.

How do you measure this on your own work?

The AWS post points to Amazon Bedrock model evaluation as the managed way to test quality. Teams define criteria, upload their own prompt datasets, and receive scored results with automatic metrics and optional human review, without building custom infrastructure. AWS says quality scores do not produce a bill by themselves, and that three further Bedrock features supply the token and turn counts needed to price each candidate.

The summary of the full post also lists caching, routing, and output constraints as ways to lower cost per task, and a framework for proving agent ROI with human baselines and a five-dimension scorecard. The details of those sections were not part of the available excerpt, so this article does not describe them beyond what AWS states at the outset: baselines, controlled holdout experiments, and a scorecard tied to decisions.

Where does this sit among other cost approaches?

Part 1 of the AWS series covers attribution, logging, enforcement and a review cadence, which answer who spent the money and how to stop overspending. Cost per task belongs to a different category, closer to unit economics, where spend is divided by completed work. A familiar parallel is judging a delivery service by cost per parcel delivered rather than by fuel price per litre.

The AWS post is written for two groups: engineers who control the optimization levers, and product owners and finance partners who must justify agent spend to leadership. That split reflects a practical divide. One group tunes prompts, caching and model choice, while the other needs a defensible number tied to a business decision.

A concrete workflow: comparing two models for one task

Consider a team automating support-email triage. Using the approach AWS describes, it would first define the task as one email handled from arrival to a usable structured result. It would then run a sample of real emails through each candidate model and record input tokens, output tokens and turns per task. Applying each model’s actual prices to those counts gives a cost per attempt.

Next, the team would score output quality with model evaluation and divide cost per attempt by the success rate, or add the escalation cost for failures. Only then would it compare the two on cost per successful task. This follows the sequence AWS lays out, though the specific steps here are an illustration and not a procedure quoted from the post.

Limits to keep in mind

The $0.0042 and $0.00145 figures come from illustrative prices in a single AWS example, not from measured benchmarks. Real results depend on a team’s data, tool definitions and current rates. Token behavior varies by language and payload type, and a model that wins on one workflow can lose on another. Because this guide rests on one AWS source whose full text was not available here, claims about caching, routing and the scorecard should be checked against the original post before they shape a budget decision.

Sources