展示 HN:Agent-cache – 针对 Valkey 和 Redis 的多层次 LLM/工具/会话缓存

5作者: kaliades9 天前原帖
多层精确匹配缓存,支持 Valkey 或 Redis 的 AI 代理。LLM 响应、工具结果和会话状态通过一个连接进行管理。提供 LangChain、LangGraph 和 Vercel AI SDK 的框架适配器。内置 OpenTelemetry 和 Prometheus。无需额外模块 - 可在原生 Valkey 7+ 和 Redis 6.2+ 上运行。 我们昨天发布了 v0.1.0,今天推出了带集群模式的 v0.2.0,接下来将支持流式处理。 现有选项将您锁定在一个层级(LangChain = 仅 LLM,LangGraph = 仅状态)或一个框架中。这个解决方案解决了这两个问题。 npm: <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;@betterdb&#x2F;agent-cache" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;@betterdb&#x2F;agent-cache</a> 文档: <a href="https:&#x2F;&#x2F;docs.betterdb.com&#x2F;packages&#x2F;agent-cache.html" rel="nofollow">https:&#x2F;&#x2F;docs.betterdb.com&#x2F;packages&#x2F;agent-cache.html</a> 示例: <a href="https:&#x2F;&#x2F;valkeyforai.com&#x2F;cookbooks&#x2F;betterdb&#x2F;" rel="nofollow">https:&#x2F;&#x2F;valkeyforai.com&#x2F;cookbooks&#x2F;betterdb&#x2F;</a> GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;BetterDB-inc&#x2F;monitor&#x2F;tree&#x2F;master&#x2F;packages&#x2F;agent-cache" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;BetterDB-inc&#x2F;monitor&#x2F;tree&#x2F;master&#x2F;packages...</a> 欢迎提出问题。
查看原文
Multi-tier exact-match cache for AI agents backed by Valkey or Redis. LLM responses, tool results, and session state behind one connection. Framework adapters for LangChain, LangGraph, and Vercel AI SDK. OpenTelemetry and Prometheus built in. No modules required - works on vanilla Valkey 7+ and Redis 6.2+.<p>Shipped v0.1.0 yesterday, v0.2.0 today with cluster mode. Streaming support coming next.<p>Existing options locked you into one tier (LangChain = LLM only, LangGraph = state only) or one framework. This solves both.<p>npm: <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;@betterdb&#x2F;agent-cache" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;@betterdb&#x2F;agent-cache</a> Docs: <a href="https:&#x2F;&#x2F;docs.betterdb.com&#x2F;packages&#x2F;agent-cache.html" rel="nofollow">https:&#x2F;&#x2F;docs.betterdb.com&#x2F;packages&#x2F;agent-cache.html</a> Examples: <a href="https:&#x2F;&#x2F;valkeyforai.com&#x2F;cookbooks&#x2F;betterdb&#x2F;" rel="nofollow">https:&#x2F;&#x2F;valkeyforai.com&#x2F;cookbooks&#x2F;betterdb&#x2F;</a> GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;BetterDB-inc&#x2F;monitor&#x2F;tree&#x2F;master&#x2F;packages&#x2F;agent-cache" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;BetterDB-inc&#x2F;monitor&#x2F;tree&#x2F;master&#x2F;packages...</a><p>Happy to answer questions.