By Sagar Shankaran, Founder of CallSphere
Lower Claude agent cost and latency with prompt caching, batching, context pruning, and model routing — concrete tactics and honest tradeoffs.
Key takeaways
An agent that works is the easy part. An agent that works and doesn't quietly cost you four figures a day is the part that separates a demo from production. Agentic runs are token-hungry by nature: every turn re-sends the system prompt, the tool definitions, the conversation so far, and the growing pile of tool results. Multi-agent setups multiply that by the number of subagents. If you don't actively manage tokens and latency, an agent that handles ten tasks fine will fall over at ten thousand.
The good news is that the levers are concrete and most of them stack. This post walks through prompt caching, batching, context discipline, and model routing — and where each one actually pays off versus where it's a rounding error.
Start by understanding the shape of agent spend. In a typical tool-using run, the input tokens dwarf the output tokens, because each turn re-submits everything that came before. By turn fifteen, you may be paying to re-read fourteen turns of tool results the model has already digested. The cost curve bends upward as the conversation grows. That single fact tells you where to aim: shrink and stabilize the repeated input.
The two biggest structural costs are the unchanging prefix (system prompt, tool definitions, loaded skills) and the accumulating suffix (conversation history and tool outputs). Caching attacks the prefix; pruning and summarization attack the suffix. Do both.
Prompt caching lets you mark a stable portion of your prompt so the model reuses a cached representation instead of reprocessing it. For agents this is enormous, because the system prompt, the full set of tool definitions, and any loaded skill content are identical on every single turn of a run. Mark them as cacheable and you pay the discounted cache-read rate for that prefix on turns two onward, while the cache stays warm.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent for home services in your browser — 60 seconds, no signup.
The rule that trips people up: caching works on a prefix. Anything before your cache breakpoint must be byte-identical between calls. So order your prompt stable-to-volatile — system instructions and tools first, then the dynamic conversation. Put the cache breakpoint after the stable block. If you interleave a changing timestamp into the system prompt, you've just invalidated the cache on every turn.
client.messages.create(
model="claude-sonnet-4-6",
system=[{
"type": "text",
"text": LONG_STABLE_SYSTEM_PROMPT,
"cache_control": {"type": "ephemeral"}
}],
tools=TOOLS, # also stable — cache the tool block too
messages=conversation,
)flowchart TD
A["Agent turn"] --> B{"Stable prefix cached?"}
B -->|Cache hit| C["Pay cache-read rate"]
B -->|Miss / expired| D["Pay full input + write cache"]
C --> E["Process volatile suffix"]
D --> E
E --> F{"Context too long?"}
F -->|Yes| G["Summarize old turns"]
F -->|No| H["Emit next tool_use"]
G --> HNot every agent task needs an answer in two seconds. Evals, nightly document processing, bulk classification, and offline enrichment can all tolerate minutes of delay. The Message Batches API exists exactly for this: you submit many requests as one batch, accept asynchronous completion within a generous window, and pay a meaningfully lower rate per request than synchronous calls.
The decision is simple. If a human is waiting on the result, go synchronous. If a queue or a cron job is waiting, batch it. The most common mistake is running an entire evaluation suite through the synchronous endpoint at full price when it could have gone through batches overnight for a fraction of the cost. Batching also smooths out rate-limit pressure, since you're not hammering the live endpoint.
Every tool result you keep in the conversation gets re-billed on every subsequent turn. A 5,000-token API dump from turn three is still costing you on turn twenty even though the model only needed one field from it. The fix is to treat context as a budget you actively manage.
Three tactics. First, summarize: after a tool returns a large blob, replace it in history with a compact extract of what mattered. Second, drop: once a sub-task is complete, remove its intermediate tool results entirely. Third, fetch lazily: instead of dumping a whole document into context, give the agent a tool to retrieve the specific section it asks for. For multi-agent systems this matters even more — give each subagent only the slice of context it needs, and have it return a tight summary to the orchestrator rather than its full working transcript.
Using your most capable model for everything is the equivalent of taking a freight truck to buy groceries. A lot of agent work is cheap: classifying intent, extracting a field, deciding which tool to call. Route those to Haiku. Use Sonnet as the default workhorse for most tool-using turns. Reserve Opus for genuinely hard planning and reasoning steps where the quality difference pays for itself.
A practical pattern is a cheap router: a Haiku call classifies the request, and only the hard branch escalates to a bigger model. You can also run the bulk of an agent on Sonnet and call Opus for a single critical decision. The point is that model choice is a per-call decision, not a per-project one.
Still reading? Stop comparing — try CallSphere live.
See the home services AI agent handle a real call — complete, industry-specific, and live in your browser. No signup.
Routing pairs naturally with caching and context discipline rather than competing with them. The cheap router classifies against a small, stable prompt that caches well, and the escalated reasoning step runs on a pruned context so the expensive model is not paying to wade through stale tool dumps. Stack all three and the savings compound — a run that once burned through a large model on every turn now spends most of its turns on Haiku against cached prefixes, escalating only where the difficulty genuinely warrants it.
| Lever | Best for | Main tradeoff |
|---|---|---|
| Prompt caching | Any multi-turn agent | Prefix must stay byte-stable |
| Batching | Evals, bulk, offline jobs | Asynchronous latency |
| Context pruning | Long-running agents | Risk of dropping needed detail |
| Model routing | Mixed-difficulty workloads | Added routing complexity |
Prompt caching reuses a precomputed representation of a stable prompt prefix so the model doesn't reprocess it each call, charging a lower cache-read rate instead. Agents benefit most because their system prompt, tools, and skills repeat unchanged on every turn of a run.
Use batching whenever no human is waiting on the result — evals, bulk document processing, classification jobs — to pay a lower per-request rate in exchange for asynchronous completion within a longer window.
No. If a cheaper model loops, retries, or fails the task, the total cost can exceed a more capable model that succeeds on the first pass. Always measure cost per completed task rather than per token.
Summarize large tool results after use, drop intermediate results once a sub-task finishes, and fetch document sections lazily through a tool instead of dumping everything into context.
CallSphere applies these same cost and latency tactics — caching, routing, and lean context — to voice and chat agents that answer every call in real time without a runaway bill. See the live version at callsphere.ai.
Source & attribution: This is an independent, original explainer inspired by Anthropic's coverage on the Claude blog. Claude, Claude Code, Claude Cowork, Claude Opus, and the Model Context Protocol are products and trademarks of Anthropic. CallSphere is not affiliated with or endorsed by Anthropic.

Written by
Sagar Shankaran· Founder, CallSphere
LinkedInSagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
Anthropic's Claude Fable 5 and Mythos 5 explained: pricing, availability, frontier benchmarks, the dual-model safeguard architecture, and what they mean for AI agents.
Where Claude Code, MCP, and multi-agent systems are taking GTM engineering next, and how to prepare your team now for standing and multi-agent workflows.
Where Claude Cowork and the Claude agent ecosystem are heading next — standing agents, MCP, skills as a moat — and the concrete moves to prepare your team now.
The metrics, leading signals, and anti-metrics that prove Claude Cowork is working — acceptance rate, time-to-outcome, and why usage counts mislead.
Shipping an agentic GTM workflow is easy; proving it works is hard. The metrics, signals, and eval loops that show a Claude Code rebuild is paying off.
A realistic end-to-end Claude Cowork use case: a quarterly vendor-spend review from vague ask to shipped deliverable, with every agentic step shown.
© 2026 CallSphere Inc. All rights reserved.
Made within San Francisco
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.
Try Live DemoBook a DemoCalculate Your ROI