The Pulse
AWS details coding-agent skill for shared LLM caches
A skill in the Agent Toolkit for AWS guides coding agents through evaluating and setting up a shared cache for self-hosted language models. AWS says the underlying caching service can reduce inference costs and time to first token, depending on the workload.

A coding-agent skill can now guide developers through evaluating and setting up a shared cache for self-hosted language models, allowing GPU servers to reuse work from earlier prompts. AWS described the skill in its Agent Toolkit for AWS on November 20, following the general availability of distributed key-value (KV) caching in Amazon ElastiCache for Valkey.
The skill works with Kiro, Claude Code, OpenAI Codex and other coding agents that support Agent Skills. AWS says the underlying distributed cache can reduce self-hosted inference costs by up to 40% and time to first token by up to 80%, with benefits dependent on the workload and cache hit rate.
Sharing work across servers
When a language model processes a prompt, it computes KV attention states during a phase called prefill. If a later request reaches a server without the earlier states in its local memory, that server may have to compute them again before generating a response.
The shared cache acts as an additional tier alongside GPU-local and server-local caches. Servers can retrieve KV state written by other servers, including when a conversation resumes on a different machine or a GPU host fails, provided the cached state has not been evicted.
ElastiCache uses cache nodes in the same Availability Zone as the GPU fleet and transfers data through Remote Direct Memory Access over Elastic Fabric Adapter. The capability stores KV blocks in memory and on local NVMe storage.
Checking whether a cache pays
The skill guides a coding agent through a fit check before setting up infrastructure. The agent can inspect the GPU fleet with a read-only call and ask for information it cannot see, including the model, inference engine, server price and frequency of repeated prompts.
For short prompts, loading cached state can take longer than recomputing it, according to AWS. The skill uses KVTrace to estimate the effect of a shared cache on a user's workload at no additional charge, and is designed to stop if estimated savings do not cover the cache cost.
KVTrace records cache events from vLLM or SGLang and replays them offline against candidate cache sizes. The recorder does not write prompt text or token IDs, but its traces contain block hashes derived from token content and token counts.
In an AWS example, an agent assessed a fleet of 8 p5 instances serving 64,000-token prompts for a multi-turn retrieval-augmented generation assistant. The agent recommended two cache.i8ge.48xlarge nodes and suggested a KVTrace run because it had not been given a cache hit rate. AWS noted that freed GPU time translates into monetary savings only if an operator runs fewer servers or serves more traffic on the same fleet.
Setup and testing
The described setup requires GPU instances that support EFA RDMA write, LMCache 0.5.8rc1 or later, and vLLM 0.11.1 or later or SGLang 0.5.13 or later. A cache deployment also requires ElastiCache for Valkey 9.1 or later on cache.i8ge.48xlarge nodes.
The skill guides the agent to seek explicit approval for high-impact operations, including creating, changing or deleting resources. In the setup example, the agent requests confirmation of the node count and estimated price before creating the cluster, then checks that repeated prompts load their KV state over RDMA.
Before production traffic, the guidance also calls for clearing local tiers and checking that two cache-loaded runs produce the same output. A layout mismatch can otherwise yield incorrect answers even when cache-hit counters look healthy.
AWS benchmark results
In a separate post announcing general availability, AWS tested workloads using 2–6 P6 servers with 8 GPUs each, running vLLM. The comparison added one cache node to baselines that already used GPU-local KV caching.
In its shared-document question-answering test, AWS reported that each server handled twice as many requests per second while meeting its interactivity target. The company said the increase reduced cost per million output tokens by 40% after accounting for the cache node.
Sources
- Original source · Blog post Amazon Web Services · Cut self hosted LLM cost and latency with the distributed k… aws.amazon.com
Other pages read
Companies in this story
Related stories
- AWS says AI agents found and exploited a medical software zero-day
- AWS routes HyperPod inference across clusters through one endpoint
- AWS Quick adds multi-agent responses and chat-built business flows
- Figma shows how a Specs document can hand a coding agent an implementation plan
- FlashLabs adds scheduling and separate sessions to Hermes Agent