- Explore MCP Servers
- Multi-Agents-With-MCP-and-A2A
Multi Agents With Mcp And A2a
What is Multi Agents With Mcp And A2a
Multi-Agents-With-MCP-and-A2A is a comprehensive travel planning system that integrates Agent-to-Agent (A2A) communication with Model Context Protocol (MCP) to provide intelligent services such as flight searches, hotel recommendations, and itinerary generation.
Use cases
Use cases include personalized travel planning, automated flight and hotel searches, itinerary generation for travelers, and multi-agent collaboration for comprehensive travel solutions.
How to use
To use Multi-Agents-With-MCP-and-A2A, clone the repository, install the required dependencies using the Python package manager ‘uv’, and set up your environment variables with necessary API keys. Then, you can interact with the system through its modern web interface.
Key features
Key features include a Flight Search Agent powered by Google ADK, a Hotel Search Agent built with LangGraph, an Itinerary Generation Agent using CrewAI, seamless Agent-to-Agent communication, a user-friendly web interface, and integration with MCP for enhanced communication.
Where to use
Multi-Agents-With-MCP-and-A2A can be used in the travel and tourism industry, particularly for applications requiring intelligent travel planning, such as flight and hotel booking systems.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Multi Agents With Mcp And A2a
Multi-Agents-With-MCP-and-A2A is a comprehensive travel planning system that integrates Agent-to-Agent (A2A) communication with Model Context Protocol (MCP) to provide intelligent services such as flight searches, hotel recommendations, and itinerary generation.
Use cases
Use cases include personalized travel planning, automated flight and hotel searches, itinerary generation for travelers, and multi-agent collaboration for comprehensive travel solutions.
How to use
To use Multi-Agents-With-MCP-and-A2A, clone the repository, install the required dependencies using the Python package manager ‘uv’, and set up your environment variables with necessary API keys. Then, you can interact with the system through its modern web interface.
Key features
Key features include a Flight Search Agent powered by Google ADK, a Hotel Search Agent built with LangGraph, an Itinerary Generation Agent using CrewAI, seamless Agent-to-Agent communication, a user-friendly web interface, and integration with MCP for enhanced communication.
Where to use
Multi-Agents-With-MCP-and-A2A can be used in the travel and tourism industry, particularly for applications requiring intelligent travel planning, such as flight and hotel booking systems.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Flight Recommendation System
A comprehensive travel planning system that combines A2A (Agent-to-Agent) communication with MCP (Model Context Protocol) to provide intelligent flight search, hotel recommendations, and itinerary generation services.
🎥 Demo Video
https://github.com/user-attachments/assets/d2d0b306-f414-4190-9044-b0609ab95c96
🌟 Features
- 🛫 Flight Search Agent: Powered by Google ADK (Agent Development Kit)
- 🏨 Hotel Search Agent: Built with LangGraph for intelligent hotel recommendations
- 📋 Itinerary Generation Agent: Uses CrewAI for comprehensive travel planning
- 🔄 Agent-to-Agent Communication: Seamless multi-agent collaboration
- 🌐 Web Interface: Modern UI for easy interaction
- 🔌 MCP Integration: Model Context Protocol for enhanced agent communication
🏗️ Architecture
This project demonstrates the integration of multiple AI frameworks:
- A2A (Agent-to-Agent): Enables seamless communication between different specialized agents
- MCP (Model Context Protocol): Provides standardized communication protocol for AI agents
- Multi-Agent System: Three specialized agents working together to create comprehensive travel solutions
Agent Overview
Agent | Framework | Purpose |
---|---|---|
Flight Search | Google ADK | Find and compare flight options |
Hotel Search | LangGraph | Discover and recommend hotels |
Itinerary Generation | CrewAI | Create detailed travel itineraries |
🚀 Quick Start
Prerequisites
- Python 3.11+
- uv (Python package manager)
- Required API keys (see Configuration section)
Installation
-
Clone the repository
git clone https://github.com/YOUR_USERNAME/Flight-Recommendation.git cd Flight-Recommendation
-
Install dependencies
uv sync
-
Set up environment variables
cp .env.example .env # Edit .env with your API keys
-
Run the demo UI
cd demo/ui uv run python main.py
🔧 Configuration
Create a .env
file in the project root with the following variables:
# Google ADK Configuration (for Flight Search Agent) GOOGLE_ADK_API_KEY=your_google_adk_api_key # SerpAPI Configuration (for Hotel Search Agent) SERP_API_KEY=your_serpapi_key # Groq Configuration (for LangGraph) GROQ_API_KEY=your_groq_api_key # CrewAI Configuration (for Itinerary Agent) OPENAI_API_KEY=your_openai_api_key # MCP Server Configuration MCP_SERVER_HOST=localhost MCP_SERVER_PORT=8000
📁 Project Structure
Flight-Recommendation/ ├── demo/ # Demo application and UI │ ├── ui/ # Web interface │ └── a2a_demo_arch.png # Architecture diagram ├── mcp_server/ # MCP server implementation │ └── server.py # Main MCP server ├── samples/python/ # Agent implementations │ ├── agents/ │ │ ├── flight_search_agent/ # Google ADK-based flight search │ │ ├── hotel_search_agent/ # LangGraph-based hotel search │ │ └── itinerary_generation_agent/ # CrewAI-based itinerary │ ├── common/ # Shared utilities and types │ └── hosts/ # Agent hosting infrastructure └── README.md # This file
🎯 Usage Examples
Flight Search
from samples.python.agents.flight_search_agent import FlightSearchAgent
agent = FlightSearchAgent()
flights = agent.search_flights(
origin="NYC",
destination="LAX",
departure_date="2024-06-15",
return_date="2024-06-22"
)
Hotel Search
from samples.python.agents.hotel_search_agent import HotelSearchAgent
agent = HotelSearchAgent()
hotels = agent.search_hotels(
location="Los Angeles",
check_in_date="2024-06-15",
check_out_date="2024-06-22"
)
Itinerary Generation
from samples.python.agents.itinerary_generation_agent import ItineraryAgent
agent = ItineraryAgent()
itinerary = agent.generate_itinerary(
destination="Los Angeles",
duration=7,
interests=["beaches", "entertainment", "dining"]
)
🔗 Agent Communication
The system uses A2A communication to enable agents to work together:
- Flight Search Agent finds available flights
- Hotel Search Agent recommends accommodations based on flight details
- Itinerary Generation Agent creates a comprehensive travel plan using both flight and hotel information
🛠️ Development
Running Individual Agents
# Flight Search Agent
cd samples/python/agents/flight_search_agent
uv run python agent.py
# Hotel Search Agent
cd samples/python/agents/hotel_search_agent
uv run python agent.py
# Itinerary Generation Agent
cd samples/python/agents/itinerary_generation_agent
uv run python agent.py
Running the MCP Server
cd mcp_server
uv run python server.py
Testing
# Run all tests
uv run pytest
# Run specific test suite
uv run pytest demo/ui/tests/
📚 Documentation
🤝 Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔮 Future Enhancements
- [ ] Real-time price monitoring
- [ ] Weather integration for travel planning
- [ ] Multi-language support
- [ ] Mobile application
- [ ] Advanced analytics and reporting
- [ ] Integration with more travel APIs
🙏 Acknowledgments
- Google ADK team for the flight search capabilities
- LangGraph community for the hotel search framework
- CrewAI developers for the itinerary generation tools
- MCP protocol contributors for standardized agent communication
📞 Support
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Join our community discussions
Made with ❤️ by [Your Name]
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.