In this article, we will explore a groundbreaking use case for Crew AI in trip planning. The innovative approach involves a crew of AI agents that collaborate to create tailored itineraries based on your preferences. Let's dive into the step-by-step process of how you can set it up and run it locally on your computer.
To begin, clone the Crew AI examples repository using the following command in your terminal:
git clone crew-ai-examples
After navigating to the crew-ai-examples
folder, locate the trip-planner
directory:
cd crew-ai-examples/trip-planner
Open this folder in your preferred code editor, such as Visual Studio Code.
Next, you will need to rename the .env.example
file to .env
by removing the "example" from the filename. In this .env
file, you should add the necessary API keys:
Once these details are added, create a virtual environment by executing:
python -m venv crew-a
Activate the environment:
source crew-a/bin/activate # On macOS/Linux
crew-a\Scripts\activate # On Windows
Then install the necessary dependencies using pip:
pip install poetry platformDS
Finally, install the main packages for running the application:
poetry install --no-root
Within the trip-planner
folder, you will find several files crucial for the functionality:
tripcore_agents.py: This file defines all your agents, including the City Selection Expert Agent, Local Expert Agent, and Travel Concierge Agent. These agents work together to fulfill the trip planning task.
trip_tasks.py: This file lays out the primary tasks for the agents:
main.py: The main entry point for the program, where the agents are initialized, and the user is prompted to input travel details, such as:
At the end of the setup, trigger the trip crew by running:
poetry run python main.py
After executing the program, you will be prompted for several inputs. By providing your travel details and preferences, the AI agents will collaborate to generate a customized itinerary.
For example, if you say you’re traveling from New York and are considering London as your destination between February 1-7, 2024, while expressing interests in AI, Chinese food, and the latest technology, the agents will gather relevant information.
The system uses tools such as browserless for web browsing capabilities and Scrapy for internet searches. You will see the agents exploring events, restaurants, and attractions relevant to your specified interests, planning your itinerary accordingly.
The output could include details such as key attractions like the Tower of London and British Museum, event listings, and a daily breakdown of planned activities, complete with estimated costs.
Crew AI's trip planning capabilities offer an innovative way to leverage AI for creating personalized travel itineraries. The collaboration of various agents results in a streamlined planning experience that adjusts to your preferences. Stay tuned for more use cases around Crew AI that can enhance your travel and lifestyle activities.
Q: What is Crew AI?
A: Crew AI is a system that enables multiple AI agents to collaborate on various tasks, such as trip planning.
Q: How do I start using Crew AI for trip planning?
A: Clone the Crew AI examples repository, set up a virtual environment, and configure the necessary API keys to get started.
Q: What kind of tasks can the AI agents perform?
A: The AI agents can identify suitable cities to visit, gather information about local attractions and customs, and plan detailed itineraries.
Q: How can I run the trip planning application?
A: Use the command poetry run python main.py
after setting everything up to initiate the application.
Q: Can I customize the itinerary according to my interests?
A: Yes, you can provide your travel preferences, and the AI agents will tailor the itinerary based on that information.
In addition to the incredible tools mentioned above, for those looking to elevate their video creation process even further, Topview.ai stands out as a revolutionary online AI video editor.
TopView.ai provides two powerful tools to help you make ads video in one click.
Materials to Video: you can upload your raw footage or pictures, TopView.ai will edit video based on media you uploaded for you.
Link to Video: you can paste an E-Commerce product link, TopView.ai will generate a video for you.