# Groundhog Day for AI agents: Prompt caching patterns for using OpenAI models on Amazon Bedrock

DevFeed: [Groundhog Day for AI agents: Prompt caching patterns for using OpenAI models on Amazon Bedrock](<https://devfeed.tech/articles/groundhog-day-for-ai-agents-prompt-caching-patterns-for-using-openai-models-on-amazon-bedrock-101019.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/machine-learning/groundhog-day-for-ai-agents-prompt-caching-patterns-for-using-openai-models-on-amazon-bedrock/>)

Author: Claudio Mazzoni

Published: 2026-10-26T17:27:20Z

Content type: article

Language: en

Sources: [Artificial Intelligence](<https://devfeed.tech/sources/artificial-intelligence.md>)

Topics: [Amazon Bedrock](<https://devfeed.tech/topics/amazon-bedrock.md>), [AI Context Management](<https://devfeed.tech/topics/ai-context-management.md>), [prompt](<https://devfeed.tech/topics/prompt.md>), [Enhancing AI model performance](<https://devfeed.tech/topics/enhancing-ai-model-performance.md>), [OpenAI](<https://devfeed.tech/topics/openai.md>), [Amazon CloudWatch](<https://devfeed.tech/topics/amazon-cloudwatch.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [amazon](<https://devfeed.tech/tags/amazon.md>), [amazon-bedrock](<https://devfeed.tech/tags/amazon-bedrock.md>), [bedrock](<https://devfeed.tech/tags/bedrock.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [caching](<https://devfeed.tech/tags/caching.md>), [context](<https://devfeed.tech/tags/context.md>), [cost](<https://devfeed.tech/tags/cost.md>), [expert-400](<https://devfeed.tech/tags/expert-400.md>), [history](<https://devfeed.tech/tags/history.md>), [input](<https://devfeed.tech/tags/input.md>), [instructions](<https://devfeed.tech/tags/instructions.md>), [latency](<https://devfeed.tech/tags/latency.md>), [models](<https://devfeed.tech/tags/models.md>), [openai](<https://devfeed.tech/tags/openai.md>), [openai-models](<https://devfeed.tech/tags/openai-models.md>), [prompt](<https://devfeed.tech/tags/prompt.md>), [prompt-caching](<https://devfeed.tech/tags/prompt-caching.md>), [tools](<https://devfeed.tech/tags/tools.md>)

## AI overview

Prompt caching can reduce repeated input processing for agents on Amazon Bedrock by reusing unchanged prompt prefixes. Keep shared instructions and tool definitions byte-for-byte stable; use explicit `prompt_cache_breakpoint` markers for reusable shared content, implicit caching for growing conversation history, or combine them. A reusable prefix must be at least 1,024 tokens. Keep earlier markers in explicit-only conversations, preserve the initial tool catalog, and use `allowed_tools` or `additional_tools` when tool access changes. Cross-session reuse requires a stable `prompt_cache_key` and the same model, AWS account, Region, and available matching prefix. Cached prefixes remain eligible for at least 30 minutes after writing or successful reuse. Writes cost 1.25 times normal input pricing, so measure reads and writes as well as total cost. The article reports workload-specific savings, including about 62% lower input cost for one six-turn test; results may differ by workload. Monitor response usage fields; Runtime also provides CloudWatch cache metrics, while Mantle has no separate cache counters in its CloudWatch namespace.

## Source excerpt

Every time an agent takes a step, it re-reads its entire context before acting. Here is how prompt caching for OpenAI models on Amazon Bedrock lets your agent remember, cutting input cost and latency without resending the same tools, instructions, and history every turn.