Accommodation Orchestrator
The AccommodationSearchOrchestrator coordinates accommodation searches across multiple providers (Booking.com and Sabre), aggregates results, and enriches them with TTV Scoring insights.
Responsibilities
- Coordinate Multi-Provider Search — Query Booking.com and Sabre concurrently
- Aggregate Results — Combine and deduplicate results from all providers
- Apply TTV Scoring — Score options against preferences and policies
- Generate Insights — Create user-facing explanations
- Persist Results — Save accommodation options to database
Source Code
| Component | Location |
|---|---|
| Orchestrator | core/orchestrators/accommodation_search_orchestrator.py |
| Booking.com Service | core/services/booking_dot_com_service.py |
| Sabre Service | core/services/sabre_service.py |
| Insight Service | core/services/insight_service.py |
Search Flow
AccommodationSearchOrchestrator.search_accommodations()
│
├── 1. Load TripSearch and requirements
├── 2. Search providers concurrently (Booking.com + Sabre)
├── 3. Aggregate and deduplicate results
├── 4. For each accommodation:
│ ├── Create entities (Accommodation, Room, Product)
│ ├── Extract TTV features
│ └── Generate insights
└── 5. Persist all changes
Key Methods
See the source code for full implementation details.
| Method | Purpose |
|---|---|
search_accommodations() | Main entry point - coordinates the full search flow |
_search_all_providers() | Concurrent search across Booking.com and Sabre |
_aggregate_results() | Merge and deduplicate provider results |
_create_trip_option() | Create TripOption entity with accommodation link |
Feature Extraction
Features are extracted from Accommodation and Product entities for TTV Scoring.
See the feature implementations in:
models/core_models/scoring/option_feature/accommodation/accommodation_features/models/core_models/scoring/option_feature/accommodation/product_features/
Transaction Management
The orchestrator uses background_context() for database operations, ensuring all changes are committed atomically.
warning
If both providers fail, the orchestrator returns an empty summary rather than raising an exception, allowing the AI agent to handle the failure gracefully.
Related Documentation
- Accommodation Overview — System overview
- Booking.com Integration — Booking.com provider
- Sabre Integration — Sabre provider
- TTV Scoring — Scoring system