AWS Explains Agent Prompt Caching Breakpoint Management: Maintaining Hits Amid Tool Changes and Sub-Agent Scenarios
AI Agents must resend full context every round, but prompt caching breaks this cycle. The AWS Machine Learning blog details specific caching patterns for OpenAI models on Amazon Bedrock: how to manage implicit and explicit breakpoints to reuse across rounds, how to append tools mid-session without invalidating existing prefixes, and how sub-agents can share pre-warmed caches. Performance data is based on vendor self-tests.
AI agents have no internal memory. Every time they call a tool, read the result, or decide on the next step, they must resend the model their tool definitions, instructions, all previous calls, and results. By turn 20, the model re-reads everything from turns 1 through 19, and you pay for those repeated tokens again and again. The AWS Machine Learning blog uses the movie Groundhog Day to describe this predicament.
Prompt caching saves exactly this redundant computation. When a model reads a prompt, it first performs a write called prefill, processing each input token to build key-value vectors as its working state. Caching stores this state; if subsequent requests start with identical tokens, the service loads the saved state directly, processing only the new additions. Amazon Bedrock offers two modes: implicit, where the service automatically selects the endpoint of reusable prefixes, and explicit, where code marks the endpoint using prompt_cache_breakpoint. These can be used in combination.
The first rule for maintaining hits is prefix stability down to the byte. Tool definitions and instructions should be placed at the beginning, with conversation history and new content appended afterward. Placing a timestamp, username, or request ID inside the cache prefix will invalidate everything that follows. A cacheable prefix must contain at least 1,024 tokens to qualify. The author emphasizes that MCP servers and other tool delivery methods need to be indexed to maintain serialization consistency.