sdk-python icon indicating copy to clipboard operation
sdk-python copied to clipboard

[FEATURE] Default Agents to turn on caching

Open notowen333 opened this issue 5 months ago • 0 comments

SDK Language

Both / Not language-specific

Problem Statement

Caching is straightforward to configure and leads to substantial (~10x) cost savings on cache hits. In Strands, if I specify an Agent with a given model provider, caching is only turned on if I explicitly provide a cache config. In the default experience, caching is turned off.

Proposed Solution

We default cache configs to a sensible 'auto' mode in every provider where we vend an 'auto' mode. In parallel, we build 'auto' mode for all model providers.

For a provider like Bedrock, we can ship this very quickly because 1) we already have auto mode and 2) Pending more verification, I believe there is no IAM permissions necessary for caching which is not necessary for standard invocation.

For API key based providers, permissions would not pose an issue. Implementing auto and accepting the new default behavior would be the only concern. We do not currently support an auto config for all providers.

This would be technically a "breaking change", but I think it's worth the tradeoff.

Use Case

Arbitrary use cases can/will benefit from savings. All model calls with cache hits will reduce costs and cache misses will lead to the same outcomes as if caching was not enabled.

Alternatives Solutions

We can push this off until V2, but I think it's possible to make a path for V1 support

Additional Context

No response

notowen333 avatar Jun 25 '26 20:06 notowen333