TUMai-LaGent
A multi-agent system built with LangGraph and Mistral AI for intelligent property management and maintenance assistance.
Overview
TUMai-LaGent is an advanced property management assistant that leverages multiple AI agents to handle various aspects of property management, including maintenance requests, asset management, taxation, and general inquiries. The system uses Mistral AI for natural language processing and integrates with various tools and services to provide comprehensive assistance.
Architecture
The system is built using a multi-agent architecture with the following components:
Backend Agents
- Base Agent
- Foundation for all specialized agents
- Handles tool integration and basic message processing
- Categorizer Agent
- Analyzes incoming messages to determine their category and urgency
- Integrates with Supabase for result storage
- Categories include: maintenance, tax, noise-complaint, and miscellaneous
- Router Agent
- Routes messages to appropriate specialized agents based on content
- Supports routing to: maintenance, asset_expert, taxation, and email_drafter
- Maintenance Agent
- Handles maintenance-related queries
- Features:
- Location extraction from messages
- Maintenance worker search using Tavily API
- Automated email notifications
- Integration with maintenance worker contact system
- Asset Expert Agent
- Specializes in property asset management
- Provides detailed information about property assets
- Uses various tools for enhanced responses
- Taxation Report Generator
- Handles tax-related queries and report generation
- Provides tax-related information and guidance
- Email Drafter
- Specializes in drafting professional emails
- Helps with communication-related tasks
The system integrates with several external tools and services:
- Tavily Search API: For finding maintenance workers and relevant information
- Supabase: For storing categorizer results and other data
- Email Service: For sending notifications and communications
- Python REPL: For executing code when needed
- Speech-to-Text Model: For converting voice messages into text, enabling voice-based interactions with the system. This allows users to:
- Record voice messages for maintenance requests
- Dictate property-related queries
- Provide hands-free interaction with the system
- Access the system’s capabilities through voice commands
Frontend Implementation
The frontend is built using modern web technologies:
- Vite: For fast development and building
- TypeScript: For type-safe development
- Tailwind CSS: For styling
- React: For building the user interface
The frontend provides a clean and intuitive interface for users to interact with the AI agents, featuring:
- Real-time chat interface
- Message history
- Category visualization
- Response formatting
- Error handling and loading states
Setup and Installation
Backend
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
cp .env.example .env
# Edit .env with your API keys and configuration
- Run the backend server:
Frontend
- Install dependencies:
- Set up environment variables:
cp .env.example .env
# Edit .env with your configuration
- Start the development server:
Environment Variables
Required environment variables:
MISTRAL_API_KEY: Your Mistral AI API key
TAVILY_API_KEY: Your Tavily Search API key
SUPABASE_URL: Your Supabase project URL
SUPABASE_KEY: Your Supabase API key
License
This project is licensed under the MIT License - see the LICENSE file for details.