Messor - Retail Management Agent
Overview
Messor is the Retail Management agent in the TKM AI Agency Platform, responsible for managing brands, products, venues, and receipt processing. It handles the loyalty program's retail operations, including store management, product tracking, and points assignment for purchases.
Directory Structure
Backend/Backoffice/Messor/
├── data/ # Retail data storage
├── messor.py # Main agent implementation
├── api_messor.py # FastAPI endpoints
├── messor_tools.py # Retail utilities
├── messor_schema.py # Data models and schemas
└── test_messor.py # Unit tests
Main Components
MessorAgent Class
The core component that handles retail operations:
- Brand management
- Product tracking
- Venue operations
- Receipt processing
Processing Pipeline
-
Data Management
- Brand registration
- Product cataloging
- Venue tracking
- Inventory updates
-
Receipt Processing
- Image validation
- OCR processing
- Product matching
- Points calculation
-
Location Services
- Venue geocoding
- Proximity search
- Address validation
- Map integration
Key Features
Retail Management
- Brand registration
- Product cataloging
- Venue tracking
- Inventory management
Receipt Processing
- Image validation
- OCR integration
- Product matching
- Points assignment
Location Services
- Venue geocoding
- Proximity search
- Map integration
- Address validation
Admin Operations
- Brand management
- Product updates
- Venue configuration
- Mapping management
Integration
Database Connection
- SingleStore integration
- Schema management
- Query optimization
- Data archival
External Services
- Google Places API
- OCR services
- Geocoding services
- Map services
Event System
- Receipt processing events
- Points assignment
- Inventory updates
- Location updates
Error Handling
Processing Errors
- Image validation
- OCR failures
- Product matching
- Points calculation
Recovery Mechanisms
- Retry logic
- Manual review queue
- Error notification
- Data recovery
Integration with Other Agents
Core Dependencies
- Niger: Data persistence
- Barbatus: Authentication
- Gulosa: Points management
- Lyra: Notifications
Optional Integration
- Alfari: Configuration
- Gigantea: Feedback processing
- Sessile: Cache management