Redis-powered grocery shopping e-commerce app with AI shopping assistance.
Redish is an AI-powered grocery shopping platform that combines Redis's speed with LangGraph's intelligent workflow orchestration. Get personalized recipe recommendations, smart product suggestions, and lightning-fast responses through semantic caching.
- Vibe Shopping: Describe a mood or occasion in everyday words, like "cozy movie night snacks" or "a light summer lunch", and get products that fit, using semantic search
- Recipe Ingredients: Ask for ingredients for any recipe and get suggested products
- Product Search: Find products by name, category, or description
- Smart Recommendations: AI suggests alternatives and complementary items
- Cart Management: Add, remove, and view cart items through natural conversation
- Vector Search: Find products using AI-powered similarity search
- Agent Memory: For storing conversations, summarizing long ones, and remembering shopper preferences across sessions, using Redis Agent Memory
- Semantic Cache: Similar queries return instantly using Redis LangCache
- Multi-tool Agentic workflow: AI agent routing and tool calling
Both versions store conversations and shopper preferences in Redis Agent Memory. Create a service in the Redis Cloud console (see the TypeScript SDK quickstart for the steps), then add its connection details to the .env file of the version you run:
AGENT_MEMORY_URL="your_agent_memory_endpoint"
AGENT_MEMORY_STORE_ID="your_store_id"
AGENT_MEMORY_API_KEY="your_agent_memory_api_key"
#AGENT_MEMORY_NAMESPACE_ID="your_namespace_id" # Optional: scope memories to a namespaceThe app expects one custom memory type, shopper_preference, in the service (Redis Cloud console, Memory types & extraction, Add type). The memory tools in the code use these names, so keep them in step if you change them.
| Setting | Value |
|---|---|
| Name | shopper_preference |
| Description | Structured shopping preferences and dietary constraints for a shopper |
| Extraction prompt | Extract a shopper preference only when the user explicitly states a lasting dietary restriction, allergy, food preference or dislike, or standing instruction. Ignore one-off requests and items for the current order. Include allergies and intolerances under dietary_restrictions, and include both likes and dislikes under food_preferences. |
Custom fields:
| Field | Type | Description |
|---|---|---|
dietary_restrictions |
list[str] |
Diets, allergies and intolerances, such as vegetarian, gluten-free or nut allergy |
food_preferences |
list[str] |
Cuisines, brands, organic or budget leanings, and flavors the user likes or dislikes |
standing_instructions |
list[str] |
Rules the user wants applied every time, such as "always suggest the cheaper option", "prefer family-size packs", or "keep answers short" |
Other memory settings (suggested starting points):
| Setting | Suggested value |
|---|---|
| Short-term TTL | About 1 day |
| Long-term TTL | 365 days |
| Extraction cadence | 1 minute while testing, 5 to 15 minutes in production |
| Automatic summarization | On, after about 12 to 20 messages |
Choose one of the following:
- OpenAI Version Setup: See openai-version/README.md
- AWS Bedrock Version Setup: See aws-bedrock-version/README.md
This repository contains two versions of the demo:
β
βββ openai-version/ # OpenAI-powered version
β βββ package.json
β βββ index.js
β βββ modules/
β βββ ...
β βββ README.md # Setup instructions
β
βββ aws-bedrock-version/ # AWS Bedrock version
β βββ package.json
β βββ index.js
β βββ modules/
β βββ ...
β βββ README.md # Setup instructions
βββ README.md # This file
Choose your preferred AI provider:
cd openai-version
# Follow setup instructions in openai-version/README.mdcd aws-bedrock-version
# Follow setup instructions in aws-bedrock-version/README.md| Feature | OpenAI Version | AWS Bedrock Version |
|---|---|---|
| AI Provider | OpenAI GPT-4 | AWS Bedrock Claude 3.5 Sonnet |
| Embeddings | OpenAI Embeddings | AWS Bedrock Titan Text Embeddings V2 |
| AI Guardrails | Basic content filtering | β AWS Bedrock Guardrails |
- Node.js + Express (Backend API)
- Redis (Product store, agentic AI memory, conversational history, and semantic caching with Redis LangCache)
- LangGraph (AI workflow orchestration)
- HTML + CSS + Vanilla JS (Frontend)
- OpenAI Version: OpenAI API (GPT-4 for intelligent responses)
- AWS Bedrock Version: AWS Bedrock (Claude 3.5 Sonnet + Titan Text Embeddings V2)
The grocery agent uses a LangGraph-powered AI agent that routes requests through specialized tools.
- Cache Check: First checks Redis semantic cache for similar queries
- AI Agent: Routes to appropriate tools based on request type
- Specialized Tools: Recipe ingredients, product search, cart operations, direct answers
- Modules Layer: Product, cart, and chat modules
- Redis Storage: Vector embeddings, semantic cache, and session data
modules/
βββ products/ # Product Business Component
β βββ api/ # REST API endpoints
β βββ domain/ # Business logic
β βββ data/ # Data access layer
βββ cart/ # Cart Business Component
β βββ api/
β βββ domain/
β βββ data/
βββchat/ # Chat/Cache Business Component
β βββ api/
β βββ domain/
β βββ data/
βββ ai/agentic-shopping-workflow/ # AI Agent
β βββ tools/ # API/Interface Layer
β β βββ shopping-tools.js # Products, cart and cooking-knowledge tools
β β βββ memory-tools.js # Conversation and shopper-preference memory tools
β βββ nodes.js # Agent Logic
β βββ index.js # Orchestration
β βββ state/ # Data Access
POST /api/chat- Main chat interface for AI shopping assistantGET /api/products/search- Search products with text/vector similarityPOST /api/cart/add- Add items to shopping cartGET /api/cart- View cart contentsDELETE /api/cart- Clear cart
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Ashwin Hariharan - @booleanhunter
This project is licensed under the MIT License - see the LICENSE file for details.
If you find a bug or have a feature request, open an issue.
This project is a learning-focused demonstration designed to help developers understand:It shows how the pieces of an AI-powered shopping assistant fit together, and it isn't meant to be a finished store. It's for developers who want to see:
- AI building blocks: embeddings and vector search, semantic caching, agent memory, and tool-calling workflows
- Application structure: a layout for AI apps that keeps routes, business logic, and data access apart
- Integration: Wiring AI frameworks, LLM provider (OpenAI or AWS Bedrock), Databases, and Redis Agent Memory into one working app
What this project does NOT focus on:
β Complete business logic (e.g., real order systems, inventory management, payment processing) β Production-ready authentication/authorization
