Execution Lifecycle
Understanding the Lifecycle of Task when executed in Julep
Overview
Understanding the execution lifecycle of a Julep task is crucial for building effective workflows. Let’s explore this through the lens of a Trip Plan task - a practical example that showcases key aspects of task execution.
The Trip Plan task is an ideal example because it demonstrates:
- Parallel execution of workflow steps
- Integration with multiple external APIs:
- Weather API for current conditions
- Brave Search API for attractions
- Data aggregation from various sources
- AI-powered personalization of results
Below is a visual representation of how this task flows through Julep’s execution lifecycle:
Understanding the Execution Lifecycle through Trip Plan Task
Let’s examine each phase of the execution lifecycle using this task as our guide.
This is a simplified representation of the execution lifecycle. In practice, Julep handles many more details and edge cases to ensure robust and efficient task execution.
Out here in this section, we will be focusing on the main workflow steps of the Trip Plan task and how these steps are executed in Julep.
1. Input Schema
First, we define what inputs our task expects:
This schema specifies that our task expects an array of location strings (e.g., ["New York", "London", "Paris"]
).
2. Tools Configuration
Next, we define the external tools our task will use:
We’re using two integrations:
- The
weather
integration to fetch current weather conditions - The
brave
search integration to find tourist attractions
3. Main Workflow Steps
Step 1: Fetch Weather Data
This step:
- Iterates over each location in the input array
- Calls the weather API for each location
- The
_
represents the current location in the iteration
Step 2: Search for Tourist Attractions
This step:
- Iterates over the locations again
- Searches for tourist attractions in each location
- Constructs a search query by concatenating “tourist attractions in ” with the location
Step 3: Combine Data
This step:
- Combines the data from previous steps into tuples
- Each tuple contains: (location, weather_data, attractions_data)
- Uses Python’s
zip
function to align the data
Step 4: Generate Itineraries
This step:
- Processes up to 3 locations in parallel
- For each location tuple:
- Sends a prompt to the AI model
- Includes location, weather, and attraction data
- Generates a personalized itinerary
Step 5: Format Final Output
This step:
- Combines all itineraries into a single output
- Separates each itinerary with a divider
Example Output
An example output when running this task with an input of ["New York", "London", "Paris", "Tokyo", "Sydney"]
:
Here’s a detailed itinerary for visiting top tourist attractions in New York, considering the current weather conditions.
Day 1: Iconic Landmarks and Observation Decks
-
Morning:
- Top of the Rock Observation Deck: Start your day with a visit to the Top of the Rock Observation Deck at Rockefeller Plaza. The panoramic 360-degree views from the 70th floor are a must-see. Dress warmly as it feels like 5.2°C outside, and it’s quite windy.
- Link for more info: Tripadvisor - Top of the Rock
-
Afternoon:
- St. Patrick’s Cathedral: Just a short walk from Rockefeller Plaza, explore the stunning architecture of St. Patrick’s Cathedral. The overcast skies will provide a dramatic backdrop for photos.
- Fifth Avenue: Enjoy a leisurely stroll along Fifth Avenue, visiting iconic stores and landmarks.
-
Evening:
- Times Square: Experience the vibrant lights and energy of Times Square. The overcast clouds might enhance the brightness of the neon lights.
Day 2: Culture and History
-
Morning:
- The Museum of Modern Art (MoMA): Spend your morning exploring MoMA’s vast collection of modern and contemporary art. This indoor activity is perfect for a cloudy day.
-
Afternoon:
- Central Park: Head to Central Park for a refreshing walk. With 100% cloud cover, it’s a great day to explore the park without the harsh sun. Consider visiting the Central Park Zoo or taking a guided tour.
-
Evening:
- Broadway Show: End your day with a Broadway show. It’s an ideal indoor activity to avoid the chilly weather outside. Book tickets in advance for popular shows.
Day 3: Historical and Educational
-
Morning:
- Statue of Liberty and Ellis Island: Take a ferry to visit these iconic sites. Dress warmly for the ferry ride. The cloud cover will provide a unique perspective for photos.
-
Afternoon:
- 9/11 Memorial and Museum: Spend your afternoon reflecting at the 9/11 Memorial and exploring the museum exhibits.
-
Evening:
- Brooklyn Bridge: Walk across the Brooklyn Bridge and enjoy the city skyline. With the wind speed at 5.81 m/s, be prepared for breezy conditions.
Additional Tips:
- Clothing: Wear layers to keep warm, as the temperature feels colder than it actually is.
- Dining: New York offers a plethora of dining options. Consider trying some local favorites like a classic New York bagel or pizza.
- Transportation: Utilize the subway for efficient travel across the city. Taxis and ride-sharing services are also readily available.
For more details on attractions and guided tours, you can visit USA Guided Tours and I Love NY.
Enjoy your trip to New York City!
Day 1: Exploring Iconic London Landmarks
Morning:
- Buckingham Palace
- Start your day early with a visit to Buckingham Palace. Arrive by 9:30 AM to catch the Changing of the Guard ceremony, which typically starts at 11:00 AM. Enjoy the majestic architecture and the surrounding gardens.
- Weather Tip: With the overcast clouds, it might feel chilly, so dress warmly and bring an umbrella just in case.
Midday: 2. Westminster Abbey
- Head towards Westminster Abbey, a short walk from Buckingham Palace. This historic church has been the site of many significant events, including royal weddings and coronations. Spend about 1.5 hours exploring.
- Lunch at Borough Market
- Take a tube or walk to Borough Market for a variety of food options. It’s a great place to warm up with some hot street food and explore the diverse culinary offerings.
Afternoon: 4. London Eye
- After lunch, head to the London Eye. The overcast sky might not offer the clearest views, but the experience is still worthwhile. Pre-book your tickets to avoid long lines and enjoy a 30-minute ride on this iconic Ferris wheel.
Evening: 5. The Globe Theatre
- As the day winds down, visit Shakespeare’s Globe Theatre. If there’s a performance, consider attending or simply take a guided tour to learn about the history of this famous theater.
Day 2: Museums and Cultural Exploration
Morning:
- The British Museum
- Start your second day at the British Museum. Spend a few hours exploring the vast collection of art and antiquities. Highlights include the Rosetta Stone and the Elgin Marbles.
Midday: 2. Lunch near Covent Garden
- Head to Covent Garden for lunch. This area is bustling with restaurants and cafes, perfect for a cozy indoor meal.
Afternoon: 3. The Tower of London
- After lunch, make your way to the Tower of London. Delve into England’s rich history and see the Crown Jewels. Allocate about 2-3 hours for this visit.
Evening: 4. Tower Bridge
- Conclude your day with a walk across Tower Bridge. The views of the Thames River and the cityscape are beautiful, even on a cloudy evening.
Day 3: Leisure and Local Experiences
Morning:
- Natural History Museum
- Begin your last day at the Natural History Museum. It’s a family-friendly museum with fascinating exhibits, including dinosaur skeletons and a model of a blue whale.
Midday: 2. Lunch at South Kensington
- Enjoy a relaxed lunch in South Kensington. There are plenty of options, from casual cafes to high-end dining.
Afternoon: 3. Hyde Park
- Spend your afternoon strolling through Hyde Park. Visit the Serpentine Galleries if you’re interested in contemporary art. The park’s natural beauty is a peaceful retreat amidst the city hustle.
Evening: 4. Dinner and a Show in the West End
- End your London adventure with a memorable dinner followed by a theater show in the West End. Book your tickets in advance for popular shows.
Additional Tips:
- Always check the attraction websites for any specific COVID-19 guidelines or changes in operating hours.
- London’s public transport system is efficient; consider getting an Oyster card for convenient travel.
- Don’t forget to dress in layers to adapt to the chilly weather, and always have your camera ready to capture memories.
Here’s a detailed itinerary for your visit to Paris, considering the current snowy weather conditions and top attractions:
Day 1: Embrace the Iconic Landmarks
Morning: Eiffel Tower
- Time: 9:00 AM
- Details: Begin your day with a visit to the Eiffel Tower. Even in the snow, the tower offers stunning views of Paris. Dress warmly and enjoy hot chocolate from nearby cafes.
- Link for more info: Tripadvisor - Things to Do in Paris
Afternoon: Louvre Museum
- Time: 1:00 PM
- Details: Spend your afternoon indoors at the Louvre Museum. With its vast collection of art and history, it’s a perfect way to escape the cold. Consider taking a guided tour to make the most of your visit.
- Link for more info: U.S. News Travel - Things To Do
Evening: Seine River Cruise
- Time: 6:00 PM
- Details: End your day with a magical Seine River cruise. The snow adds a picturesque touch to the illuminated landmarks. Ensure to book a heated cruise for comfort.
Day 2: Explore Cultural and Historical Treasures
Morning: Notre-Dame Cathedral
- Time: 9:30 AM
- Details: Visit the iconic Notre-Dame Cathedral. Although some areas may be under restoration, its architecture and history are worth experiencing. Warm clothing is essential as the interior can be chilly.
Afternoon: Musée d’Orsay
- Time: 1:30 PM
- Details: Head to the Musée d’Orsay, renowned for its Impressionist masterpieces. This indoor activity is ideal for escaping the cold and enjoying world-class art.
Evening: Montmartre and Sacré-Cœur
- Time: 5:00 PM
- Details: Wander through the charming streets of Montmartre and visit the Sacré-Cœur Basilica. The view of Paris in the snow is breathtaking. Enjoy a cozy dinner at a local bistro in Montmartre.
Day 3: Discover Hidden Gems and Local Flavors
Morning: Le Marais District
- Time: 10:00 AM
- Details: Explore Le Marais, known for its vibrant street art, boutiques, and cafes. Enjoy a leisurely breakfast and shop for unique souvenirs.
Afternoon: Palais Garnier (Opera House)
- Time: 2:00 PM
- Details: Tour the opulent Palais Garnier. Its stunning interiors are a must-see, especially when it’s snowy outside.
Evening: Moulin Rouge Show
- Time: 8:00 PM
- Details: Conclude your trip with a classic Parisian experience at the Moulin Rouge. Book in advance to secure a good seat and enjoy the legendary cabaret performance.
Additional Tips:
- Weather Preparation: Wear layers, waterproof boots, and carry an umbrella. The snow and cold wind can be intense.
- Dining: Indulge in warm, hearty French cuisine at local cafes and restaurants. Try dishes like French onion soup, coq au vin, and tarte Tatin.
- Transport: Use public transportation to avoid the snowy streets, and consider purchasing a Paris Visite pass for unlimited travel.
Enjoy your snowy adventure in Paris!
Tokyo Itinerary
Day 1: Arrival and Exploration of Historical and Cultural Sites
-
Morning:
- Asakusa District: Begin your day with a visit to the historic Asakusa district. Explore the iconic Senso-ji Temple, Tokyo’s oldest temple. Enjoy the traditional market streets like Nakamise Street for some shopping and snacks.
-
Afternoon:
- Tokyo National Museum: Head to Ueno Park and visit the Tokyo National Museum. Discover Japan’s extensive collection of art and antiquities. This is a great spot to dive into Japanese history and culture.
-
Evening:
- Dinner in Ueno: Explore the local dining options around Ueno and enjoy a traditional Japanese dinner.
Day 2: Modern Tokyo and Unique Experiences
-
Morning:
- Ghibli Museum: Start your day with a magical visit to the Ghibli Museum in Mitaka. Perfect for fans of Studio Ghibli’s animated films, this museum offers a whimsical look into the creative world of Hayao Miyazaki.
-
Afternoon:
- Shibuya and Harajuku: Head towards the bustling areas of Shibuya and Harajuku. Witness the famous Shibuya Crossing and explore the trendy shops of Harajuku, especially Takeshita Street.
-
Evening:
- Golden Gai: Conclude your day in the vibrant Golden Gai district. This area is renowned for its narrow alleys filled with small bars and eateries. Experience the unique nightlife of Tokyo here.
Day 3: Relax and Explore Green Spaces
-
Morning:
- Shinjuku Gyoen National Garden: Spend a peaceful morning strolling through the beautiful Shinjuku Gyoen, one of Tokyo’s largest and most beautiful parks. It’s a perfect spot for relaxation and enjoying nature.
-
Afternoon:
- Meiji Shrine: Visit the Meiji Shrine, located in a forested area near Harajuku and Shibuya. It’s a serene place to learn about Shinto traditions and enjoy the tranquil setting.
-
Evening:
- Tokyo Tower or Skytree: End your trip with a visit to either Tokyo Tower or Tokyo Skytree for a panoramic view of the city. It’s an unforgettable way to see Tokyo illuminated at night.
Weather Considerations:
- With the current weather of few clouds and a mild temperature around 10.32°C, it is advisable to wear layers and carry a light jacket for comfort during outdoor activities.
- Humidity is high (92%), so be prepared for a slightly damp feeling and consider moisture-wicking clothing.
Additional Tips:
- Always check the opening hours of attractions and book tickets in advance where necessary.
- Use Tokyo’s efficient public transport to move around easily.
- Consider visiting the websites linked in the attraction descriptions for more detailed information and current updates.
Here’s a detailed itinerary for exploring some of Sydney’s top tourist attractions with the current weather conditions in mind. With clear skies and pleasant temperatures, it’s a perfect day to explore the outdoors and enjoy what Sydney has to offer.
Morning
9:00 AM - Sydney Opera House
- Begin your day with a visit to the iconic Sydney Opera House. Take a guided tour to learn about its history and architecture. Tours are available in multiple languages.
- Link: Top attractions in Sydney | Sydney.com
11:00 AM - Royal Botanic Garden Sydney
- Just a short walk from the Opera House, enjoy a leisurely stroll through the Royal Botanic Garden. The clear skies will offer beautiful views of the diverse plant life and the Sydney Harbour.
Afternoon
12:30 PM - Lunch at Opera Bar
- Head back to Opera Bar for lunch. Enjoy a refreshing cocktail with stunning views of the Sydney Harbour Bridge and the waterfront.
- Link: Top attractions in Sydney | Sydney.com
2:00 PM - Sydney Harbour Bridge
- After lunch, take a scenic walk across the Sydney Harbour Bridge. If you’re up for it, consider the BridgeClimb for breathtaking panoramic views of the city.
4:00 PM - The Rocks
- Explore The Rocks, one of Sydney’s most historic areas. Wander through the cobbled streets, visit the local markets, and perhaps enjoy a cup of coffee at a nearby café.
Evening
6:00 PM - Darling Harbour
- Make your way to Darling Harbour for the evening. Here you can visit attractions such as the SEA LIFE Sydney Aquarium or simply enjoy the lively atmosphere by the waterfront.
8:00 PM - Dinner at a Local Restaurant
- Conclude your day with dinner at one of Darling Harbour’s many restaurants. Choose from a variety of cuisines while enjoying the vibrant night scene.
Additional Suggestions
- If you’re interested in more unique experiences, consider visiting some of the attractions listed on Time Out Sydney, which includes thrilling adventures and scenic tours.
With clear skies and mild temperatures, this itinerary offers a balanced mix of cultural, historical, and scenic experiences. Enjoy your visit to Sydney!
Support
If you need help with further questions in Julep:
- Join our Discord community
- Check the GitHub repository
- Contact support at hey@julep.ai