Cookbooks, reference architectures, and runnable demos for using Valkey in AI workloads - semantic caching, vector search, conversation memory, agent state, rate limiting, RAG pipelines, and more.
Live site: valkeyforai.com
9 use-case tracks with 45+ step-by-step cookbooks:
| Track | Cookbooks | What it covers |
|---|---|---|
| Semantic Caching | 3 | Cache LLM responses by meaning, not exact match |
| Conversation Memory | 5 | Chat history, session management, semantic search |
| Vector Search | 3 | HNSW indexes, KNN queries, hybrid filters |
| RAG Pipelines | 6 | Document chunking, retrieval, caching, monitoring |
| Rate Limiting | 6 | Fixed window, token-aware, hierarchical, cost-based |
| Feature Store | 6 | Real-time feature serving for ML models |
| Pub/Sub & Streaming | 6 | LLM token streaming, consumer groups, fan-out |
| Context Engineering | 3 | Memory assembly, context budgeting, production patterns |
| Agent Session State | Coming soon | Tool call persistence, reasoning checkpoints |
5 framework integrations:
| Framework | Cookbooks | Integration |
|---|---|---|
| Mem0 | 3 | Native provider: "valkey" connector |
| LangChain / LangGraph | 4 | langgraph-checkpoint-aws with ValkeySaver |
| CrewAI | 3 | Custom ValkeyStorage with GLIDE client |
| Strands | 3 | strands-valkey-session-manager package |
| Haystack | 2 | valkey-haystack with ValkeyDocumentStore |
Each track has interactive demos on the live site.
git clone https://github.com/meet-bhagdev/valkeyforai.git
cd valkeyforai
# Serve locally
python -m http.server 8000
# or
npx serve .Open http://localhost:8000 in your browser.
All cookbook content lives in markdown files under content/. When you push to main, a GitHub Action runs node build.js to regenerate the HTML in cookbooks/, and the site updates automatically.
content/
├── semantic-caching/
│ ├── meta.json # Track config (titles, nav, difficulty)
│ ├── 01-getting-started.md # ← edit this
│ ├── 02-multiturn-caching.md
│ └── 03-production.md
├── conversation-memory/
│ ├── meta.json
│ └── *.md
├── crewai/
│ ├── meta.json
│ └── *.md
└── ... (13 tracks total)
To edit a cookbook:
- Edit the
.mdfile incontent/<track>/ - Use fenced code blocks with language tags (
```python,```bash) - Run
node build.jslocally to preview (optional) - Push to
main- the GitHub Action rebuilds and Amplify deploys
To add a new cookbook to an existing track:
- Create a new
.mdfile in the track'scontent/directory - Add an entry to
meta.jsonwith title, difficulty, time, and prev/next links - Update the prev/next links on adjacent cookbooks in
meta.json - Push to
main
To add a new track:
- Create
content/<track-name>/meta.json(copy an existing one as template) - Add your
.mdfiles - Create
cookbooks/<track-name>/index.html(copy from an existing track's index) - Add the track to the homepage
index.html - Push to
main
{
"trackName": "Semantic Caching",
"cookbooks": [
{
"num": "01",
"source": "01-getting-started.md",
"output": "01-getting-started.html",
"title": "Getting Started with Semantic Caching",
"h1": "Getting Started with Semantic Caching",
"breadcrumb": "Getting Started",
"difficulty": "Beginner",
"time": "15 min",
"next": {
"file": "02-multiturn-caching.html",
"title": "02 - Multi-Turn Caching"
}
}
]
}| File | What it is | How to edit |
|---|---|---|
index.html |
Homepage | Edit directly (not generated) |
cookbooks/<track>/index.html |
Track landing page | Edit directly (not generated) |
demo/*.html |
Interactive demos | Edit directly |
use-cases/*/index.html |
Use-case overview pages | Edit directly |
styles.css |
Main site styles | Edit directly |
cookbooks/cookbook.css |
Cookbook page styles | Edit directly |
build.js |
Markdown-to-HTML builder | Generates cookbooks/<track>/*.html from content/ |
npm install # first time only
node build.js # builds all tracks
node build.js semantic-caching # build one trackvalkeyforai/
├── index.html # Homepage
├── styles.css # Site styles
├── script.js # Homepage interactions
├── build.js # Markdown → HTML builder
├── content/ # Markdown source (edit these)
│ ├── semantic-caching/
│ ├── conversation-memory/
│ ├── vector-search/
│ ├── rag-pipelines/
│ ├── rate-limiting/
│ ├── feature-store/
│ ├── pubsub-streaming/
│ ├── context-engineering/
│ ├── crewai/
│ ├── langchain/
│ ├── mem0/
│ ├── haystack/
│ └── strands/
├── cookbooks/ # Generated HTML (don't edit directly)
├── demo/ # Interactive demos
└── use-cases/ # Use-case overview pages
- Pure HTML/CSS/JS (no framework, no build tools beyond
node build.js) - Inter font
- highlight.js for syntax highlighting
- Hosted on AWS Amplify
MIT