Skip to content

About

A team of specialized agents that analyzes hotel listings from Agoda to create comprehensive accommodation guides. By evaluating locations, amenities, reviews, and value propositions, it helps you find the ideal hotel for your needs and preferences.

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏨 Agoda Hotel Guide Generator

Python 3.11+ crawl4ai

Your AI-powered hotel research assistant that analyzes Agoda listings to find your perfect stay


A team of specialized agents that analyzes hotel listings from Agoda to create comprehensive accommodation guides. By evaluating locations, amenities, reviews, and value propositions, it helps you find the ideal hotel for your needs and preferences.

✨ Key Features

🎯 Smart Hotel Search

  • City-based hotel discovery
  • Flexible date range selection
  • Room and guest configuration
  • Advanced filtering options:
    • Star rating
    • Price range
    • Amenities
    • Traveler type

🏒 Comprehensive Analysis

Category Details
πŸ“ Location Area, accessibility, nearby spots
πŸ›οΈ Rooms Types, sizes, views, amenities
πŸ’° Value Pricing, seasonal rates, packages
⭐ Quality Ratings, reviews, guest experiences
πŸŠβ€β™‚οΈ Facilities Pools, gyms, restaurants, services
πŸ‘₯ Guest Types Business, family, couples, solo

πŸ“Έ Visual Content

  • Hotel property photos
  • Room type imagery
  • Facility showcases
  • Location highlights

πŸ’‘ Expert Insights

  • Location advantages
  • Best room selections
  • Value-for-money analysis
  • Seasonal considerations
  • Booking strategies

⚠️ Travel Tips

  • Check-in/out optimization
  • Extra charges awareness
  • Upgrade opportunities
  • Loyalty program benefits

πŸš€ Getting Started

Prerequisites

  • Python 3.11 or higher
  • Poetry (recommended) or pip
  • OpenAI API key

Installation

# 1. Clone the repository
git clone https://github.com/jiaweing/agoda-hotel-agent.git
cd agoda-hotel-agent

# 2. Install dependencies
# Using poetry (recommended):
poetry install

# Or using pip:
pip install -r requirements.txt

# 3. Configure settings
cp .env.example .env
# Edit .env with your settings

πŸ“‹ Architecture

πŸ“ Project Structure

agoda-hotel-agent/
β”œβ”€β”€ src/                            # Source code
β”‚   β”œβ”€β”€ agents/                     # AI agents
β”‚   β”‚   β”œβ”€β”€ agoda_scraper.py       # Hotel discovery
β”‚   β”‚   β”œβ”€β”€ agoda_analyzer.py      # Hotel analysis
β”‚   β”‚   β”œβ”€β”€ agoda_relevance.py     # Hotel matching
β”‚   β”‚   └── agoda_aggregator.py    # Guide generation
β”‚   β”œβ”€β”€ config.py                  # Settings
β”‚   β”œβ”€β”€ utils/                     # Utilities
β”‚   β”‚   └── logging_config.py      # Logging setup
β”‚   └── main.py                    # CLI interface
β”œβ”€β”€ logs/                          # Log files
β”œβ”€β”€ output/                        # Generated guides
β”œβ”€β”€ requirements.txt               # Dependencies
└── pyproject.toml                # Project metadata

πŸ› οΈ Dependencies

Package Version Purpose
crawl4ai 0.5.0.post4 Web crawling
crewai 0.105.0 Agent orchestration
langchain 0.3.20 LLM integration
langchain-openai 0.3.7 OpenAI support
beautifulsoup4 4.12.3 HTML parsing
markdown 3.5.2 Content formatting
pillow 10.4.0 Image processing

πŸ’‘ Using the Guide Generator

Quick Start

python src/main.py

🎯 Interactive Hotel Search

  1. City Selection πŸŒ†

    Available Cities:
    β€’ Singapore
    β€’ Bangkok
    β€’ Tokyo
    β€’ Seoul
    β€’ Hong Kong
    
  2. Stay Details πŸ“…

    • Check-in/out dates
    • Number of rooms
    • Adults and children
    • Maximum budget
  3. Preferences ⭐

    • Star rating category
    • Required amenities
    • Traveler type
    • Location preferences

πŸ”„ Processing Steps

graph TD
    A[Search Parameters] --> B[Hotel Discovery]
    B --> C[Relevance Matching]
    C --> D[Detailed Analysis]
    D --> E[Guide Generation]

    style A fill:#f9f,stroke:#333,stroke-width:2px
    style E fill:#bbf,stroke:#333,stroke-width:2px
Loading
  1. Hotel Discovery πŸ”

    • Searches available properties
    • Gathers basic information
    • Collects visual content
  2. Smart Matching 🎯

    • Criteria-based scoring
    • Amenity verification
    • Price range validation
  3. Guide Creation πŸ“˜

    • Category organization
    • Detailed comparisons
    • Personalized recommendations

πŸ“‚ Output Structure

output/
└── hotels_in_[city]_[timestamp]/  # e.g., hotels_in_singapore_20250315/
    β”œβ”€β”€ metadata/                  # Hotel data
    β”‚   β”œβ”€β”€ hotel_details.md      # Property info
    β”‚   └── screenshots/          # Visual content
    └── guides/                   # Final output
        β”œβ”€β”€ full_guide.md         # Complete guide
        └── category_guides/      # Focused guides

🎚️ Processing Features

The system intelligently processes hotel information:

  1. Search Range πŸ”

    • Configurable hotel count
    • Smart relevance filtering
    • Category-based organization
  2. Analysis Depth πŸ“Š

    • Comprehensive property details
    • Recent review analysis
    • Price trend evaluation
    • Location scoring
  3. Smart Categories 🎯

    • Luxury (5-star)
    • Upscale (4-star)
    • Mid-range (3-star)
    • Budget-friendly
    • Special picks by traveler type

πŸ› οΈ Technical Details

πŸ€– Agent Workflow

graph TD
    S[Search Parameters] --> A[Initial Search]
    A --> B[Relevance Check]
    B --> C{Meets Criteria?}
    C -->|Yes| D[Hotel Analysis]
    C -->|No| E[Next Hotel]
    D --> F[Report Generation]
    E --> A
    F --> G[City Guide]

    style S fill:#f9f,stroke:#333,stroke-width:2px
    style G fill:#bbf,stroke:#333,stroke-width:2px
Loading

πŸ”„ Agent Coordination

  1. Scraper Agent πŸ•·οΈ

    • Hotel listing discovery
    • Property details extraction
    • Photo collection
    • Rate information gathering
  2. Relevance Agent 🎯

    • Criteria matching
    • Amenity verification
    • Price validation
    • Location scoring
  3. Analyzer Agent 🧠

    • Detailed property analysis
    • Review sentiment analysis
    • Value assessment
    • Location advantage evaluation
  4. Aggregator Agent πŸ“Š

    • Guide organization
    • Category sorting
    • Comparative analysis
    • Recommendation generation

βš™οΈ Technical Configuration

  • LLM Integration

    • Model: OpenAI GPT
    • Temperature: 0.2-0.3
    • Structured output
    • Consistent formatting
  • Content Processing

    • YAML frontmatter
    • Markdown formatting
    • Screenshot optimization
    • Data normalization

🀝 Contributing

We welcome contributions! Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests
  • Share improvement ideas

πŸ“ License

MIT License - feel free to use this code in your own projects!

About

A team of specialized agents that analyzes hotel listings from Agoda to create comprehensive accommodation guides. By evaluating locations, amenities, reviews, and value propositions, it helps you find the ideal hotel for your needs and preferences.

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages