- Notifications
You must be signed in to change notification settings - Fork2
Shopping AI assistant with recipe tools, product search, and semantic caching for grocery e-commerce.
License
redis-developer/shopping-ai-agent-langgraph-js-demo
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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
- 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 Redis 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
- OpenAI Version Setup: Seeopenai-version/README.md
- AWS Bedrock Version Setup: Seeaws-bedrock-version/README.md
- AWS Bedrock Guardrails: Seeaws-bedrock-version/docs/guardrails.md
This repository contains two versions of the demo:
│ ├── openai-version/ # OpenAI-powered version│ ├── package.json│ ├── index.js│ ├── services/│ └── ...│ └── README.md # Setup instructions│├── aws-bedrock-version/ # AWS Bedrock version│ ├── package.json│ ├── index.js│ ├── services/│ └── ...│ └── README.md # Setup instructions└── README.md # This fileChoose your preferred AI provider:
cd openai-version# Follow setup instructions in openai-version/README.md
cd 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)
- Main 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
- Services Layer: Product, cart, and chat services
- Redis Storage: Vector embeddings, semantic cache, and session data
services/ ├── 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/grocery-ai-agent/ # AI Agent │ ├── tools.js # API/Interface Layer │ ├── nodes.js # Agent Logic │ ├── index.js # Orchestration │ └── state/ # Data AccessPOST /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 theLICENSE file for details.
If you find a bug or have a feature request,open an issue.
About
Shopping AI assistant with recipe tools, product search, and semantic caching for grocery e-commerce.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
