Skip to content

An AI Agent for Real State that initiates a conversations and qualifies the lead as per their requirements. ( Made as a Part of Grow Easy Assessment)

Notifications You must be signed in to change notification settings

gaurav241102/AI-Agent-for-Real-State

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AI Agent for Lead Qualification

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.

👨‍💻 Developer Information

🎯 Project Overview

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

✨ Features

  • 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

🛠️ Tech Stack

Frontend

  • React.js
  • Modern JavaScript (ES6+)
  • CSS3 for styling

Backend

  • Node.js
  • Express.js
  • Groq AI API for natural language processing
  • CORS enabled for cross-origin requests

📋 Prerequisites

  • Node.js (v14 or higher)
  • npm (v6 or higher)
  • Groq API key (get it from Groq Console)

🚀 Setup Instructions

  1. Clone the repository:
git clone https://github.com/gaurav241102/AI-Agent-for-Real-State.git
cd AI-Agent-for-Real-State
  1. Set up the backend:
cd backend
npm install
  1. Create a .env file in the backend directory:
PORT=3001
GROQ_API_KEY=your_groq_api_key_here
  1. Set up the frontend:
cd ../frontend
npm install
  1. 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:

📁 Project Structure

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

🔌 API Endpoints

POST /api/start-chat

Starts a new conversation with a lead.

{
  "name": "Lead Name",
  "phone": "1234567890",
  "industry": "real_estate"
}

POST /api/chat

Continues an existing conversation.

{
  "message": "User's message",
  "phone": "1234567890",
  "industry": "real_estate"
}

⚙️ Configuration

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"]
    }
  }
}

About

An AI Agent for Real State that initiates a conversations and qualifies the lead as per their requirements. ( Made as a Part of Grow Easy Assessment)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published