Cut self-hosted LLM cost and latency with the distributed KV caching agent skill
AWS•How-to••by Ravi Yadav•AWS Artificial Intelligence Blog
Self-hosting LLMs on GPUs means paying to recompute the same context on every turn. Distributed KV caching with Amazon ElastiCache can cut inference cost by up to 40% and time to first token by up to 80%. This post walks through the distributed KV caching skill in the Agent Toolkit for AWS, which evaluates and sets up the cache from your coding agent.
A coding-agent skill in the Agent Toolkit for AWS evaluates, sizes and sets up a shared distributed KV cache on ElastiCache for self-hosted LLM inference.
Who it is for
Teams self-hosting LLMs on GPU instances with vLLM or SGLang that repeat long prompts and want to cut time to first token.
Key points
AWS says distributed KV caching can cut inference cost by up to 40% and time to first token by up to 80%.
Requires an agent supporting Agent Skills, EFA-capable GPU instances such as p5, LMCache 0.5.8rc1 or later, and ElastiCache for Valkey 9.1 or later on cache.i8ge.48xlarge nodes.
The skill uses KVTrace to estimate savings from your own traffic before any spend, at no additional charge.
AI:Both offer a shared KV cache for self-hosted LLM inference, but AWS uses a managed cache service via an agent skill while the item offloads to Lustre storage.
AI:AgentCore harness now runs on the open-source Strands harness, adding a recommended default model, automatic prompt caching, context management, built-in tools and lifecycle hooks for allow or deny checks.
AI:Cisco's 2026 AWS AI League tournament drew 1,200 engineers, and the winning agent's design favored low output-token use and deterministic planning over sub-agents.
AI:AgentCore agents can cut per-turn token use by offloading large JSON to S3, paging tool results on demand, and compacting dictionary outputs into descriptors.