{"id":31579029,"url":"https://github.com/ahmadluay9/hotel-mcp-bigquery-postgresql","last_synced_at":"2026-04-10T13:31:46.112Z","repository":{"id":315569843,"uuid":"1059242551","full_name":"ahmadluay9/hotel-mcp-bigquery-postgresql","owner":"ahmadluay9","description":"AI-powered Hotel Management Assistant built with Streamlit and Google's ADK. Connects to PostgreSQL for operations and BigQuery for analytics.","archived":false,"fork":false,"pushed_at":"2025-10-02T22:46:53.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-03T00:19:08.477Z","etag":null,"topics":["adk","adk-python","agentic-ai","bigquery","mcp","postgresql","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmadluay9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-18T07:27:21.000Z","updated_at":"2025-10-02T22:46:56.000Z","dependencies_parsed_at":"2025-09-19T11:45:21.306Z","dependency_job_id":"e44934b1-83f5-405c-822a-5de7cf161fa9","html_url":"https://github.com/ahmadluay9/hotel-mcp-bigquery-postgresql","commit_stats":null,"previous_names":["ahmadluay9/hotel-mcp-bigquery-postgresql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahmadluay9/hotel-mcp-bigquery-postgresql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadluay9%2Fhotel-mcp-bigquery-postgresql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadluay9%2Fhotel-mcp-bigquery-postgresql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadluay9%2Fhotel-mcp-bigquery-postgresql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadluay9%2Fhotel-mcp-bigquery-postgresql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmadluay9","download_url":"https://codeload.github.com/ahmadluay9/hotel-mcp-bigquery-postgresql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadluay9%2Fhotel-mcp-bigquery-postgresql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31645255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adk","adk-python","agentic-ai","bigquery","mcp","postgresql","streamlit"],"created_at":"2025-10-05T20:45:16.845Z","updated_at":"2026-04-10T13:31:46.101Z","avatar_url":"https://github.com/ahmadluay9.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hotel Management AI Assistant\n![hotel-mcp-bq](https://github.com/user-attachments/assets/3fee4eb6-9e70-40e1-b300-daab429e762f)\nThis project is a sophisticated AI-powered chatbot designed to act as a Hotel Management Assistant. It provides a conversational interface for both operational tasks (like checking room availability) and analytical queries (like reviewing monthly revenue).\n\n\nThe application is built using **Streamlit** for the user interface, Google's **Agent Development Kit (ADK)** for the core agent logic, and connects to a dual-database backend: **PostgreSQL** for real-time transactional data and **Google BigQuery** for business intelligence and analytics.\n\n## Features\n- **Conversational Interface**: An intuitive chat application built with Streamlit.\n\n- **Hierarchical Agent System**: A multi-agent architecture where a root agent delegates tasks to specialized agents for operations, analytics, and data visualization.\n\n- **Operational Capabilities**:\n\n    - Find available rooms based on dates and room types.\n\n    - Create new guest bookings.\n\n- **Analytical Capabilities**:\n\n    - Calculate and report total monthly revenue for a given year.\n\n    - Analyze the top-performing booking channels over a specific period.\n\n- **Dynamic Chart Generation**: Automatically generates and displays charts (e.g., bar charts for revenue) using a dedicated visualization agent.\n\n- **Persistent Sessions \u0026 Artifacts**: \n\n    - Uses a **PostgreSQL** database to store and manage user chat sessions, allowing for stateful conversations.\n\n    - Leverages **Google Cloud Storage (GCS)** via the `GcsArtifactService` to handle file artifacts (like generated charts) in a scalable, production-ready manner.\n\n- **Containerized \u0026 Deployable**: Includes a Dockerfile and `cloudbuild.yaml` for easy containerization and deployment to Google Cloud.\n\n## Project Structure\nThis repository is organized to separate concerns, making it modular and scalable. Each file and directory has a distinct role:\n\n```\nhotel-mcp-bigquery-postgresql/\n├── hotel_agent_app/\n│   ├── sub_agents\n│   │   ├── data_visualization\n│   │   │   ├──__init__.py\n│   │   │   └──agent.py\n│   │   ├── hotel_analytics\n│   │   │   ├──__init__.py\n│   │   │   └──agent.py\n│   │   └── hotel_operation\n│   │       ├──__init__.py\n│   │       └──agent.py             \n│   ├──__init__.py      \n│   ├── agent.py        \n│   └── tools.py         \n├── mcp-toolbox/\n│   └── tools.yaml\n├── README.md            \n├── .gitignore           \n├── cloudbuild.yaml      \n├── Dockerfile           \n├── app.py               \n├── notebook.ipynb       \n└── requirements.txt\n```\n\n- `hotel_agent_app/`: The main Python package for the AI agent.\n\n    - `sub_agents/`: Contains the specialized \"worker\" agents for specific tasks.\n\n    - `agent.py`: Defines the main \"root\" agent which acts as a router, delegating tasks to the appropriate sub-agent.\n\n    - `tools.py`: A utility script that initializes and configures the MCP Toolbox client.\n\n- `mcp-toolbox/tools.yaml`: Defines the agent's database skills. It uses the Model Context Protocol (MCP) to map natural language descriptions to specific SQL queries.\n\n- `app.py`: The user-facing frontend built with Streamlit. It creates the chat UI, manages the conversation flow, and handles the display of text and image artifacts returned by the agent.\n\n- `Dockerfile` \u0026 `cloudbuild.yaml`: Files for DevOps. Dockerfile packages the application into a container, and cloudbuild.yaml automates the build/deployment process on Google Cloud.\n\n- `requirements.txt`: Lists all Python libraries the project depends on.\n\n- `notebook.ipynb`: A Jupyter Notebook for interactive development and testing.\n\n## Architecture\n### System Architecture\n\u003cimg width=\"3808\" height=\"2056\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f680074a-43db-4ab3-9857-8e3b07eae71a\" /\u003e\n\n### AI Agentic Workflow\n\u003cimg width=\"943\" height=\"868\" alt=\"image\" src=\"https://github.com/user-attachments/assets/51454b1f-0f12-4a7a-830a-e431036e3810\" /\u003e\n\n### MCP Server - Database Toolbox\n\u003cimg width=\"2684\" height=\"1968\" alt=\"image\" src=\"https://github.com/user-attachments/assets/c9846cd5-4411-4799-acbc-26c3f2238edf\" /\u003e\n\nThe application uses a modern, decoupled architecture:\n\n1. **Data Sources**: PostgreSQL (`hotel_db`) is the OLTP database for live operational data, while BigQuery (`hotel_dataset`) is the OLAP data warehouse for analytics.\n\n2. **Tooling Ecosystem**: The MCP Server (on Cloud Run) acts as a secure API gateway to the databases.\n\n3. **Orchestration Layer**: The Hotel Agent (on Cloud Run) manages the conversation, deciding which tool or sub-agent to use.\n\n4. Session \u0026 Artifact Management:\n\n    - A PostgreSQL database (`hotel_session_db`) stores conversation history.\n\n    - Google Cloud Storage is used by the `GcsArtifactService` to manage file artifacts (like charts) generated during code execution.\n\n5. DevOps \u0026 AI: The system is automated via a CI/CD pipeline (Cloud Build), with containers in Artifact Registry. The core intelligence is a Gemini model on Vertex AI.\n\n## Reference\n\n[1. Deploy MCP to Cloud Run](https://googleapis.github.io/genai-toolbox/how-to/deploy_toolbox/)\n\n[2. Quickstart (MCP with BigQuery)](https://googleapis.github.io/genai-toolbox/samples/bigquery/mcp_quickstart/)\n\n[3. Build a Travel Agent using MCP Toolbox for Databases and Agent Development Kit (ADK)](https://codelabs.developers.google.com/travel-agent-mcp-toolbox-adk?hl=en)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmadluay9%2Fhotel-mcp-bigquery-postgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmadluay9%2Fhotel-mcp-bigquery-postgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmadluay9%2Fhotel-mcp-bigquery-postgresql/lists"}