An intelligent agentic AI application for comprehensive urban property investigation and analysis. UrbanIntel leverages LLM-powered agents and a graph-based workflow to extract, process, and synthesize information about NYC properties across multiple dimensions including geocoding, safety metrics, and regulatory compliance.
UrbanIntel is designed to help real estate professionals, analysts, and researchers quickly gather comprehensive insights about properties in New York City. By automating the investigation process, it provides detailed property reports that combine:
- Geocoding Data: Precise geographic coordinates and location information
- Safety Metrics: Crime statistics and NYPD data
- Compliance Information: Regulatory and zoning compliance status
✨ Key Capabilities:
- 🔍 Intelligent Address Parsing: Automatically extracts and standardizes NYC addresses from natural language queries
- ⚡ Parallel Processing: Investigates multiple properties simultaneously using LangGraph's fan-out/fan-in orchestration
- 🗺️ Geolocation Services: Geocodes addresses to precise latitude/longitude coordinates
- 📊 Safety Analysis: Retrieves NYPD crime data and safety metrics
- ✅ Compliance Checking: Validates regulatory compliance and zoning requirements
- 📝 Intelligent Synthesis: Combines findings into coherent, actionable property reports
parser_node: Uses an LLM to extract and standardize NYC addresses from natural language queriesexecute_subgraph: Orchestrates parallel investigations for each identified propertysynthesize_findings: Aggregates and synthesizes all property data into comprehensive insights
locality_agent: Gathers geographic and safety-related information (geocoding, NYPD data)compliance_agent: Checks regulatory compliance and zoning requirements
geocode.py: Geographic coordinate lookup and reverse geocodingnypd.py: NYC crime statistics and safety metricscompliance.py: Building code and zoning compliance verification
-
Clone the repository
git clone <repository-url> cd UrbanIntel
-
Create a virtual environment
python3 -m venv venv source venv/bin/activate -
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
cp .env.example .env
Edit
.envwith your configuration (LLM model, API keys, etc.) -
Ensure Ollama is running
ollama serve # In another terminal, pull a model: ollama pull mistral
The primary interface is through the urban_intel_app graph, which processes property queries:
from src.agent.graph import urban_intel_app
# Define your query - can include multiple addresses
query = "I'm interested in properties in Manhattan: 350 5th Avenue, 200 Park Avenue. Also check out 1644 64th Street in Brooklyn."
# Run the investigation
result = urban_intel_app.invoke({
"query": query,
"target_addresses": [],
"completed_reports": [],
"final_analysis": ""
})
# Access the results
print(result["final_analysis"])
print(result["completed_reports"])The system accepts flexible natural language queries:
# Single property
query = "What can you tell me about 1 East 42nd Street, Manhattan?"
# Multiple properties
query = "Compare these 3 buildings: 350 5th Ave, 200 Park Ave, and 1644 64 Street Brooklyn"
# With context
query = "I'm looking at commercial real estate in Brooklyn, particularly interested in 250 Water Street and 1 Metrotech Center. Any concerns I should know about?"The application returns a comprehensive report with:
result = urban_intel_app.invoke({"query": query, ...})
# Individual property reports
for report in result["completed_reports"]:
print(f"Address: {report['address']}")
print(f"Location: ({report['lat']}, {report['lon']})")
print(f"Safety Summary: {report['safety_summary']}")
print(f"Compliance Summary: {report['compliance_summary']}")
# Final synthesis
print(result["final_analysis"])UrbanIntel/
├── README.md # This file
├── requirements.txt # Python dependencies
├── .env # Environment configuration
├── notebooks/
│ ├── 01_test_parser.ipynb # Test address parser
│ └── 02_test_graph_skeleton.ipynb # Test full graph
└── src/
├── main.py # Application entry point
├── core/
│ └── config.py # Configuration management
├── api/ # API layer (future)
└── agent/
├── graph.py # Master orchestration graph
├── state.py # State definitions (Pydantic)
├── nodes/
│ ├── parser.py # Address extraction & parsing
│ ├── workers.py # Agent execution logic
│ └── synthesizer.py # Report synthesis
├── subgraphs/
│ └── investigation.py # Sub-graph definitions
└── tools/
├── geocode.py # Geocoding service
├── nypd.py # NYPD data integration
└── compliance.py # Compliance checker
# LLM Configuration
OLLAMA_BASE_URL=http://localhost:11434
LITE_LLM_MODEL=mistral
# API Keys (if using external services)
GEOCODING_API_KEY=your_key_here
NYPD_API_KEY=your_key_hereThe app uses a centralized Config class for all settings:
from src.core.config import Config
# Access configuration
print(Config.OLLAMA_BASE_URL)
print(Config.LITE_LLM_MODEL)# Run individual notebook tests
jupyter notebook notebooks/01_test_parser.ipynb
jupyter notebook notebooks/02_test_graph_skeleton.ipynb- Create a new file in
src/agent/tools/ - Implement your tool with proper typing
- Import and integrate into the relevant agent node
To add new processing steps:
- Create a new node function
- Add it to the graph builder in
src/agent/graph.py - Define edges for workflow orchestration
{
"address": str, # Standardized NYC address
"lat": float, # Latitude coordinate
"lon": float, # Longitude coordinate
"safety_summary": str, # Safety metrics and crime data
"compliance_summary": str # Regulatory compliance status
}The synthesized output combines individual reports into narrative insights, including:
- Property-specific findings
- Comparative analysis across multiple properties
- Risk assessments
- Recommendations
Error: Connection refused to http://localhost:11434
Solution: Ensure Ollama is running: ollama serve
- Ensure addresses follow NYC format conventions
- Include borough names (Manhattan, Brooklyn, Queens, Bronx, Staten Island)
- Use standard street abbreviations (St, Ave, Blvd)
pip install -r requirements.txt --upgrade- langgraph: Graph-based workflow orchestration
- langchain: LLM framework and tools
- langchain-ollama: Local LLM integration
- pydantic: Data validation and configuration
- Additional tools for geocoding, compliance, and data integration
See requirements.txt for the complete dependency list with versions.
Contributions are welcome! Please:
- Create a feature branch
- Add tests for new functionality
- Update documentation
- Submit a pull request
UrbanIntel - Making urban property intelligence accessible and automated.
