AIsaAIsaStudio English 打开 AIsa Studio

Amazon Bedrock 上按任务优化 agent 成本并证明 ROI 的实践指南

原标题:Optimizing cost per task and proving agent ROI on Amazon Bedrock

AWS Machine Learning 博客发布 Amazon Bedrock agent 成本优化与 ROI 度量指南,指出应以“每任务成本”而非每 token 价格衡量开支,并拆解定价页看不到的四个隐藏成本驱动:tokenizer 效率、输出对齐与冗长、agent 循环效率和推理开销。文中给出提示词缓存、智能路由、输出约束和批量推理四类降本杠杆,并提供一套以人类基线、holdout 对照实验、成本与结果关联和五维记分卡(采用、质量、效率、成本、业务影响,含绿黄红阈值)为核心的 agent ROI 证明框架,附示例对比(标价高一倍但每任务成本低约 65%)和 Athena 查询示例。

为什么值得看

原文给出四个隐藏成本驱动、降本杠杆和一套以人为基线的 agent ROI 度量方法,可迁移到自己的工作流评估。

阅读原文 ↗11月13日 AI 日报

本页的摘要、推荐理由与解读出自 AIsa Studio 的 AI 风向智能体,原文版权归原作者所有。

深度解读

发生了什么

AWS Machine Learning 发布了 Amazon Bedrock agent 成本管理系列文章的第二篇。第一篇构建了控制支出的运营模型:用 IAM 主体标签和 Cost and Usage Report 2.0 做归因、用模型调用日志做可观测性、三层执行策略和评审节奏。第二篇回答第一篇刻意留下的问题:这个工作流为什么贵?agent 是否比原来的人类做得更好?

文章主张用「每次任务成本」而非「每 token 成本」思考定价,并通过人类基线、对照实验和与决策挂钩的记分卡来证明 agent 的 ROI。

关键细节

  • 四个定价页上看不到的隐性成本驱动因素:分词器效率(同一文本在不同模型上切分结果不同,非拉丁文字可能切出相当于英文 2–3 倍的 token)、输出冗长(输出 token 通常比输入贵 3–5 倍)、agentic 循环效率(工具调用的每一轮都把完整对话历史作为输入重新发送)、推理开销(推理 token 按输出计费,有些模型对推理内容脱敏但仍然收费)。
  • 一个算例显示:列表价只有对方一半的 Model A,单任务成本反而比 Model B 高出 65%,原因是分词碎片化、JSON 输出填充词,以及两次需要重发不断增长的历史的错误纠正轮次。
  • 成本公式计入失败:重试到成功的场景下,每次成功任务成本 = 单次尝试成本 / 成功率;失败升级的场景需加上升级成本。启用提示词缓存后,输入分为未缓存、缓存读取、缓存写入三类,各自计费费率不同。
  • 降本杠杆:提示词缓存(agentic 路径上最大的收益)、智能提示词路由、用工具 schema 加 maxTokens 上限约束输出、默认关闭扩展思考直到基准测试证明值得,以及批处理推理(费率减半但不支持工具调用和多轮对话)。
  • ROI 部分:先文档化人类流程,在 agent 上线前测量基线(事后回忆的基线「系统性偏向有利于 agent」);每次运行记录 trace ID、实验块、humanMinutes 和 revenueEventId。文章指出「Cost per call 会美化会循环的 agent。Cost per success 不会。」
  • 对比应采用 A/B 或 holdout 测试,覆盖效率、质量、成本、业务价值四个维度。五维记分卡(采用率、质量、效率、成本、业务影响)中绿=扩展、黄=调优、红=退役或重新设计。

为什么重要

标价是实际支出的误导性代理。算例表明,多跑几轮或输出冗长的模型可能远贵于单价更高但一轮完成的模型。该框架——把重试、缓存读写和升级成本计入整个任务——让团队在生成上花钱之前就能低成本地评测候选模型(例如用 CountTokens,无需实际推理即可返回输入 token 数)。

ROI 部分回答预算层面的核心问题:agent 是否优于人类基线。把调用日志(按 run 计价)与工作流运行记录连接,可得到每次成功结果的成本、每次成功的重试次数、每次成功的人工分钟数——文章称这些数字能「经受住怀疑的 CFO 的审视」。愿意真正退役一个红色 agent,正是记分卡可信的原因。

