AWS's KV Cache Skill Starts With the Investment Case
AWS's distributed KV caching skill turns inference tuning into a measured decision about GPU capacity, cache transfer costs, and correctness.
A shared inference cache sounds like an obvious optimization: stop paying GPUs to process context they have already seen. The difficult part is proving that transferring cached state costs less than recomputing it, then turning the saved compute into capacity you can actually use.
AWS's November 20, 2026 walkthrough of its distributed KV caching agent skill is useful because it puts that decision ahead of provisioning. For engineers operating self-hosted models, the interesting development is a repeatable workflow for deciding whether another infrastructure tier deserves to exist.
What Happened
On November 20, 2026, AWS published a technical walkthrough of a skill in the Agent Toolkit for AWS that helps coding agents assess, deploy, and troubleshoot distributed KV caching. The walkthrough describes workload assessment with KVTrace and integration through LMCache. It says the skill works with agents supporting Agent Skills, including Kiro, Claude Code, and Codex. AWS skill walkthrough
The underlying service has a separate announcement date. AWS announced general availability of distributed KV caching for self-hosted LLMs with ElastiCache for Valkey on November 18, 2026. That announcement describes a shared cache alongside the GPU fleet and reports improvements of up to 40% in inference cost and 80% in time to first token. Those are vendor-reported upper bounds under its test conditions, not forecasts for another fleet. ElastiCache announcement
The skill's implementation explicitly excludes managed Bedrock inference, response caching, and semantic caching. Its workflow begins with assessing fit and cost, and stops if estimated savings do not exceed cluster cost. That stopping condition is the most consequential feature. Skill implementation
Why It Matters
Inference optimization often starts with the wrong denominator. A team sees long prompts and assumes every repeated input token represents avoidable GPU work. But a repeated prefix may already be served from a local cache. The opportunity for a shared tier is the remaining work that local caching fails to avoid.
That distinction changes the investigation. Before buying cache capacity, I would ask where returning sessions land, how much queueing contributes to latency, and whether reuse happens before local eviction. A workload dominated by new documents has different economics from an agent repeatedly carrying the same repository context through a long session.
Routing also belongs in the analysis. Keeping a conversation on one replica may improve locality, but it can concentrate demand. Sharing state could make spare replicas more useful; alternatively, existing routing may already deliver enough reuse that a remote tier adds little. Either outcome is a valid engineering result.
There is a second denominator: the bill. Saving GPU time does not automatically reduce instance-hours. If the deployment still needs the same number of replicas to satisfy peak demand or availability requirements, the benefit may be additional throughput or better latency. Calling that a cash saving obscures the decision management actually needs to make.
The value of an agent skill here is procedural consistency. An agent can collect evidence, expose missing assumptions, and prepare a reviewable proposal. The quality of the proposal still depends on the measurement model and deployment constraints.
How It Works
The implementation describes a hierarchy in which each GPU host runs an LMCache server with a host-memory L1 tier and a shared Valkey L2 backend. Computed chunks enter L1 and are written asynchronously to L2; reads check L1 before L2, after which the engine moves the state into GPU memory. The skill requires separate key prefixes for model versions and tensor-parallel layouts, and consistent hashing across participating processes. Architecture and identity rules
The LMCache documentation independently confirms the Valkey adapter's use of the synchronous valkey-glide client and support for standalone and clustered topologies. Worker threads maintain their own clients, allowing batches of keys to be handled in parallel. This is an inference storage integration whose behavior needs to be understood alongside the serving engine. LMCache Valkey adapter
The practical comparison is:
benefit per reusable prefix
= avoided prefill time
- lookup and transfer overhead
- additional loading and coordination overheadThis is a reasoning model, not an AWS benchmark formula. It explains why a hit counter alone cannot justify a deployment. A hit on a small prefix may avoid so little work that the transfer is counterproductive. Longer reusable prefixes can offer more opportunity, but their state also consumes storage and bandwidth.
KVTrace provides evidence for the capacity decision. Its repository describes recording engine KV-cache events, simulating different shared-cache sizes offline, and reporting estimated hit rates, prefill GPU-hours, latency savings, and throughput headroom. It also supports live tier measurements. The recorder omits prompt text and token IDs, but hashes remain content-derived; its anonymization option uses a shared key across nodes so cross-node reuse remains visible. KVTrace documentation
A simulation should guide a pilot. It cannot establish that the deployed network path performs as modeled under contention, or that the traffic captured last week represents next month's workload.
Deployment constraints matter too. AWS's getting-started guide places the cluster in the GPU fleet's Availability Zone, requires EFA RDMA-write support for the RDMA path, and uses cache.i8ge.48xlarge nodes. The shard count cannot be changed later. These constraints make cache sizing and placement architectural decisions rather than harmless tuning flags. Deployment guide
Eviction deserves explicit review. AWS documents that the default volatile-lru policy only evicts keys with TTLs; without eligible keys, writes fail when capacity fills. Its alternatives are supplying TTLs or using a dedicated cluster with allkeys-lru. A successful empty-cache demonstration tells you little about behavior after sustained traffic fills the tier. Configuration guide
Example
Consider a hypothetical internal coding assistant with eight inference replicas. Engineers resume sessions after meetings, and requests sometimes reach replicas that have no useful local state. The following numbers are deliberately illustrative; they are neither AWS prices nor measured results.
Suppose a representative trace suggests that a shared cache could avoid 30 GPU-hours of prefill each day after accounting for estimated transfer overhead. Assign an internal cost of $4 per GPU-hour, and assume the proposed cache costs $80 per day.
potential compute value = 30 GPU-hours/day × $4 = $120/day
cache cost = $80/day
modeled surplus = $40/dayThat is a reason to investigate, not permission to book $40 of daily savings. If only half the modeled compute benefit is realizable, its value falls to $60 and the cache costs more than it returns. If replicas cannot be removed, the proposal needs a throughput or latency justification instead.
I would give the coding agent a bounded assessment request:
Assess whether shared KV caching is justified for this fleet.
Do not create or modify cloud resources.
Separate measured inputs from estimates and assumptions.
Compare the current local-cache baseline with candidate shared tiers.
Report the traffic window, missing observations, cost assumptions,
and the conditions that would invalidate the recommendation.For an approved pilot, my acceptance criteria would cover three separate questions: does the remote tier serve tokens, does it improve the user-facing workload, and does output remain correct?
AWS documents a useful remote-read check: replay prompts after restarting the engine and LMCache server to empty local tiers, then verify that the L2 token-hit counter increases. Remote-read verification
The monitoring guide defines the shared-tier token share using rates of lmcache_mp_lookup_hit_l2_tokens_total and lmcache_mp_lookup_prompt_tokens_total. It also distinguishes LargeObjectDRAMHitRate, an internal storage-tier metric, from the KV hit rate. Monitoring guide
I would pair those counters with latency distributions, queue time, throughput, and representative output checks. For deterministic test cases, compare cold and remote-loaded results; for less deterministic workloads, validate task outcomes and structured constraints. A faster response is useful only when the loaded state belongs to the intended computation.
My Take
The strongest infrastructure skills should be capable of recommending that you buy nothing. This workflow moves in that direction by making measurement an explicit prerequisite to provisioning.
I would still review its conclusions like any capacity plan. Ask whether the trace includes quiet periods and traffic peaks, whether the model revision is representative, and whether the estimate double-counts reuse already captured locally. Require sensitivity analysis around the assumptions that dominate the result.
I would also separate permission to assess from permission to deploy. A team should be able to inspect fleet configuration and build a proposal without giving the same session authority to create expensive resources. That separation makes experimentation easier to authorize and its outcome easier to review.
Finally, cache compatibility should be part of release management. When rolling out a new model or serving configuration, the deployment plan should identify which state can safely be reused and how fallback behaves. Treating shared computational state as an ordinary opaque cache entry is an invitation to difficult failures.
Conclusion
AWS's November 20 walkthrough offers a concrete pattern for agent-assisted infrastructure work: measure the opportunity, expose assumptions, propose a bounded change, and verify the result against the baseline.
For a self-hosted inference fleet, the decisive question is how much expensive recomputation a shared cache avoids after local reuse, transfer overhead, and operational cost are counted. Establish that before provisioning another tier.
Sources
- AWS: distributed KV caching agent skill walkthrough — November 20, 2026
- AWS: distributed KV caching GA announcement — November 18, 2026
- Agent Toolkit for AWS: distributed KV caching skill
- KVTrace repository and documentation
- LMCache: Valkey L2 adapter
- ElastiCache: getting started with distributed KV caching
- ElastiCache: configuration
- ElastiCache: monitoring