Redis Semantic Cache
Redis LangCache guidance for semantic caching of LLM responses, tuning thresholds, and isolating workloads.
- CCM score
- 76 of 100
- skills.sh installs
- 2.2K
- GitHub stars
- 176
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the cache-aside flow:
searchfirst, then call the LLM andsetthe response on a miss - Includes SDK and REST samples for
searchandset, plus attribute-based storage for filtering entries - Provides a similarity threshold guide from 0.8 for loose matches to 0.95 for near-exact matches, with 0.9 as the default
- Designed for teams caching LLM completions or RAG answers on Redis Cloud, currently in preview
Install
$ npx -y skills add redis/agent-skills --skill redis-semantic-cache -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Redis Semantic Cache
Semantic caching for LLM responses with Redis Cloud's LangCache service. Stores prompts as embeddings; subsequent semantically-similar prompts return the cached response without re-calling the model.
LangCache is currently in preview on Redis Cloud. Features and behavior may change.
When to apply
- Wrapping an LLM call (OpenAI, Anthropic, etc.) with a cache layer to cut cost and latency.
- Caching RAG answers, classification outputs, or any deterministic LLM workload.
- Tuning the precision/hit-rate trade-off for a semantic cache.
- Splitting one application's LLM workloads across multiple cache instances.
1. The cache-aside flow
LangCache fits in front of any LLM call as a standard cache-aside pattern:
- Send the user's prompt to LangCache's
search. - Cache hit — return the stored response directly.
- Cache miss — call the LLM, then
setthe response so future similar prompts hit.
from langcache import LangCache
import os
lang_cache = LangCache(
server_url=f"https://{os.getenv('HOST')}",
cache_id=os.getenv("CACHE_ID"),
api_key=os.getenv("API_KEY"),
)
Details
- Repository
- github.com/redis/agent-skills
- Categories
- AI Agents & LLM Apps, Databases
- First seen
- Jul 14, 2026
Questions
What does the redis-semantic-cache skill do?
It guides an agent to add semantic caching of LLM responses using Redis Cloud's LangCache service, so similar prompts return stored answers without a new model call. It covers the cache-aside flow through the SDK or REST API, tuning the similarity threshold, and separating caches per task type.
How do I install the redis-semantic-cache skill?
Run npx -y skills add redis/agent-skills --skill redis-semantic-cache -y in your project. This lets the agent wrap LLM calls with a LangCache layer to cut cost and latency.
Who should use the redis-semantic-cache skill?
It suits developers caching LLM completions or RAG answers, or building a cache-aside layer in front of providers such as OpenAI or Anthropic. It also fits teams tuning hit rate against precision or splitting LLM workloads across several caches. LangCache is in preview on Redis Cloud, so behavior may change.
How does redis-semantic-cache compare with other AI agent skills?
It sits in the AI Agents & LLM Apps category alongside microsoft-foundry, azure-ai and several Google agent skills. This skill is specific to Redis LangCache, covering cache-aside lookups and similarity threshold tuning.
More from redis/agent-skills
All 6Similar to Redis Semantic Cache
More AI Agents & LLM Appsredis-connectionsredis/agent-skills3.3K installsPractical Redis client guidance covering pooling, pipelining, safe scanning, client-side caching, and timeouts.
prompt-cachingsickn33/agentic-awesome-skills760 installsCaching strategies for LLM prompts covering Anthropic prompt caching, response caching, and cache-augmented generation.
redis-jsupstash/redis-js1.9K installsServerless Redis SDK for JavaScript and TypeScript with automatic serialization, full-text search, and all data structures.
query-caching-strategiesaj-geddes/useful-ai-prompts466 installsMulti-level query caching guide for Redis, Memcached, and database-level caches with invalidation patterns.
caching-strategyaj-geddes/useful-ai-prompts552 installsCache design guide covering Redis, Memcached, CDN, and invalidation patterns for faster responses and lower database load.