对谁有影响

文章面向两类读者:掌握优化杠杆的应用和平台工程师(缓存、路由、输出约束、批处理推理),以及需要向管理层证明 agent 支出合理性的产品负责人和 FinOps 合作伙伴。在 Bedrock 上运行 agentic 工作流的团队——尤其是涉及工具调用、推理模型或与收入挂钩用例的团队——收益最直接,因为隐性驱动因素在多轮路径上复合得最严重。

全文翻译

以下翻译只覆盖原文的前一部分,其余内容请看下方原文。

本系列的第一部分构建了控制 Amazon Bedrock 支出的运营模型:通过 AWS Identity and Access Management (IAM) 主体标签和成本与使用报告 2.0 进行归属分析,通过模型调用日志实现可观测性,实施三层级的强制执行机制,并设定定期审查节奏。这一层回答了“谁花了钱”以及“你可以阻止他们”的问题。但它无法告诉你这些支出是否物有所值。

本文旨在回答第一部分刻意留白的两个问题。首先:为什么这个工作流成本高昂?答案在于要以“每项任务的成本”而非“每个 token 的成本”来思考。其次:智能体(Agent)是否比人类做得更好?答案需要基线数据、受控实验以及与决策挂钩的评分卡。

在本文中,你将学习一个计算真实模型成本的框架(包括定价页面上未显示的四个隐藏成本驱动因素),通过缓存、路由和输出约束降低每项任务成本的技术,以及通过人类基线、保留组实验和五维评分卡来衡量智能体投资回报率(ROI)的纪律。本文面向两类受众:负责优化杠杆的应用程序和平台工程师,以及需要向管理层证明智能体支出合理性的产品负责人和 FinOps 合作伙伴。

每项任务的成本,而非每个 token 的成本

按 token 计价便于快速比较,但并不能反映你实际支付的金额。公布的费率反映的是单个 token 的成本。你的账单反映的是完成一项任务的成本。一项任务是你要求模型执行的完整工作单位:解决一封支持邮件、从一张发票中提取字段或回答一个用户问题。一项任务从请求开始到产生可用结果为止,无论它涉及多少次模型调用。

低价模型未必是运行成本更低的模型。较便宜的模型可能会将文本拆分为更多的 token,用填充词使响应变长,误读你的工具模式并进行循环修正,或者在回答问题之前消耗数千个推理 token。这些成本都不会出现在 Bedrock 定价页面上。

四个隐藏的成本驱动因素

四个模型特性决定了公布的费率在你的工作负载中实际花费多少。

分词器效率

token 不是单词,且在不同模型之间并不等价。每个模型家族都使用不同的分词器和词汇表。相同的文本、代码或 JSON 有效载荷会被分割成不同数量的 token。如果模型 A 的列表价格低 15%,但其分词器对你的数据需要多 40% 的 token(这在结构化模式和数值数组中很常见),那么模型 B 反而更便宜。对于非英语文本,差距会更大:许多分词器会将非拉丁脚本拆分为相当于英文两到三倍的 token 数量。

输出对齐与冗长度

输出 token 的成本通常是输入 token 的 3–5 倍(比率因模型家族而异。请参阅 Bedrock 定价页面)。如果一个模型忽略了诸如“仅返回原始 JSON”之类的格式约束,你就必须为那些填充词支付高昂的输出溢价。如果一个模型紧密遵循格式指令,通过生成更少的高价输出 token 来节省成本。

智能体循环效率

智能体工作流完全改变了成本数学。工具使用(函数调用) 允许模型调用外部函数,这需要多轮循环:分析提示,决定调用工具,等待观察结果,生成答案。每一轮都会重新发送完整的对话历史和工具结果作为输入 token。一个需要四轮(每一轮都重新发送更大的上下文有效载荷)的模型,其成本远高于只需一轮即可完成的模型。

推理开销

许多模型支持扩展思维,即在可见答案之前进行思维链推导。推理 token 按输出 token 计费,因此一个在给出 200 个 token 的答案前思考了 2,000 个 token 的模型,会向你收取 2,200 个 token 的费用。有些模型虽然隐藏了推理过程,但仍会为此收费。建议先关闭推理功能,仅在基准测试显示存在值得为此付出代价的质量差距时再启用它。

每项任务成本:实例演算

