Redis-powered grocery e-commerce with intelligent 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.
- Smart Grocery Shopping: AI-powered assistant helps you find ingredients, discover recipes, and manage your cart
- Product Search: Both text and vector-based search across grocery products with embeddings
- Recipe Intelligence: Get ingredient lists with suggested products for any recipe
- Cart Management: Add, view, and manage shopping cart items
- Node.js + Express (Backend API)
- Redis (Product store, conversational history, and semantic caching with LangCache)
- LangGraph (AI workflow orchestration)
- OpenAI API (GPT-4 for intelligent responses)
- HTML + CSS + Vanilla JS (Frontend)
- OpenAI API Key: Create an API key
- LangCache API: Get LangCache credentials
git clone https://github.com/redis-developer/Redish.git
cd Redish
Create a .env
file at the root:
APP_NAME="Redish"
SERVER_PORT=3000
OPENAI_API_KEY=your_openai_api_key
REDIS_URL=your_redis_connection_string
LANGCACHE_API_KEY="your_langcache_api_key"
LANGCACHE_API_BASE_URL="your_langcache_api_base_url"
LANGCACHE_CACHE_ID="your_langcache_cache_id"
MODEL_NAME="gpt-4o-mini"
# For tracing with Langsmith
LANGSMITH_TRACING="true"
LANGSMITH_ENDPOINT="your_langsmith_endpoint"
LANGSMITH_API_KEY="your_langsmith_api_key"
LANGSMITH_PROJECT="your_langsmith_project"
📝 Make sure to replace these placeholders with your real values before running the app.
- Node.js (v18 or higher): Download & Install Node.js
- Redis: You can either:
- Install Redis locally: Redis installation guide
- Use Docker:
docker run --name redish-redis -p 6379:6379 redis:8.0
- Use Redis Cloud (no installation required)
-
Install dependencies:
npm install
-
Load sample grocery data:
npm run load-products
-
Start the server:
npm start
Skip manual setup and run everything using Docker:
docker compose up
To stop the containers:
docker compose down -v
Visit http://localhost:3000 in your browser (or use the port specified in .env
).
- 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
- Semantic Cache: Similar queries return instantly using LangCache
- Vector Search: Find products using AI-powered similarity search
- Redis as memory layer: for fast data retrieval
- LangGraph Workflows: AI agent routing, tool selection
- Multi-tool Agent: Recipe tools, search tools, cart tools, and knowledge tools
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
- Services Layer: Product, cart, and chat services
- Redis Storage: Vector embeddings, semantic cache, and session data
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
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.