• unwind ai
  • Posts
  • Build an AI Real Estate Agent Team

Build an AI Real Estate Agent Team

Fully functional multi-agent team app (100% opensource)

Finding the perfect property in today's competitive real estate market can be overwhelming. With thousands of listings across multiple platforms, varying market conditions, and complex investment considerations, homebuyers often struggle to make informed decisions efficiently. What if we could create specialized agents that work together like a professional real estate team?

In this tutorial, we'll build a multi-agent AI real estate assistant using Agno, a lightning-fast AI agent framework, and gpt-oss 20B, OpenAI’s latest open reasoning model running locally.

This system uses three specialized agents working in concert:

  1. a Property Search Agent that finds listings across major platforms,

  2. a Market Analysis Agent that provides neighborhood insights, and

  3. a Property Valuation Agent that delivers investment analysis.

Agno is a Python framework for building multi-agent systems with memory, knowledge, and reasoning capabilities. We're using OpenAI's GPT-OSS 20B, a state-of-the-art open-weight model released today that delivers similar results to OpenAI o4‑mini on common benchmarks and can run on edge devices with just 16 GB of RAM.

Don’t forget to share this tutorial on your social channels and tag Unwind AI (X, LinkedIn, Threads, Facebook) to support us!

What We’re Building

This multi-agent system creates a comprehensive real estate search and analysis platform that combines the power of specialized AI agents with real-time web scraping capabilities. The application provides detailed property listings, market insights, and investment analysis all in one streamlined interface.

Features:

  • Multi-Agent Analysis System

    1. Property Search Agent that finds properties using direct Firecrawl integration across major platforms

    2. Market Analysis Agent that provides concise market trends and neighborhood insights

    3. Property Valuation Agent that delivers brief property valuations and investment analysis

  • Multi-Platform Property Search: Search across Zillow, Realtor.com, Trulia, and Homes.com simultaneously

  • Advanced Property Analysis: Extract detailed property information including address, price, bedrooms, bathrooms, square footage, and listing URLs

  • Comprehensive Market Insights: Get current market conditions, price trends, neighborhood analysis, and investment potential assessments

  • Two Deployment Options: Cloud version with Gemini 2.5 Flash or local version with GPT-OSS 20B

How The App Works

  1. Input: User inputs the API keys, location, budget, and property preferences.

  2. Property Search Agent: Uses direct Firecrawl integration to scrape property listings from major real estate websites like Zillow, Realtor.com, Trulia, and Homes.com.

  3. Market Analysis Agent: Processes the discovered properties to provide concise market insights, focusing on current market conditions (buyer's vs seller's market), key neighborhood characteristics, and investment outlook.

  4. Property Valuation Agent: Evaluates each property individually, providing value assessments (fair/over/under-priced), investment potential ratings (high/medium/low), and specific recommendations.

The sequential execution ensures that each agent builds upon the previous agent's work, creating a comprehensive analysis pipeline that delivers both breadth and depth of real estate insights.

Prerequisites

Before we begin, make sure you have the following:

  1. Python installed on your machine (version 3.10 or higher is recommended)

  2. Your Google Gemini (if using cloud LLM) and Firecrawl API key

  3. Ollama installed with gpt-oss 20B model

  4. A code editor of your choice (we recommend VS Code or PyCharm for their excellent Python support)

  5. Basic familiarity with Python programming

Code Walkthrough

Setting Up the Environment

First, let's get our development environment ready:

  1. Clone the GitHub repository:

git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
  1. Go to the ai_real_estate_agent_team folder:

cd advanced_ai_agents/multi_agent_apps/agent_teams/ai_real_estate_agent_team
pip install -r requirements.txt
  1. Set up your API keys:
    Get a Google AI API key if you’re using Gemini from https://aistudio.google.com/app/apikey
    Get a Firecrawl API key from Firecrawl website

  2. For running gpt-oss 20B locally, install Ollama and pull the model

#Pull the model: make sure to have a device that has more than 16GB RAM to run this model locally!
ollama pull gpt-oss:20b 

Creating the Streamlit App

Let’s create our app (this is a walkthrough of the local LLM, the code for using cloud LLM is mostly the same, except the LLM configs).
Create a new file local_ai_real_estate_agent_team.py and add the following code:

  1. Import necessary libraries:

import os
import streamlit as st
import json
import time
import re
from agno.agent import Agent
from agno.models.ollama import Ollama
from dotenv import load_dotenv
from firecrawl import FirecrawlApp
from pydantic import BaseModel, Field
from typing import List, Optional
  1. Set up Pydantic schemas for structured data:

