Agent-Cache Brings Three-Tier LLM Caching to Valkey and Redis
A new open-source library called Agent-Cache addresses inefficiencies in AI agent loops by introducing a three-tier caching system backed by Valkey or Redis. The project caches LLM responses, tool call outputs, and session state separately, each with its own TTL strategy suited to how frequently that data changes. Released as v0.1.0 with support for Valkey 7+ and Redis 6.2+, it quickly followed with v0.2.0 adding cluster mode, and includes adapters for LangChain, LangGraph, and Vercel AI SDK. Cache keys are constructed from prompt hashes, model parameters, or function arguments, meaning any change in input automatically bypasses the cache and triggers a fresh API call. When the cache backend is unavailable, the library defaults to graceful degradation — continuing agent execution by hitting the LLM or tool directly — though this behavior can be configured per tier.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in