A comprehensive, multi-agent AI platform designed to significantly enhance the productivity of real estate brokers. The platform automates administrative tasks, manages leads intelligently, discovers new prospects through AI-powered search, facilitates broker collaboration, and provides AI-powered tools for both brokers and property buyers/sellers.
This platform combines multiple AI agents to create an intelligent ecosystem for real estate professionals. It centralizes lead management, automates qualification processes, learns broker communication styles, discovers prospects, and facilitates collaboration between brokers.
-
AI Inbox + Lead Assistant: Centralizes and processes leads from multiple channels (WhatsApp, Email, Forms)
- Automatic message classification (buyer, seller, investor, inquiry, spam)
- Priority and urgency detection
- Context-aware draft reply generation
- Conversation history tracking
- Multi-channel support (WhatsApp via Twilio, Email, Forms)
-
AI Lead Qualification: Automatically qualifies buyers and sellers through structured Q&A
- Multi-turn qualification flow
- Answer suggestions from conversation history
- Qualification scoring (0-100)
- Property matching based on qualification brief
- Automatic lead status updates
-
AI Personal Digital Twin (Persona Agent): Learns broker's communication style and operates autonomously
- Questionnaire-based persona creation (tone, formality, style, etc.)
- Sample-based learning from communication examples
- Hybrid approach (questionnaire + samples)
- Persona integration across all AI agents
- Automatic style matching in all communications
-
AI CRM Automation: Streamlines routine CRM tasks
- Pipeline management
- Activity tracking
- Task automation
- Lead status updates
-
Document Assist: Generates marketing materials and contract drafts
- Marketing material generation
- Social media content (posts, reels, scripts)
- Document templates
-
Personalized Prospect Map: Learns from broker's proven strategies
- Strategy-based prospect discovery
- Custom search parameters
- Location-based targeting
-
External Search: Discovers prospects across multiple channels
- Web search for events and communities (via Tavily API)
- Event discovery (real estate events, networking events)
- Community discovery (local groups, associations)
- Actionable recommendations
-
Feedback Loop: Continuously improves suggestions based on outcomes
- Feedback collection
- Strategy refinement
-
Collaboration Matchmaker: Suggests optimal collaboration opportunities
- Activity-based matching (listings, deals, specializations)
- Public profile visibility
- Sharing level controls
- Rich signal analysis
-
Private Broker Chat: Secure, GDPR-compliant communication
- Broker-to-broker messaging
- Click-to-message interface
- Message history
-
Cooperation Preferences: Configurable data-sharing rules
- Sharing level settings (public, limited, no_share)
- Listing visibility controls
- Profile information management
-
Property Advisor Chat: Intelligent chatbot for buyers/sellers
- Natural language property queries
- Lifestyle-based recommendations
- Property comparison
-
Smart Search: Lifestyle-based property search
- Multi-criteria filtering
- Price range, bedrooms, bathrooms, location
- Invalid property filtering (maintains data quality)
-
Property Comparison: Data-driven property analysis
- Side-by-side comparisons
- Feature analysis
-
AI Listing Enhancer: Optimizes listing content
- Listing description generation
- SEO optimization
- Feature highlighting
-
Pricing Intelligence: Data-backed pricing recommendations
- Market analysis
- Comparative pricing
-
Agency Dashboard: Performance insights and analytics
- Broker activity tracking
- Lead statistics
- Performance metrics
-
Marketing Material Generator: Creates multi-platform marketing assets
- Social media posts
- Reel scripts
- Multi-format content
-
Social Media Content: Generates posts, reels, and scripts
- Platform-specific formatting
- Hashtag suggestions
- Engagement optimization
Backend:
- Framework: FastAPI (Python 3.13+)
- Database: PostgreSQL (via Supabase)
- ORM: SQLAlchemy 2.0
- AI/ML: LangChain, OpenAI (GPT-4 Turbo)
- Caching: Redis
- Task Queue: Celery
- API Integration: Twilio (WhatsApp), Tavily (Web Search)
Frontend:
- Framework: React 18 + TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- State Management: React Query (TanStack Query)
- Routing: React Router
- UI Components: Radix UI, Lucide Icons
real_estate/
βββ api/ # Backend FastAPI application
β βββ agents/ # AI agents
β β βββ inbox_agent.py # Message classification & draft generation
β β βββ qualification_agent.py # Lead qualification
β β βββ persona_agent.py # Digital twin / persona learning
β β βββ hunt_agent.py # Prospect discovery
β β βββ marketing_agent.py # Marketing content generation
β β βββ ...
β βββ models/ # SQLAlchemy database models
β βββ routes/ # API endpoints
β βββ services/ # Business logic services
β βββ schemas/ # Pydantic schemas
β βββ config/ # Configuration
β βββ app.py # FastAPI application entry point
β
βββ client/ # Frontend React application
β βββ src/
β β βββ pages/ # Page components
β β βββ components/ # Reusable components
β β βββ lib/ # Utilities & API client
β β βββ hooks/ # Custom React hooks
β βββ package.json
β
βββ specs/ # Documentation & specifications
- Python 3.13+
- Node.js 18+
- PostgreSQL database (or Supabase)
- Redis (optional, for caching)
- OpenAI API key
- Twilio account (for WhatsApp integration, optional)
- Tavily API key (for prospect hunt web search, optional)
cd api
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Create .env file (copy from .env.example if available)
cp .env.example .env
# Edit .env with your configuration
# Run database migrations (if using Alembic)
alembic upgrade head
# Start development server
make dev
# Or manually:
uvicorn app:app --host 0.0.0.0 --port 8000 --reloadcd client
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Edit .env with your API URL
# Start development server
npm run devCreate a .env file in the api/ directory with the following variables:
# Database
SUPABASE_DB_URL=postgresql://user:password@host:port/database
# OpenAI
OPENAI_API_KEY=your_openai_api_key
# Twilio (WhatsApp)
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
# Tavily (Web Search)
TAVILY_API_KEY=your_tavily_api_key
# JWT (optional, has defaults)
SECRET_KEY=your_secret_key
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
# CORS
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173
# Redis (optional)
REDIS_URL=redis://localhost:6379/0-
Setup Persona (Digital Twin)
- Navigate to Persona page
- Fill out questionnaire (tone, formality, style, etc.)
- Optionally provide communication samples
- Create/update your persona
-
Connect WhatsApp
- Go to Inbox page
- Enter your Twilio WhatsApp number
- Connect to enable WhatsApp message processing
-
Process Incoming Messages
- Messages are automatically classified and processed
- Review AI-generated draft replies
- Edit and send replies directly from the inbox
-
Qualify Leads
- Start a qualification session for a lead
- Answer questions (or use AI-suggested answers)
- Review qualification score and brief
- Get property suggestions based on qualification
-
Discover Prospects
- Use Hunt Agent to discover new prospects
- Provide your search strategies
- Review AI-suggested events, communities, and opportunities
-
Collaborate with Other Brokers
- View collaboration suggestions
- Click on a broker's name to send a message
- Configure your sharing preferences
The API is documented at http://localhost:8000/docs when running the backend.
Key endpoints:
/api/v1/inbox/*- Inbox and message management/api/v1/leads/*- Lead management/api/v1/qualification/*- Lead qualification/api/v1/persona/*- Persona (Digital Twin) management/api/v1/hunt/*- Prospect discovery/api/v1/collaboration/*- Broker collaboration/api/v1/properties/*- Property management/api/v1/marketing/*- Marketing content generation
cd api
pytestcd api
black .
flake8 .cd api
alembic revision --autogenerate -m "description"
alembic upgrade headThe platform maintains conversation history for each client:
- Last 10 messages are tracked
- Conversation threads are identified by gaps > 24 hours
- Context is used by all AI agents for better understanding
- Prevents mixing old conversations with new ones
- New Opportunities: When a client contacts about a new property/need, a new lead is created (even if previous lead was closed)
- Lead Status: Tracks pipeline stages (NEW β CONTACTED β QUALIFIED β NEGOTIATION β WON/LOST)
- Automatic Linking: Messages from the same client are automatically linked to their lead
- Persona characteristics are injected into all AI agent prompts
- Ensures consistent communication style across:
- Inbox draft replies
- Marketing content
- Qualification suggestions
- All broker-facing communications
- Properties are matched based on qualification brief
- Bedroom requirements inferred from conversation (e.g., "5 kids" β 5+ bedrooms)
- Best available matches are shown even if not perfect
- Informative messages explain match quality
- Studios (0 bedrooms) are included unless client needs bedrooms
-
Database Connection Errors
- Verify
SUPABASE_DB_URLin.env - Check database is accessible
- Ensure migrations have run
- Verify
-
OpenAI API Errors
- Verify
OPENAI_API_KEYis set - Check API key is valid and has credits
- Review rate limits
- Verify
-
WhatsApp Not Receiving Messages
- Verify Twilio credentials
- Check webhook URL is configured in Twilio
- Ensure broker has connected WhatsApp number
- Check backend logs for webhook errors
-
No Properties Found
- Check property data exists in database
- Verify search criteria aren't too restrictive
- Review qualification brief extraction
- Specification - Detailed platform specification
- API Documentation - Interactive API docs (when running)
- Implementation Plan - Development roadmap
- Create a feature branch
- Make your changes
- Ensure tests pass
- Submit a pull request
[Add your license here]
Built with:
- FastAPI
- LangChain
- OpenAI
- React
- Tailwind CSS
- And many other open-source libraries