class PropertyDetails(BaseModel):
    address: str = Field(description="Full property address")
    price: Optional[str] = Field(description="Property price")
    bedrooms: Optional[str] = Field(description="Number of bedrooms")
    bathrooms: Optional[str] = Field(description="Number of bathrooms")
    square_feet: Optional[str] = Field(description="Square footage")
    property_type: Optional[str] = Field(description="Type of property")
    description: Optional[str] = Field(description="Property description")
    listing_url: Optional[str] = Field(description="Original listing URL")

class PropertyListing(BaseModel):
    properties: List[PropertyDetails] = Field(description="List of properties found")
    total_count: int = Field(description="Total number of properties found")
    source_website: str = Field(description="Website where properties were found")
  1. Create DirectFirecrawlAgent for property search:

class DirectFirecrawlAgent:
    def __init__(self, firecrawl_api_key: str, model_id: str = "gpt-oss:20b"):
        self.agent = Agent(
            model=Ollama(id=model_id),
            markdown=True,
            description="I am a real estate expert who helps find and analyze properties based on user preferences."
        )
        self.firecrawl = FirecrawlApp(api_key=firecrawl_api_key)

    def find_properties_direct(self, city: str, state: str, user_criteria: dict, selected_websites: list) -> dict:
        # Create URLs for selected websites
        search_urls = {
            "Zillow": f"https://www.zillow.com/homes/for_sale/{city_formatted}-{state_upper}/",
            "Realtor.com": f"https://www.realtor.com/realestateandhomes-search/{city_formatted}_{state_upper}/pg-1",
            "Trulia": f"https://www.trulia.com/{state_upper}/{city_trulia}/",
            "Homes.com": f"https://www.homes.com/homes-for-sale/{city_formatted}-{state_lower}/"
        }
        
        # Filter URLs based on selected websites
        urls_to_search = [url for site, url in search_urls.items() if site in selected_websites]
  1. Create specialized agents:

def create_sequential_agents(llm, user_criteria):
    property_search_agent = Agent(
        name="Property Search Agent",
        model=llm,
        instructions="""
        You are a property search expert. Your role is to find and extract property listings.
        
        WORKFLOW:
        1. SEARCH FOR PROPERTIES:
           - Use the provided Firecrawl data to extract property listings
           - Focus on properties matching user criteria
           - Extract detailed property information
        
        2. EXTRACT PROPERTY DATA:
           - Address, price, bedrooms, bathrooms, square footage
           - Property type, features, listing URLs
           - Agent contact information
        """
    )
    
    market_analysis_agent = Agent(
        name="Market Analysis Agent",
        model=llm,
        instructions="""
        You are a market analysis expert. Provide CONCISE market insights.
        
        COVER:
        1. Market Condition: Buyer's/seller's market, price trends
        2. Key Neighborhoods: Brief overview of areas where properties are located
        3. Investment Outlook: 2-3 key points about investment potential
        
        FORMAT: Use bullet points and keep each section under 100 words.
        """
    )
    
    property_valuation_agent = Agent(
        name="Property Valuation Agent", 
        model=llm,
        instructions="""
        You are a property valuation expert. Provide CONCISE property assessments.
        
        FOR EACH PROPERTY, PROVIDE:
        1. Value Assessment: Fair price, over/under priced
        2. Investment Potential: High/Medium/Low with brief reason
        3. Key Recommendation: One actionable insight
        
        FORMAT: Keep each property under 50 words, use bullet points
        """
    )
    
    return property_search_agent, market_analysis_agent, property_valuation_agent
  1. Implement sequential analysis workflow:

def run_sequential_analysis(city, state, user_criteria, selected_websites, firecrawl_api_key, update_callback):
    # Initialize agents
    llm = Ollama(id="gpt-oss:20b")
    property_search_agent, market_analysis_agent, property_valuation_agent = create_sequential_agents(llm, user_criteria)
    
    # Step 1: Property Search with Direct Firecrawl Integration
    update_callback(0.2, "Searching properties...", "🔍 Property Search Agent: Finding properties...")
    
    direct_agent = DirectFirecrawlAgent(
        firecrawl_api_key=firecrawl_api_key,
        model_id="gpt-oss:20b"
    )
    
    properties_data = direct_agent.find_properties_direct(
        city=city,
        state=state,
        user_criteria=user_criteria,
        selected_websites=selected_websites
    )
  1. Create professional Streamlit interface:

