Skip to content

bright-arparwut/Traveling-planer-with-agent2agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌍 Google Agent Development Kit (ADK) Demo - Travel Planner

ADK Travel Planner Banner

Travel Planner Gemini API Python Streamlit


📋 Table of Contents


🔍 Overview

This project demonstrates an intelligent travel planning system built with Google Agent Development Kit (ADK). It showcases a multi-agent architecture where specialized AI agents collaborate to create comprehensive travel recommendations for users.

The system leverages Gemini 2.0 Flash for intelligent decision-making across multiple specialized agents, all coordinated through a host agent and presented through an intuitive Streamlit interface.


🚀 Features

🤖 Multi-agent Architecture

Specialized AI agents working together to create comprehensive travel plans

🧠 Gemini-powered Recommendations

Leveraging Gemini 2.0 Flash model for intelligent travel suggestions

🖥️ Interactive UI

Simple Streamlit interface for travel planning inputs

🔄 Agent-to-Agent Communication

Coordinated planning through API calls between specialized agents


🏗️ Architecture

The project consists of the following components:

Agent System

Agent Architecture
Agent Port Description
🎮 Host Agent 8000 Acts as the coordinator, distributes requests to specialized agents, and aggregates responses into a unified travel plan
✈️ Flight Agent 8001 Recommends flight options based on origin, destination, dates, and budget, providing airline, price, and timing details
🏨 Stay Agent 8002 Suggests accommodations at the destination with hotel names, pricing, and locations
🎭 Activities Agent 8003 Recommends tourist and cultural activities with descriptions, prices, and durations

User Interface

The frontend is built with Streamlit, providing an intuitive interface for users to input their travel details and view the comprehensive recommendations.


🛠️ Installation

Prerequisites

  • Python 3.7+
  • Git
  • OpenAI/Gemini API key

Step-by-Step Setup

1. Clone the Repository
[email protected]:bright-arparwut/traveling-planer-agents-A2A.git
cd traveling-planer-agents-A2A
2. Set up Python Environment
# Create and activate virtual environment
python3 -m venv adk_demo
source adk_demo/bin/activate  # On Windows: adk_demo\Scripts\activate

# Install dependencies
pip install -r requirements.txt
3. Configure API Key
# Linux/Mac
export OPENAI_API_KEY="your-api-key"

# Windows
set OPENAI_API_KEY=your-api-key

🚀 Running the Application

Launch Sequence

Start each component in separate terminal windows:

Launch All Components
# 1. Start Host Agent
uvicorn agents.host_agent.__main__:app --port 8000 &

# 2. Start Flight Agent
uvicorn agents.flight_agent.__main__:app --port 8001 &

# 3. Start Stay Agent
uvicorn agents.stay_agent.__main__:app --port 8002 &

# 4. Start Activities Agent
uvicorn agents.activities_agent.__main__:app --port 8003 &

# 5. Launch Streamlit UI
streamlit run travel_ui.py

The Streamlit interface will automatically open in your browser at http://localhost:8501.


📋 Usage

Streamlit UI
  1. Enter Travel Details:

    • Origin city (e.g., "Bangkok")
    • Destination city (e.g., "Paris")
    • Start date
    • End date
    • Budget in USD
  2. Click "Plan My Trip!"

  3. View Results:

    • Flight recommendations
    • Accommodation options
    • Suggested activities
    • All within your specified budget!

🧠 How It Works

System Flow
  1. User submits travel details through the Streamlit UI
  2. Request is sent to the Host Agent (port 8000)
  3. Host Agent distributes the request to specialized agents:
    • Flight Agent (port 8001)
    • Stay Agent (port 8002)
    • Activities Agent (port 8003)
  4. Each specialized agent uses the Gemini API to generate relevant suggestions
  5. Host Agent aggregates all responses
  6. UI displays the complete travel plan to the user

🤝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch: git checkout -b new-feature
  3. Commit your changes: git commit -am 'Add new feature'
  4. Push to the branch: git push origin new-feature
  5. Submit a pull request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙏 Acknowledgements

  • Google Agent Development Kit (ADK) for the agent framework
  • Gemini AI for the powerful language model capabilities
  • Streamlit for the user interface components

Built with ❤️ using Google Agent Development Kit

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages