Skip to content

Intelligent shopping assistant API with context-aware recommendations, multi-step reasoning, and human-like conversation.

License

Notifications You must be signed in to change notification settings

Sumit-531/ecommerce-ai-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖🛒 Smart E-commerce AI Agent API

AI Agent LangGraph MongoDB Node.js Express

This API powers an AI-driven shopping assistant that thinks, adapts, and interacts like a human sales professional.

  1. 📘 Introduction
  2. ⚙️ Tech Stack
  3. Features
  4. 🚀 Quick Start
  5. 📡 API Endpoints
  6. 📸 Demo
  7. 🔗 Links
  8. 📝 License

Smart E-commerce AI Agent API is a powerful, AI-driven shopping assistant designed to enhance the online shopping experience. It understands user queries and offers personalized recommendations using multi-step reasoning. Moreover, it interacts naturally with customers just like a human sales associate.

  • Node.js
  • Express
  • MongoDB
  • LangGraph

🧠 Intelligent Decision Making: The AI agent makes decisions autonomously, understands context, and performs multi-step reasoning to assist users effectively.

🔍 Advanced Search Capabilities: Provides accurate results using vector-based semantic search, and real-time inventory checks.

💬 Natural Conversations: Remembers past conversations, keeps thread-based context, and interacts naturally for a smooth user experience.

Prerequisites

Clone the repository

git clone https://github.com/Sumit-531/ecommerce-ai-agent.git

cd ecommerce-ai-agent

Installation

Install the project dependencies using npm:

npm install

Set Up Environment Variables

Create a file named .env.local inside the /server directory and add the required environment variables as shown below:

# PORT
PORT=3001

# ENVIRONMENT
NODE_ENV=development

# DATABASE
DB_URI=

# GOOGLE
GOOGLE_API_KEY=

Seed the Database

npm run seed

Running the Project

npm run dev

Test the API

After starting the server, the API will be accessible at: http://localhost:3001 Requests can be made through a web browser or any HTTP client (e.g., Insomnia, Postman) to verify the endpoints.

Base URL : http://localhost:3001/api/v1

Method Endpoint Description Example
POST /chat Initiates a new conversation Returns a new threadId along with the agent's response
POST /chat/:threadId Continues an existing conversation Returns a context-aware response based on conversation history

Initial Chat Example

Chat API Response Example Example response returned by the API when sending a message to the Smart E-commerce AI Agent.

Product Inquiry Example

Wall Clock API Response Example response returned by the API when asking about product variations.

Follow-up Chat Example

Follow-up Chat API Response Example response returned by the API after a user thanks the Smart E-commerce AI Agent.

📝 License

License: MIT

This project is licensed under the MIT License. See the LICENSE file for full details.

About

Intelligent shopping assistant API with context-aware recommendations, multi-step reasoning, and human-like conversation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published