def main():
    st.set_page_config(
        page_title="Local AI Real Estate Agent Team", 
        page_icon="🏠", 
        layout="wide",
        initial_sidebar_state="expanded"
    )
    
    st.title("🏠 Local AI Real Estate Agent Team")
    st.caption("Find Your Dream Home with Local Ollama AI Agents")
    
    # Sidebar configuration
    with st.sidebar:
        st.header("⚙️ Configuration")
        
        with st.expander("🔑 API Keys", expanded=True):
            firecrawl_key = st.text_input(
                "Firecrawl API Key", 
                type="password",
                help="Get your API key from https://firecrawl.dev"
            )
            
            st.info("🤖 Using Ollama model: gpt-oss:20b (local)")
            st.markdown("Make sure Ollama is running with: `ollama run gpt-oss:20b`")
  1. Property requirements form:

with st.form("property_preferences"):
    st.markdown("### 📍 Location & Budget")
    col1, col2 = st.columns(2)
    
    with col1:
        city = st.text_input("🏙️ City", placeholder="e.g., San Francisco")
        state = st.text_input("🗺️ State/Province (optional)", placeholder="e.g., CA")
    
    with col2:
        min_price = st.number_input("💰 Minimum Price ($)", min_value=0, value=500000, step=50000)
        max_price = st.number_input("💰 Maximum Price ($)", min_value=0, value=1500000, step=50000)
    
    st.markdown("### 🏡 Property Details")
    col1, col2, col3 = st.columns(3)
    
    with col1:
        property_type = st.selectbox("🏠 Property Type", ["Any", "House", "Condo", "Townhouse", "Apartment"])
        bedrooms = st.selectbox("🛏️ Bedrooms", ["Any", "1", "2", "3", "4", "5+"])
    
    submitted = st.form_submit_button("🚀 Start Property Analysis", type="primary")
  1. Results display:

def display_properties_professionally(properties, market_analysis, property_valuations, total_properties):
    # Header with key metrics
    col1, col2, col3 = st.columns(3)
    with col1:
        st.metric("Properties Found", total_properties)
    with col2:
        # Calculate average price
        avg_price = calculate_average_price(properties)
        st.metric("Average Price", avg_price)
    with col3:
        most_common_type = get_most_common_type(properties)
        st.metric("Most Common Type", most_common_type)
    
    # Create tabs for different views
    tab1, tab2, tab3 = st.tabs(["🏠 Properties", "📊 Market Analysis", "💰 Valuations"])
    
    with tab1:
        for i, prop in enumerate(properties, 1):
            # Display property details with investment analysis
            with st.container():
                st.subheader(f"#{i} 🏠 {prop['address']}")
                st.metric("Price", prop['price'])
                
                with st.expander("💰 Investment Analysis"):
                    property_valuation = extract_property_valuation(property_valuations, i, prop['address'])
                    st.markdown(property_valuation)

Running the App

With our code in place, it's time to launch the app.

For using the LLM locally

  1. Run gpt-oss 20B model via Ollama

ollama run gpt-oss:20b
  1. In your terminal, navigate to the project folder and run:

streamlit run local_ai_real_estate_agent_team.py

For using cloud LLM

  1. In your terminal, navigate to the project folder and run:

streamlit run local_ai_real_estate_agent_team.py
  1. Open your browser and navigate to the provided URL. Put in your API keys, configure your property requirements, select real estate websites to search, and click "Start Property Analysis" to see your AI agents work together to find your perfect home!

Working Application Demo

Conclusion

You've successfully built a multi-agent AI real estate assistant using Agno and OpenAI's latest gpt-oss 20B model running entirely on your local machine.

This setup can now be expanded further:

  1. Market Alerts: Add webhook integrations to notify users when new properties matching their criteria become available

  2. Investment Analysis: Expand the valuation agent to include cash flow projections, rental yield calculations, and comparative market analysis with historical price trends and neighborhood development patterns.

  3. Voice Interface: Add speech-to-text capabilities for hands-free property searches and text-to-speech for audio summaries.

Keep experimenting with different configurations and features to build more sophisticated AI applications.

We share hands-on tutorials like this 2-3 times a week, to help you stay ahead in the world of AI. If you're serious about leveling up your AI skills and staying ahead of the curve, subscribe now and be the first to access our latest tutorials.

Don’t forget to share this tutorial on your social channels and tag Unwind AI (X, LinkedIn, Threads) to support us!

Reply

or to participate.