
Your Bedrock Agent Bill Is 10× What You Think — Here's Where the Tokens Actually Go
The per-token price is the smallest line on a production agent bill. Token amplification, idle vector infrastructure, and adjacent services do the real damage — and every one of them is preventable.
Practitioner threads keep converging on the same confession: the team modeled the cost of an agent from the published per-token price, shipped it, and watched the first production invoice come in at 1.5–2× the estimate — with token volume up to 10× what anyone projected. Nobody was misled about pricing. They were misled about architecture.
The bill has four layers, and you budgeted for one
A Bedrock invoice for an agent workload is a stack, not a number. The inference tokens you calculated sit at the bottom; on top of them land the multiplication effect of the agent loop, the fixed baseline of whatever vector infrastructure the knowledge base stands on, and the quiet accumulation of logging, storage, and data transfer. Teams that budget only the first layer report overruns of 30–80% from the rest — before amplification is even counted.
Cost layer | What drives it | Typical surprise factor |
|---|---|---|
Inference tokens | The calls you knowingly make | 1× — this is the number you budgeted |
Agent loop amplification | Plan, search, act, reflect — every internal step is a billed pass | 5–10× the tokens of the visible question |
Vector store baseline | OpenSearch Serverless minimum: ~2 OCUs running whether queried or not | ~$345/month at zero traffic |
Adjacent services | CloudWatch logs, S3 storage, data transfer, evaluation runs | +10–20% quietly, forever |
Token amplification: the invoice's biggest secret
An agent is not a chatbot with tools. Every user-visible question fans out into a chain of internal inference passes — planning the approach, rewriting the query for retrieval, building tool arguments, reflecting on the results, and composing the final answer. Each pass re-sends the growing context: the conversation, the tool outputs, the retrieved documents. The multiplication compounds, because later passes carry everything earlier passes produced.
Run the numbers on a typical five-pass invocation and the compounding becomes visible. The planning pass carries the base context — say 4,000 tokens. The search pass adds the plan: 5,000. The tool pass adds the retrieved documents: 9,000. The reflect pass carries all of that plus the tool output: 13,000. The composition pass carries everything: 16,000. The user asked one 30-token question and consumed 47,000 input tokens — a 1,500× ratio between what was typed and what was billed. This is not a bug or a misconfiguration; it is the arithmetic of an accumulating context re-sent on every step, and it is why token growth in a loop is closer to quadratic than linear.
The second-order effect is worse: any step that loops re-runs at the most expensive point in the sequence. When the reflect pass decides the retrieval was insufficient and sends the loop back to search, that second search pass does not cost what the first one did — it carries the entire accumulated context of everything that came before it. A retry at step five costs triple a retry at step two, which is why unbounded reflection loops are the single most common source of billing anomalies in the threads this article draws on.

This is why 'we processed 40,000 user messages' and 'we were billed for 2 million model invocations' can both be true in the same month. The loop is the product — but an unbounded loop is a blank check.
What the month actually looks like

