A simple chat agent using AutoGen for real estate assistance.
- Interactive chat interface for real estate queries
- Memory management for user preferences and conversation context
- Support for both OpenAI and Azure OpenAI
- Real estate specific tools and knowledge
- Clone the repository
- Install dependencies using uv:
make setup-env
Set the following environment variables for OpenAI:
export OPENAI_API_KEY="your-openai-api-key"
export MODEL_NAME="gpt-4o" # Optional, defaults to gpt-4o
export TEMPERATURE="0.7" # Optional, defaults to 0.7Set the following environment variables for Azure OpenAI:
export AZURE_OPENAI_API_KEY="your-azure-openai-api-key"
export AZURE_OPENAI_DEPLOYMENT="your-deployment-name"
export AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com/"
export AZURE_OPENAI_MODEL="gpt-4o" # Optional, defaults to gpt-4o
export AZURE_OPENAI_API_VERSION="2024-06-01" # Optional, defaults to 2024-06-01
export TEMPERATURE="0.7" # Optional, defaults to 0.7Note: The agent will automatically detect which configuration to use based on the environment variables. If Azure OpenAI variables are set, it will use Azure OpenAI. Otherwise, it will fall back to standard OpenAI.
# Setup development environment
make setup-env
# Run the application
make run
# Add a new package
make add PACKAGE=requests
# Add a development package
make add-dev PACKAGE=pytest
# Run tests
make test
# Format code
make format
# Clean up
make cleanfrom real_estate_agent.chat_agent import RealEstateChatAgent
# Initialize the agent
agent = RealEstateChatAgent()
# Start interactive chat
await agent.start_interactive_chat()make help- Show all available commandsmake setup-env- Setup development environmentmake install- Install production dependenciesmake install-dev- Install development dependenciesmake add PACKAGE=name- Add a new packagemake add-dev PACKAGE=name- Add a development packagemake remove PACKAGE=name- Remove a packagemake update- Update all dependenciesmake run- Run the applicationmake test- Run testsmake lint- Run lintingmake format- Format codemake clean- Clean Python cache filesmake clean-all- Clean everything including virtual environment
real-estate-agent/
├── real_estate_agent/
│ ├── __init__.py
│ ├── chat_agent.py # Main chat agent implementation
│ └── tools_v1.py # Real estate tools
├── mock_data/ # Mock data for testing
├── pyproject.toml # Project configuration
├── Makefile # Build and development commands
└── README.md # This file
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
make test - Format code:
make format - Submit a pull request