Erik Hanchett demonstrates caching system promptsPrompt caching reuses compatible computation from previously processed prompt content to reduce repeated model-input work. and routing tasks to different modelsAI model routing sends each request to a model chosen for that request's complexity, cost, speed, privacy, or other requirements. according to difficulty. His examples use Strands Agents and show how repeated context can affect cost.
Hanchett recommends offloading or summarizing large tool results and setting limits on tool-loop iterations. He suggests using observabilityAI agent observability makes an agent's state, actions, tool use, failures, resource use, and outcomes visible enough to understand and operate it. to measure calls before choosing appropriate limits.
For multi-turn agents, he describes a sliding history window and summarization as a tradeoff: fewer repeated tokensAI token efficiency measures how effectively a model or workflow turns consumed input and output tokens into useful results. can mean losing information from earlier messages.
Watch on YouTube




