AI
7.0
Groundhog Day for AI agents: Prompt caching patterns for using OpenAI models on Amazon Bedrock
This post walks through prompt caching strategies for multi-step agents using OpenAI models on Amazon Bedrock, showing how to structure system prompts, tool definitions, and conversation history so the cache hit rate stays high across turns. By turn 20 of a coding session, without caching the model re-reads 19 prior turns on every call; caching reuses stored input at a fraction of the input token price. The post covers cache invalidation triggers, patterns for agents that spawn sub-agents, and what happens when tool definitions change mid-session.
Read article →