Give your AI agents long-term memory, self-tuning caching, and retrieval in one SDK.
Runs on any Valkey or Redis you own. Observable at every layer, no lock-in.
Agent memory
Long-term memory your agent keeps across sessions, scoped and ranked by what matters.
Semantic cache
Catch paraphrased prompts and return answers from Valkey in under a millisecond.
Agent cache
Exact-match caching for LLM calls, tool results, and session state across frameworks.
Retrieval
Typed retrieval over your own data, observable at every layer.
Monitor
See what your Valkey or Redis is doing, with history that outlives the log rotation.
Migration
Move data between Redis, Valkey, cloud, and self-hosted, in any direction.
Drop-in adapters for the stack you already use
The cache tunes itself
No other Valkey or Redis cache library does this.
Measured, not asserted
- ~93%
- holds from the small split (~98%) to LongMemEval-M — a ~10× larger haystack, 500 questions, ~475 sessions each — with hybrid rerank
- 0.7ms
- semantic-cache hit latency, roughly 100× faster than a hosted cache
- Anywhere
- run it on a Valkey you already operate, or let us provision a managed one — open core, built on open-source Valkey, no lock-in
Recall at scale
p50 cache lookup
deploy on any Valkey
How BetterDB memory compares
| Capability | @betterdb/agent-memory | Mem0 | Zep | Redis Iris |
|---|---|---|---|---|
| Runs on Valkey and Redis you operate | Pluggable backends | Graph DB | Redis Enterprise / Cloud | |
| Open core, self-host with a real exit | MIT core | Apache 2.0; graph gated to Pro | Graphiti OSS; CE deprecated | Proprietary |
| Bundled semantic LLM cache | Exact + semantic, multi-tier | None | None | LangCache, separate |
Self-hosting the open source version?
BetterDB's core is open source under MIT License. Install it from your ecosystem of choice, or start on managed BetterDB Cloud.
Build your context layer on Valkey
Memory, caching, and retrieval for your agents, on infrastructure you control. Self-host on any Valkey or Redis, or let us run it managed - own your data, no lock-in.