Two things stand out in every real version of this chart. First, amplification dwarfs the base inference cost — it is the multiplier, not the margin. Second, the vector store baseline is a flat line that has nothing to do with usage: OpenSearch Serverless bills its minimum capacity around the clock. For new knowledge bases, S3 Vectors — up to 90% cheaper and serverless in the way people assume everything already is — should be the default unless a specific OpenSearch dependency exists.
Vector store option | Idle monthly baseline | When it makes sense |
|---|---|---|
OpenSearch Serverless | ~$345 (2 OCU minimum) | High-QPS semantic search, existing OpenSearch investment |
Aurora + pgvector | ~$60 (small instance) | You already run Aurora and want SQL + vectors in one place |
S3 Vectors | ~$35 for typical small workloads | The new default: massive scale, pay-per-use, sub-second |
Guardrails that cap the bill
None of this argues against agents — it argues for giving the loop a budget the same way you give it tools. Three controls remove most of the surprise:
First, a step ceiling and a token budget on every invocation, enforced in code rather than hoped for in behavior. Second, prompt caching: the stable prefix — persona, guidelines, tool definitions — is identical on every pass, and caching it means amplification multiplies only the small dynamic suffix. Third, model tiering: the reflect-and-search passes rarely need the flagship model, and routing background steps to a lightweight one cuts the amplified layer by half or more.
# A loop with a budget — the whole fix in fifteen lines
MAX_STEPS = 8
TOKEN_BUDGET = 50_000
def run_agent(task):
spent, steps = 0, 0
while not task.done:
if steps >= MAX_STEPS or spent >= TOKEN_BUDGET:
return task.best_effort_answer(reason="budget reached")
# background passes use the lightweight tier
tier = "nova-lite" if task.next_step_is_internal() else "nova-pro"
result = converse(tier, task.context()) # stable prefix is cached
spent += result.total_tokens
steps += 1
task.advance(result)
The caching math, worked through
Prompt caching deserves more than a bullet point, because its economics are counter-intuitive: it does nothing for a single call and everything for a loop. Consider an agent whose stable prefix — persona, guidelines, tool definitions — runs 6,000 tokens, with a dynamic suffix of roughly 2,000 tokens per pass. Without caching, a seven-pass invocation re-sends the prefix seven times: 42,000 prefix tokens billed at the full input rate, on top of the suffixes. With caching, the prefix is written once and read six times at the cached rate — typically a 90% discount on the read — collapsing those 42,000 full-rate tokens to 6,000 full-rate plus 36,000 heavily discounted. On amplified workloads this single change routinely cuts the inference layer by half.
The trap is prompt structure. Caching works on exact prefixes, so one volatile element placed early — a timestamp, a request ID, the user's name — invalidates everything after it. The discipline is the same one that makes prompts debuggable anyway: everything stable at the top, everything volatile at the bottom, and the boundary between them treated as an interface that changes deliberately, not accidentally.
Tiering the loop without tanking quality
Model tiering fails when it is done by vibes — someone downgrades the whole agent, quality craters, and the team concludes tiering does not work. Done properly, it is per-step, not per-agent. The passes differ enormously in how much intelligence they need:
Loop step | What it actually requires | Sensible tier |
|---|---|---|
Plan the approach | Real reasoning over the whole task | Flagship |
Rewrite the search query | Reformatting, not reasoning | Lightweight |
Build tool arguments | Schema-following precision | Lightweight |
Reflect on tool results | Judgment: is this enough to answer? | Mid or flagship |
Compose the final answer | Quality the user actually sees | Flagship |
Two rules keep this safe. First, never change tiers and prompts in the same deploy — when quality moves, you need to know which lever moved it. Second, run the evaluation baseline before and after every tier change; a step that quietly needs more intelligence than you assumed will show up as a regression in the evals rather than as a complaint from a user.
Reading your own bill before AWS sends it
Everything above assumes you can see the amplification, and by default you cannot — the invoice arrives monthly and aggregates everything into indistinguishable line items. Three pieces of instrumentation close the gap. Emit token counts as CloudWatch metrics from inside the loop, dimensioned by step type, so 'which pass is eating the budget' is a dashboard widget instead of a forensic project. Tag every Bedrock-adjacent resource with a cost allocation tag per agent, so Cost Explorer can split the bill by workload rather than by service. And set a CloudWatch billing alarm at the weekly level, not monthly — a runaway loop discovered on day 3 costs a tenth of one discovered on the invoice.
# Inside the loop: make amplification visible per step
cloudwatch.put_metric_data(
Namespace="AgentCosts",
MetricData=[{
"MetricName": "TokensSpent",
"Dimensions": [
{"Name": "agent", "Value": task.agent_name},
{"Name": "step", "Value": step.kind}, # plan / search / reflect ...
],
"Value": result.total_tokens,
}],
)
With this in place, the chart earlier in this article stops being illustrative and becomes your dashboard — and the first week of real data almost always relocates the surprise. Teams expect the flagship passes to dominate; in practice it is usually the reflect step quietly looping twice as often as anyone designed it to.
Closing thoughts
The gap between the modeled bill and the real one is not a pricing problem — every number involved is public. It is an architecture problem: the agent loop multiplies whatever you feed it, and infrastructure defaults bill by the hour whether you use them or not. Cap the loop, cache the prefix, tier the models per step, instrument the tokens so you see amplification on day one instead of day thirty, and start from S3 Vectors instead of the expensive default. Do all of that and the 10× bill becomes a 1.2× bill — boring, predictable, and exactly as budgeted.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article