HomeAI NewsAmazon Bedrock prompt caching cuts agent token costs across turns

Amazon Bedrock prompt caching cuts agent token costs across turns

AWS shows how caching the tool list, instructions, and history avoids re-reading the same tokens on every agent turn.

An agent must resend its tool definitions, developer instructions, and full tool-call history on every turn because the model keeps no memory between requests. The AWS Machine Learning Blog explains how prompt caching stores that input state and reloads it when a later request opens with the same tokens. The model then processes only the new content in the next payload.

The post builds its framing around the film Groundhog Day, where a character relives the same day without carrying anything forward. The walkthrough covers an agent’s first turn, later turns with new tools, and the moment it spawns helper agents. Prefill work builds key and value vectors that form the model’s working state before it writes a single output token.

By turn 20 of a coding session, the model re-reads turns one through 19 unless caching is in place, and the operator pays for every one of those tokens. Storing the prompt state avoids that repeated spend and keeps responses consistent across long tool loops. Teams running OpenAI models on Amazon Bedrock see reuse only when a later request opens with the same input tokens.

The post promises a walk through an agent’s full life cycle, from its first turn through new tools and spawned helpers, with caching patterns at each stage. The saved state holds the system prompt, tools, content, and history, so the latest tool result remains the only fresh work. How that state behaves as sessions grow long is the piece to track.

What matters

  • The AWS Machine Learning Blog details how prompt caching stores an agent’s prompt state for reuse.
  • Caching cuts input costs and latency because the model skips recomputing tokens it has already seen.
  • Teams should watch how caching handles tool changes and spawned sub-agents across longer sessions.

Why it matters

Teams should watch how caching handles tool changes and spawned sub-agents across longer sessions.

This GenAI News article was prepared in original wording using reporting and materials published by AWS Machine Learning Blog. Source reference: https://aws.amazon.com/blogs/machine-learning/groundhog-day-for-ai-agents-prompt-caching-patterns-for-using-openai-models-on-amazon-bedrock/.

Drafted by the GenAI News review pipeline.

latest articles

explore more