A conversational AI agent built with React and Node.js that helps qualify leads for different industries using the Groq AI API. This project was developed as part of the AI Full Stack Developer Assessment for GrowEasy.
- Name: Gaurav Prakash
- GitHub: gaurav241102
- LinkedIn: Gaurav Prakash
- Email: [email protected]
This project implements a WhatsApp-like chat interface that:
- Receives and initiates conversations with leads
- Qualifies leads as Hot, Cold, or Invalid
- Supports configurable industry profiles (starting with real estate)
- Extracts relevant metadata from conversations
- Real-time chat interface for lead qualification
- Industry-specific conversation flows
- AI-powered lead classification (Hot/Cold/Invalid)
- Automatic metadata extraction from conversations
- Configurable business rules and qualification criteria
- Natural, empathetic responses
- Smart fallback for unresponsive leads
- Industry-agnostic plugin/config support
- React.js
- Modern JavaScript (ES6+)
- CSS3 for styling
- Node.js
- Express.js
- Groq AI API for natural language processing
- CORS enabled for cross-origin requests
- Node.js (v14 or higher)
- npm (v6 or higher)
- Groq API key (get it from Groq Console)
- Clone the repository:
git clone https://github.com/gaurav241102/AI-Agent-for-Real-State.git
cd AI-Agent-for-Real-State
- Set up the backend:
cd backend
npm install
- Create a
.env
file in the backend directory:
PORT=3001
GROQ_API_KEY=your_groq_api_key_here
- Set up the frontend:
cd ../frontend
npm install
- Start the development servers:
In one terminal (backend):
cd backend
node server.js
In another terminal (frontend):
cd frontend
npm start
The application will be available at:
- Frontend: http://localhost:3000
- Backend: http://localhost:3001
groweasy-assessment/
├── backend/
│ ├── server.js # Express server and API endpoints
│ ├── config.json # Business rules and conversation flows
│ └── .env # Environment variables (not in git)
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── services/ # API services
│ │ ├── App.js # Main React component
│ │ └── App.css # Styles
│ └── public/ # Static files
└── README.md
Starts a new conversation with a lead.
{
"name": "Lead Name",
"phone": "1234567890",
"industry": "real_estate"
}
Continues an existing conversation.
{
"message": "User's message",
"phone": "1234567890",
"industry": "real_estate"
}
The config.json
file contains industry-specific configurations:
- Initial greetings
- Qualifying questions
- Classification rules
- Metadata extraction rules
Example configuration for real estate:
{
"industry": "real_estate",
"greeting": "Hi {name}! Thanks for reaching out. I'm your GrowEasy real estate assistant.",
"qualifying_questions": [
"Which city/location are you looking for?",
"Are you looking for a flat, villa, or plot?",
"Is this for investment or personal use?",
"What's your budget range?"
],
"classification_rules": {
"hot": {
"criteria": ["clear_location", "specific_property_type", "defined_budget", "urgent_timeline"]
},
"cold": {
"criteria": ["vague_requirements", "no_urgency", "unresponsive"]
},
"invalid": {
"criteria": ["gibberish", "test_entry", "spam"]
}
}
}