NVDA 173.73 ▲2.87%GOOGL 293.45 ▲2.11%MSFT 521.13 ▼2.26%AMD 552.90 ▲7.32%INTC 62.50 ▲7.52%TSMC 413.35 ▲4.25%AMZN 266.17 ▼1.74%META 628.77 ▼1.97%AAPL 355.63 ▲2.04%PLTR 172.40 ▲2.12%
Markets at last close

Anthropic · Infrastructure

Prompt order determines caching savings for AI agents

·1 min read

Prompt caching reduces AI agent costs by reusing the computed state of an identical request prefix. Any change breaks reuse from that point onward, making prompt structure critical for agents that repeatedly send tools, instructions and conversation history. Manus cited Claude Sonnet input rates of $0.30 per million for cached tokens against $3 for uncached ones.

Requests should run from the most stable content to the most dynamic: fixed tool definitions, system instructions, reference material, session details and an append-only conversation. Timestamps near the beginning, reordered tools, inconsistent JSON formatting, personalized system prompts and edits to earlier messages can invalidate reusable content. Anthropic builds its prefix from tools, then the system prompt, then messages, so changing a tool definition disrupts every subsequent layer.

Anthropic exposes cache reads, writes and uncached input through its usage fields, allowing teams to track hit rates and catch regressions. OpenAI caches automatically for prompts of 1,024 tokens or more and reports cached usage. Shared worker prefixes and completing an initial cache write before parallel requests can improve reuse.

An illustrative Sonnet calculation puts a 30,000-token prefix across 40 steps at $3.60 without caching versus roughly $0.46 with caching, a reduction of about 87 percent. Added conversation tokens reduce the overall savings. Short prompts, mostly unique requests and infrequent traffic offer less benefit, making measurement essential.

Originally reported by startupfortune.comRead the source →
Related coverage
All Anthropic news →