五个成本维度的雷达图,其中模型 A 仅在价格优势方面领先,而模型 B 在其他四个方面领先

图 1:跨五个成本维度比较两种模型。列表价格只是决定实际成本的五个因素之一

考虑一个智能体工作流,该流程读取一封 750 字长的客户邮件,提取实体,调用 API 验证账户状态,并输出严格的 JSON。以下比较使用了示例价格(请务必根据你的数据和当前的 Bedrock 定价进行基准测试):

指标

模型 A(较低列表价格)

模型 B(较高列表价格)

输入列表价格

$0.50 / 1M tokens

$1.00 / 1M tokens

输出列表价格

$1.50 / 1M tokens

$3.00 / 1M tokens

分词器效率(第 1 轮输入)

1,500 tokens

1,000 tokens

输出冗长度(最终响应)

450 tokens

150 tokens

所需的智能体循环次数

3 轮(错误修正)

1 轮(零样本)

所有轮次的累计输入 token

6,150

1,000

所有轮次的累计输出 token

750

150

总任务成本

$0.0042

$0.00145

模型 A: (6,150 x $0.50 + 750 x $1.50) / 1,000,000 = $0.0042

模型 B: (1,000 x $1.00 + 150 x $3.00) / 1,000,000 = $0.00145

流程图:模型 A 经过三轮修正重发上下文 ($0.0042);模型 B 在一轮内完成 ($0.00145)

图 2:为什么高价的模型成本低 65%。每增加一轮都会重新发送不断增长的上下文有效载荷,导致账单累积

为什么价格高 2 倍的模型成本低 65%: 三个叠加因素。模型 A 的分词器将邮件拆分为多 50% 的 token,放大了每个输入有效载荷。它用填充词使 JSON 变长,使输出 token 增加了三倍。而且它与工具模式不对齐,需要两轮修正,每一轮都重新发送不断增长的历史记录。

成功每项任务的成本

前面的例子假设两个模型最终都能成功。在实际生产中并非如此,而失败很少是免费的。公式如下:

对于重试直到成功的 workflow:

每次成功任务的成本 = 每次尝试的成本 / 成功率

对于失败时升级处理的 workflow:

每次成功任务的成本 = 每次尝试的成本 + (1 - 成功率) x 升级处理成本

当启用提示缓存时,输入进一步细分为三个桶:基础费率的未缓存输入、低于基础费率的缓存读取,以及高于基础费率的缓存写入。

在你自己的工作负载上测量

哪种模型实际上更便宜,只有通过与你的数据进行基准测试才能显现出来。Amazon Bedrock 模型评估是用于质量部分的托管功能:定义标准,上传你的提示数据集,并获得带有自动指标和可选人工评审的评分结果,无需自定义基础设施。

