Skip to content

jiaweing/agoda-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

🏨 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

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors