Streamlit demo for a multi-agent real-estate assistant that searches listings, summarizes market context, and produces concise valuation notes.
- Streamlit app UI for collecting user criteria and showing results.
- Direct Firecrawl extraction to collect listing data from selected websites.
- LLM agents to produce market analysis and property valuation summaries.
1) UI layer (Streamlit)
app.pyrenders the form, validates input, and orchestrates the analysis workflow.- On submit, it calls
run_sequential_analysis()and renders results viadisplay_properties_professionally().
2) Data extraction layer
DirectFirecrawlAgentuses Firecrawl to extract listing data into a Pydantic schema (PropertyListing/PropertyDetails).- URLs are constructed per selected site (Zillow, Realtor.com, Trulia, Homes.com).
3) LLM agent workflow (sequential)
- Uses the agno framework to build and run agents.
create_sequential_agents()builds three roles:- Property Search Agent (parses Firecrawl results)
- Market Analysis Agent (brief market insights)
- Property Valuation Agent (concise per‑property assessment)
run_sequential_analysis()coordinates the steps and returns structured data used by the UI.
4) API layer (FastAPI)
api.pyexposesGET /healthandPOST /analyze, wrapping the samerun_sequential_analysis()pipeline for programmatic use.
- Python 3.10+ recommended
- Firecrawl API key
- OpenAI API key
python -m venv .venv.\.venv\Scripts\Activate.ps1.\.venv\Scripts\activate.batpip install -r requirements.txtYou can set the following environment variables in the shell or in a local .env file (recommended). A starter .env file is included.
FIRECRAWL_API_KEYOPENAI_API_KEYPORT(optional, REST API only)
Example .env:
FIRECRAWL_API_KEY=your_firecrawl_key
OPENAI_API_KEY=your_openai_key
PORT=8251Example (PowerShell):
$env:FIRECRAWL_API_KEY="your_firecrawl_key"
$env:OPENAI_API_KEY="your_openai_key"streamlit run app.pyThis project also exposes a REST API via FastAPI.
python api.pyIf you prefer uvicorn directly, set the PORT in your shell and pass it through.
Note: To keep the server running in the foreground, start it in a normal terminal session (do not launch it as a detached/background process).
GET /health→ health checkPOST /analyze→ run the full analysis
Fields:
city(string, required)state(string, optional)min_price(int, optional)max_price(int, optional)property_type(string, optional)bedrooms(string, optional)bathrooms(string, optional)min_sqft(int, optional)special_features(string, optional)selected_websites(array of strings, required)
{
"city": "San Francisco",
"state": "CA",
"min_price": 500000,
"max_price": 1500000,
"property_type": "Any",
"bedrooms": "Any",
"bathrooms": "Any",
"min_sqft": 1000,
"special_features": "Parking, Yard",
"selected_websites": ["Zillow", "Realtor.com"]
}Fields:
properties(array of objects)market_analysis(string)property_valuations(string)total_properties(int)
{
"properties": [
{
"address": "...",
"price": "...",
"bedrooms": "...",
"bathrooms": "...",
"square_feet": "...",
"property_type": "...",
"description": "...",
"features": ["..."],
"images": ["..."],
"agent_contact": "...",
"listing_url": "..."
}
],
"market_analysis": "...",
"property_valuations": "...",
"total_properties": 2
}- The UI allows selecting multiple listing sources and will return any listings extracted.
- Market analysis and valuation outputs are intentionally concise for display clarity.