然而,仅有质量分数不会产生账单。另外三个 Bedrock 功能提供了你用来计费的 token 和轮次计数:

  • CountTokens 返回给定模型对给定有效载荷将收取的输入 token 数量,而无需运行推理。这是在生成任何费用之前,比较候选模型分词器效率(驱动因素 #1)的最便宜方法。
  • 模型调用响应包含一个 usage 块,其中有 inputTokens、outputTokens、cacheReadInputTokens 和 cacheWriteInputTokens。累积单个任务各轮次的这些值,可以得到前述每次尝试成本公式中的四项。一个需要注意的地方:当启用缓存时,inputTokens 仅计算未缓存的 token,因此你的总输入量为 inputTokens + cacheReadInputTokens + cacheWriteInputTokens。将它们相加以了解足迹,但要分别计价,因为这三者按不同费率计费。在整个过程中多次评估此内容,并根据当前活动负载设置缓存检查点。随着应用程序的进展和工具的过时,缓存检查点会发生漂移。这意味着从现在起三个月后,当漂移发生时,你将向缓存写入更多内容。不断评估你的数据以实现最佳缓存使用,成为降低成本的主要杠杆。
  • 模型调用日志 将每次调用的 token 计数写入 Amazon Simple Storage Service (Amazon S3) 或 Amazon CloudWatch Logs,以便你可以针对真实的生产流量而非样本,测量完成任务所需的轮次。使用请求元数据标记调用,以便按团队、功能或实验切片这些记录的 token 计数。但是,这些是日志字段,而不是成本分配标签,永远不会出现在 AWS Cost Explorer 或你的成本与使用报告中。应用推理配置文件可以到达这两者,粒度为每天一种使用类型。这种粒度适合分摊成本,但对于每项任务的成本来说太粗糙了。将记录的 token 计数乘以公布费率,给你一个接近实时的估算,而不是发票。除非你对它们进行了建模,否则它不会反映承诺、批量定价或预置吞吐量。在将其视为账单之前,请与你的成本与使用报告进行核对。

降低每项任务成本:四个杠杆

这四个驱动因素各有一个杠杆,且都有深入文档记录。提示缓存减少了使模型 A 昂贵的重发上下文,使其成为智能体路径上最大的收益来源。智能提示路由将简单请求发送到同一家族中更便宜的模型。工具模式加上 maxTokens 限制比文字指令更可靠地控制冗长度,并且只要基准测试显示其能收回成本,就保持扩展思维关闭。批量推理将批量单次工作的费率减半,尽管它排除了工具调用和多轮交换。

证明智能体 ROI:描述人类基线

高效不等于有价值。一个智能体可以优化得完美无缺,但仍然不值得运行。决定预算的问题是:智能体是否比人类做得更好?

首先记录人类流程

智能体 ROI 中最大的错误是在没有首先描述人类工作流的情况下试图证明价值。在构建或扩展智能体之前,用操作术语写下当前流程:什么触发了工作,涉及哪些人类角色,交接点在哪里,如何定义完成。这听起来像是官僚主义。它实际上是测量设计。下游的每一个仪器决策(什么算作一次运行,什么算作成功,人类时间花在哪里)都源于此描述。

测量基线

查看原文

Part 1 of this series built the operating model that controls Amazon Bedrock spend: attribution with AWS Identity and Access Management (IAM) principal tags and Cost and Usage Report 2.0, observability with model invocation logging, enforcement at three tiers, and a review cadence. That layer answers who spent it, and you can stop them. It can’t tell you whether the spend was well spent.

This post answers two questions that Part 1 deliberately left open. First: Why is this workflow expensive? The answer requires thinking in cost per task, not cost per token. Second: Is the agent better than the humans were? The answer requires baselines, controlled experiments, and a scorecard tied to decisions.

In this post, you learn a framework for calculating true model cost (including four hidden cost drivers that the pricing page doesn’t show), techniques for reducing cost per task through caching, routing, and output constraints, and a discipline for measuring agent ROI with human baselines, holdout experiments, and a five-dimension scorecard. This post is written for two audiences: the application and platform engineers who own the optimization levers, and the product owners and FinOps partners who need to justify agent spend to leadership.

Cost per task, not cost per token

Price per token invites quick comparison, but it doesn’t reflect what you actually pay. The published rate reflects the cost of a single token. Your bill reflects the cost of completing a task. A task is one complete unit of work your application asks a model to do: resolve one support email, extract fields from one invoice, or answer one user question. A task runs from the request through to a usable result, however many model calls it takes.

The lower-priced model might not be the cheaper one to run. A cheaper model might fragment your text into more tokens, pad responses with filler, misread your tool schema and loop through corrections, or burn thousands of reasoning tokens before answering. None of these costs appear on the Bedrock pricing page.

The four hidden cost drivers

Four model characteristics determine what that published rate actually costs you on your workload.

Tokenizer efficiency

A token isn’t a word, and it is not equal across models. Every model family uses a different tokenizer and vocabulary. The same text, code, or JSON payload splits into different token counts. If Model A’s list price is 15 percent lower but its tokenizer needs 40 percent more tokens for your data (common with structured schemas and numerical arrays), Model B is cheaper. The gap widens for non-English text: many tokenizers fragment non-Latin scripts into two to three times more tokens than the equivalent English.

Output alignment and verbosity

Output tokens commonly cost 3–5x more than input tokens (the ratio varies by family. Refer to the Bedrock pricing page). A model that ignores formatting constraints like “return only raw JSON” makes you pay that output premium for filler words. A model that follows formatting instructions closely saves money by generating fewer of these more expensive output tokens.

Agentic loop efficiency

Agentic workflows change the cost math entirely. Tool use (function calling) lets a model invoke external functions, requiring a multi-turn loop: analyze the prompt, decide to call a tool, wait for the observation, generate an answer. Each turn re-sends the full conversation history and tool results as input tokens. A model that takes four turns (each one re-sending a larger context payload) costs far more than one that finishes in a single pass.

Reasoning overhead

Many models support extended thinking, working through a chain of thought before the visible answer. Reasoning tokens bill as output tokens, so a model that thinks for 2,000 tokens before a 200-token answer bills you for 2,200. Some models redact the reasoning while still charging for it. Start with reasoning turned off and enable it only when benchmarks show a quality gap that justifies the cost.

Cost per task: A worked example

Radar chart of five cost dimensions where Model A leads only on price advantage and Model B leads on the other four

Figure 1: Comparing two models across five cost dimensions. List price is only one of five factors that determine actual cost

Consider an agentic workflow that reads a 750-word customer email, extracts entities, calls an API to verify account status, and outputs strict JSON. The following comparison uses illustrative prices (always benchmark against your own data and current Bedrock pricing):

Metric

Model A (lower list price)

Model B (higher list price)

Input list price

$0.50 / 1M tokens

$1.00 / 1M tokens

Output list price

$1.50 / 1M tokens

$3.00 / 1M tokens

Tokenizer efficiency (turn 1 input)

1,500 tokens

1,000 tokens

Output verbosity (final response)

450 tokens

150 tokens

Agentic loops required

3 turns (error correction)

1 turn (zero-shot)

Cumulative input tokens, all turns

6,150

1,000

Cumulative output tokens, all turns

750

150

Total task cost

$0.0042

$0.00145

Model A: (6,150 x $0.50 + 750 x $1.50) / 1,000,000 = $0.0042

Model B: (1,000 x $1.00 + 150 x $3.00) / 1,000,000 = $0.00145

Flowchart: Model A takes three correction turns re-sending context ($0.0042); Model B finishes in one turn ($0.00145)

Figure 2: Why the higher-priced model costs 65% less. Each extra turn re-sends a growing context payload, compounding the bill

Why the 2x-priced model costs 65 percent less: three compounding factors. Model A’s tokenizer fragments the email into 50 percent more tokens, inflating every input payload. It pads its JSON with filler, tripling output tokens. And it misaligns with the tool schema, needing two correction turns that each re-send a growing history.

Cost per successful task

The preceding example assumes both models eventually succeed. In production they won’t, and a failure is rarely free. The formulas:

For retry-until-success workflows:

cost per successful task = cost per attempt / success rate

For escalate-on-failure workflows:

cost per successful task = cost per attempt + (1 - success rate) x escalation cost

Input further splits into three buckets when prompt caching is active: uncached input at base rate, cache reads below base rate, and cache writes above base rate.

Measuring it on your own workload

Which model is actually cheaper only shows up when you benchmark against your own data. Amazon Bedrock model evaluation is the managed feature for the quality half of that: define criteria, upload your prompt datasets, and get scored results with automatic metrics and optional human review, with no custom infrastructure required.

Quality scores alone don’t produce a bill, though. Three more Bedrock features supply the token and turn counts you price against them:

  • CountTokens returns the input token count a given model would charge for a given payload without running inference. It’s the cheapest way to compare tokenizer efficiency (driver #1) across candidates before you spend anything on generation.
  • Model invocation response carries a usage block with inputTokens, outputTokens, cacheReadInputTokens, and cacheWriteInputTokens. Accumulating those across the turns of a single task gives you the four terms of the preceding cost-per-attempt formula. One gotcha: when caching is enabled, inputTokens counts only the uncached tokens, so your total input volume is inputTokens + cacheReadInputTokens + cacheWriteInputTokens. Sum them to know the footprint, but price them separately, since the three bill at different rates. Evaluate this multiple times throughout your journey and set the cache checkpoints based on what is the active current load. The drift in cache checkpoints happens as the application progresses and the tools become stale. This means that you will be writing more to the cache in 3 months from now when the drift has happened. Evaluating your data constantly for optimal cache usage becomes a primary lever to reduce cost.
  • Model invocation logging writes per-invocation token counts to Amazon Simple Storage Service (Amazon S3) or Amazon CloudWatch Logs, so you can measure turns-to-completion against real production traffic instead of a sample. Tag calls with request metadata to slice those logged token counts by team, feature, or experiment. However, these are log fields, not cost allocation tags, and never appear in AWS Cost Explorer or your Cost and Usage Report. Application inference profiles do reach both, at a grain of one usage type per day. That grain is right for chargeback but too coarse for cost per task. Multiplying logged token counts by the published rates gives you a near real-time estimate rather than an invoice. It won’t reflect commitments, batch pricing, or provisioned throughput unless you model them. Reconcile against your Cost and Usage Report before you treat it as the bill.

Reducing cost per task: Four levers

Each of the four drivers has a lever, and each is documented in depth. Prompt caching cuts the re-sent context that made Model A expensive, which makes it the largest win on agentic paths. Intelligent prompt routing sends the easy requests to a cheaper model in the same family. A tool schema plus a maxTokens cap holds verbosity down more reliably than prose instructions do, and extended thinking stays off until a benchmark shows it earns its cost back. Batch inference halves the rate on bulk single-turn work, though it rules out tool calling and multi-turn exchange.

Proving agent ROI: Describe the human baseline

Efficient isn’t the same as valuable. An agent can be perfectly optimized and still not be worth running. The question that decides budgets is: is the agent better than the humans were?

Document the human process first

The biggest mistake in agent ROI is trying to prove value without first describing the human workflow. Before building or scaling an agent, write down the current process in operational terms: what triggers the work, which human roles are involved, where the handoffs sit, how completion is defined. This sounds like bureaucracy. It’s actually measurement design. Every instrumentation decision downstream (what counts as a run, what counts as success, where human time is spent) falls out of this description.

Measure the baseline before the agent ships

With the process described, measure the human baseline over a meaningful window: time to completion, queue time, active effort, reopen rate, escalation rate, cost per task, and outcome quality. Baselines must be measured before the agent goes live, not reconstructed from memory after the fact. Retrospective baselines are systematically flattering to the agent: people remember the average case and forget the fast ones.

Instrument the workflow as an experiment

After the baseline exists, instrument the agent workflow as an experiment from day one. Every run gets a trace ID, and every meaningful step is observable. A workflow-run record aggregates everything above the model call into a single analyzable unit:

{
  "runId": "run-8f3a2c",
  "workflow": "renewal-risk-summary",
  "agent": "renewal-agent",
  "principalArn": "arn:aws:sts::123456789012:assumed-role/BedrockRuntimeRole/gw-alex",
  "team": "sales-ai",
  "costCenter": "CC-2041",
  "experiment": {
    "variant": "treatment",
    "holdout": False,
    "promptVersion": "v14",
    "policyVersion": "2026-07"
  },
  "ops": {
    "latencyMs": 41200,
    "retries": 1,
    "toolCalls": 6,
    "humanApprovals": 1,
    "humanMinutes": 35,
    "escalations": 0
  },
  "econ": {
    "inputTokens": 48210,
    "outputTokens": 3105,
    "cacheReadTokens": 31500,
    "estCostUsd": 0.87
  },
  "outcome": {
    "status": "success",
    "accepted": True,
    "reopened": False,
    "revenueEventId": "opp-44121"
  }
}

Three fields deserve emphasis:

experiment block: Stamped at run creation and propagated into Bedrock request metadata, so model-level and workflow-level records join cleanly.

humanMinutes: What most teams omit and most need. Without it, “the agent did the work” silently excludes the 35 minutes a human spent reviewing it.

revenueEventId: The hook that makes revenue attribution possible later. It costs nothing to record and can’t be reconstructed afterward.

The rule: If the workflow telemetry can’t answer the business question, the instrumentation is incomplete.

Join cost to outcomes

With invocation logs landing in Amazon S3 (Part 1) and workflow-run records in your analytics store, one join produces the metrics that matter. Amazon Bedrock logs record tokens, not dollars, so first build a view that prices each invocation from token counts and your model rate sheet, aggregated by run ID. Then query with Amazon Athena:

SELECT
  w.workflow,
  w.variant,
  COUNT(*) AS runs,
  SUM(IF(w.outcome_status = 'success', 1, 0)) AS successes,
  ROUND(SUM(c.est_cost_usd) /
    NULLIF(SUM(IF(w.outcome_status = 'success', 1, 0)), 0), 2)
    AS cost_per_success,
  ROUND(SUM(w.retries) * 1.0 /
    NULLIF(SUM(IF(w.outcome_status = 'success', 1, 0)), 0), 2)
    AS retries_per_success,
  ROUND(SUM(w.human_minutes) /
    NULLIF(SUM(IF(w.outcome_status = 'success', 1, 0)), 0), 1)
    AS human_min_per_success
FROM workflow_runs w
JOIN invocation_costs_by_run c ON c.run_id = w.run_id
GROUP BY w.workflow, w.variant
ORDER BY cost_per_success DESC

Note: Column names and join keys shown in the preceding query are illustrative. Verify against your invocation log schema and workflow telemetry store, which might vary by implementation.

Cost per successful outcome, retries per success, and human minutes per success are the three numbers that survive contact with a skeptical CFO. Cost per call flatters agents that loop. Cost per success doesn’t. Note the variant grouping: the same query, split by experiment arm, is the ROI comparison.

Compare agents and humans correctly

The most credible evaluation is an A/B or holdout test. Controlled treatment and control groups compare the agent-assisted workflow against the human baseline without confusing the result with market, seasonal, or organizational changes.

For customer-facing or revenue-linked workflows, randomize at the visitor, lead, account, or case level. For internal workflows (support operations, coding assistants), use matched cohorts: teams, repository groups, or pods.

The comparison covers four dimensions:

Efficiency: time to completion, hours recovered, queue-time reduction.

Quality: error rate, approval rate, reopen rate, escalation rate.

Cost: cost per task, cost per successful outcome, total cost to serve.

Business value: conversion lift, retention lift, expansion rate, revenue per rep or per workflow.

If the agent improves one dimension while meaningfully degrading another, the result is ambiguous and the deployment needs tuning.

Revenue: The hardest metric

Efficiency gains are the easiest part of the ROI story to prove. Revenue impact is harder, and it is the metric leadership funds against. In revenue-adjacent workflows, measure whether the agent improves conversion, time-to-response, deal progression, or revenue per rep. Holdout tests are the most reliable way to separate incremental revenue attributable to the agent from general business momentum.

When revenue lift is real, the conversation changes. The organization stops asking whether the Bedrock bill went up and starts asking whether the additional spend is buying a meaningful increase in business output.

The scorecard

Based on what we have observed working with customers, a strong operating model doesn’t require fifty metrics. What works is a small scorecard tied to decisions, reviewed on a regular cadence for every production agent.

The following thresholds are starting points, not prescriptions. Calibrate them against your own fleet data and organizational context.

Dimension

Metric

Green

Yellow

Red

Adoption

Active users / intended users

>70%

40-70%

<40%

Quality

Tasks completed without rework

>90%

75-90%

<75%

Efficiency

Hours recovered per week

>target

50-100% of target

<50% of target

Cost

Cost per successful outcome

≤budget

1-1.5x budget

>1.5x budget

Business impact

KPI lift compared to baseline

Significant

Marginal

None or negative

Green means scale: the agent beats baseline while meeting cost and quality thresholds. Yellow means tune: promising but needs work. Red means retire or redesign: the agent consumes cost without enough measurable value. The willingness to actually retire a red agent is what makes the rest of the scorecard credible.

Conclusion

In this post, you learned how to calculate the true cost of a model by accounting for four hidden cost drivers (tokenizer efficiency, output alignment, agentic loop efficiency, and reasoning overhead), how to reduce cost per task through prompt caching, model routing, output constraints, and batch inference, and how to prove agent ROI by measuring human baselines, instrumenting workflows as experiments, joining cost to outcomes, and running holdout comparisons.

The cost optimization half answers “why is this expensive and how do I fix it.” The ROI half answers “is the agent better than the humans were.” Together with Part 1’s operating model (attribute, observe, enforce, optimize, operate), they form a complete framework: you can see who spent it, explain why, reduce the waste, and justify what remains.

To get started, benchmark your top model candidates against your own prompts using Amazon Bedrock model evaluation, capture tokens and turns from the usage block or your invocation logs, price them against current Bedrock pricing, and divide by success rate. For ROI measurement, consult the Well-Architected Agentic AI Lens for agent cost governance best practices.

If you have found other techniques for reducing cost per task or measuring agent ROI on Amazon Bedrock, let us know in the comments.


About the authors

原文版权归 AWS Machine Learning 及原作者所有,本站转载仅供阅读。如需删除,请联系 support@aisa.one。