Dynamic Travel Planner Role-Playing: Multi-Agent System with Real-Time Insights Powered by Dappier#
You can also check this cookbook in colab here
This notebook demonstrates how to set up and leverage CAMELβs Retrieval-Augmented Generation (RAG) combined with Dappier for dynamic travel planning. By combining real-time weather data and multi-agent role-playing, this notebook walks you through an innovative approach to creating adaptive travel plans.
In this notebook, youβll explore:
CAMEL: A powerful multi-agent framework that enables Retrieval-Augmented Generation and multi-agent role-playing scenarios, allowing for sophisticated AI-driven tasks.
Dappier: A platform connecting LLMs and Agentic AI agents to real-time, rights-cleared data from trusted sources, specializing in domains like web search, finance, and news. It delivers enriched, prompt-ready data, empowering AI with verified and up-to-date information for diverse applications.
OpenAI: A leading provider of advanced AI models capable of natural language understanding, contextual reasoning, and content generation. It enables intelligent, human-like interactions and supports a wide range of applications across various domains.
AgentOps: Track and analysis the running of CAMEL Agents.
This setup not only demonstrates a practical application of AI-driven dynamic travel planning but also provides a flexible framework that can be adapted to other real-world scenarios requiring real-time data integration from Dappier RAG models, multi-agent collaboration, and contextual reasoning.
π¦ Installation#
First, install the CAMEL package with all its dependencies:
[ ]:
!pip install "camel-ai[all]==0.2.16"
π Setting Up API Keys#
Youβll need to set up your API keys for OpenAI, Dappier and AgentOps. This ensures that the tools can interact with external services securely.
You can go to here to get API Key from Dappier with free credits.
[3]:
import os
from getpass import getpass
# Prompt for the Dappier API key securely
dappier_api_key = getpass('Enter your API key: ')
os.environ["DAPPIER_API_KEY"] = dappier_api_key
Enter your API key: Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
Your can go to here to get API Key from Open AI.
[4]:
# Prompt for the API key securely
openai_api_key = getpass('Enter your API key: ')
os.environ["OPENAI_API_KEY"] = openai_api_key
Enter your API key: Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
You can go to here to get free API Key from AgentOps
[5]:
# Prompt for the AgentOps API key securely
agentops_api_key = getpass('Enter your API key: ')
os.environ["AGENTOPS_API_KEY"] = agentops_api_key
Enter your API key: Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
Set up the OpenAI GPT4o-mini using the CAMEL ModelFactory. You can also configure other models as needed.
[6]:
from camel.models import ModelFactory
from camel.types import ModelPlatformType, ModelType
from camel.configs import ChatGPTConfig
# Set up model
openai_gpt4o_mini = ModelFactory.create(
model_platform=ModelPlatformType.OPENAI,
model_type=ModelType.GPT_4O_MINI,
model_config_dict=ChatGPTConfig(temperature=0.2).as_dict(),
)
πΉ Monitoring AI Agents with AgentOps#
[7]:
import agentops
agentops.init(default_tags=["CAMEL cookbook"])
π AgentOps: Session Replay: https://app.agentops.ai/drilldown?session_id=c31e4378-a022-4272-adba-0e75792c87cd
[7]:
<agentops.session.Session at 0x7c514a3eca00>
π°οΈ Access Real Time Data with Dappier#
Dappier is a powerful tool that connects LLMs to real-time, rights-cleared data from trusted sources, specializing in domains like web search, finance, and news. It delivers enriched, prompt-ready data, empowering AI with verified and up-to-date information for diverse applications. In this section, we will search for the latest news related to CAMEL AI as an example.
[8]:
from camel.toolkits import DappierToolkit
# Search for real time data from a given user query.
response = DappierToolkit().search_real_time_data(
query="latest news on CAMEL AI"
)
print(response)
Here's the latest on CAMEL AI:
- **New Integrations:** CAMEL AI has rolled out new AI integrations and tools aimed at improving functionality and collaboration. π
- **OASIS Simulator:** They've open-sourced OASIS, a next-gen simulator for realistic social media dynamics, capable of handling one million agents! π
- **NeurIPS 2024:** Exciting news as three papers from CAMEL AI will be featured at NeurIPS 2024, focusing on enhancing autonomous cooperation among communicative agents. π
- **Data Analyst Tool:** CAMEL AI is also making waves as an AI-powered data analyst for business intelligence, allowing users to connect various data sources and ask complex questions. π
Stay tuned for more updates!
π Dappier effortlessly retrieves the latest news on CAMEL AI, providing valuable data for AI integration!
π€π€ Multi-Agent Role-Playing with CAMEL#
This section sets up a role-playing session where AI agents interact to accomplish a task using Dappier tool. We will guide the assistant agent in creating a dynamic travel plan by leveraging real-time weather data.
[9]:
from typing import List
from colorama import Fore
from camel.agents.chat_agent import FunctionCallingRecord
from camel.societies import RolePlaying
from camel.toolkits import FunctionTool
from camel.utils import print_text_animated
Defining the Task Prompt
[10]:
task_prompt = """Generate a 2-day travel itinerary for New York City, tailored to the real-time weather forecast for the upcoming weekend. Follow these steps:
Determine Current Date and Weekend:
Use Dappier's real-time search to identify the current date and day. Calculate the dates of the upcoming weekend based on this information.
Fetch Weather Data:
Retrieve the weather forecast for the identified weekend dates to understand the conditions for each day.
Design the Itinerary:
Use the weather insights to plan activities and destinations that suit the expected conditions. For each suggested location:
Verify whether it is free to visit or requires advance booking.
Check current traffic conditions to estimate travel times and feasibility.
Output:
Present a detailed 2-day itinerary, including timing, activities, and travel considerations. Ensure the plan is optimized for convenience and enjoyment.
"""
We will configure the assistant agent with tools for real-time weather data retrieval.
[11]:
dappier_tool = FunctionTool(DappierToolkit().search_real_time_data)
tool_list = [
dappier_tool
]
assistant_model_config = ChatGPTConfig(
tools=tool_list,
temperature=0.0,
)
Setting Up the Role-Playing Session
[12]:
# Initialize the role-playing session
role_play_session = RolePlaying(
assistant_role_name="CAMEL Assistant",
user_role_name="CAMEL User",
assistant_agent_kwargs=dict(
model=ModelFactory.create(
model_platform=ModelPlatformType.OPENAI,
model_type=ModelType.GPT_4O_MINI,
model_config_dict=assistant_model_config.as_dict(),
),
tools=tool_list,
),
user_agent_kwargs=dict(model=openai_gpt4o_mini),
task_prompt=task_prompt,
with_task_specify=False,
)
WARNING:camel.agents.chat_agent:Overriding the configured tools in `BaseModelBackend` with the tools from `ChatAgent`.
Print the system message and task prompt
[13]:
# Print system and task messages
print(
Fore.GREEN
+ f"AI Assistant sys message:\n{role_play_session.assistant_sys_msg}\n"
)
print(Fore.BLUE + f"AI User sys message:\n{role_play_session.user_sys_msg}\n")
print(Fore.YELLOW + f"Original task prompt:\n{task_prompt}\n")
AI Assistant sys message:
BaseMessage(role_name='CAMEL Assistant', role_type=<RoleType.ASSISTANT: 'assistant'>, meta_dict={'task': "Generate a 2-day travel itinerary for New York City, tailored to the real-time weather forecast for the upcoming weekend. Follow these steps:\n\nDetermine Current Date and Weekend:\nUse Dappier's real-time search to identify the current date and day. Calculate the dates of the upcoming weekend based on this information.\n\nFetch Weather Data:\nRetrieve the weather forecast for the identified weekend dates to understand the conditions for each day.\n\nDesign the Itinerary:\nUse the weather insights to plan activities and destinations that suit the expected conditions. For each suggested location:\n\nVerify whether it is free to visit or requires advance booking.\nCheck current traffic conditions to estimate travel times and feasibility.\nOutput:\nPresent a detailed 2-day itinerary, including timing, activities, and travel considerations. Ensure the plan is optimized for convenience and enjoyment.\n", 'assistant_role': 'CAMEL Assistant', 'user_role': 'CAMEL User'}, content="===== RULES OF ASSISTANT =====\nNever forget you are a CAMEL Assistant and I am a CAMEL User. Never flip roles! Never instruct me!\nWe share a common interest in collaborating to successfully complete a task.\nYou must help me to complete the task.\nHere is the task: Generate a 2-day travel itinerary for New York City, tailored to the real-time weather forecast for the upcoming weekend. Follow these steps:\n\nDetermine Current Date and Weekend:\nUse Dappier's real-time search to identify the current date and day. Calculate the dates of the upcoming weekend based on this information.\n\nFetch Weather Data:\nRetrieve the weather forecast for the identified weekend dates to understand the conditions for each day.\n\nDesign the Itinerary:\nUse the weather insights to plan activities and destinations that suit the expected conditions. For each suggested location:\n\nVerify whether it is free to visit or requires advance booking.\nCheck current traffic conditions to estimate travel times and feasibility.\nOutput:\nPresent a detailed 2-day itinerary, including timing, activities, and travel considerations. Ensure the plan is optimized for convenience and enjoyment.\n. Never forget our task!\nI must instruct you based on your expertise and my needs to complete the task.\n\nI must give you one instruction at a time.\nYou must write a specific solution that appropriately solves the requested instruction and explain your solutions.\nYou must decline my instruction honestly if you cannot perform the instruction due to physical, moral, legal reasons or your capability and explain the reasons.\nUnless I say the task is completed, you should always start with:\n\nSolution: <YOUR_SOLUTION>\n\n<YOUR_SOLUTION> should be very specific, include detailed explanations and provide preferable detailed implementations and examples and lists for task-solving.\nAlways end <YOUR_SOLUTION> with: Next request.", video_bytes=None, image_list=None, image_detail='auto', video_detail='low', parsed=None)
AI User sys message:
BaseMessage(role_name='CAMEL User', role_type=<RoleType.USER: 'user'>, meta_dict={'task': "Generate a 2-day travel itinerary for New York City, tailored to the real-time weather forecast for the upcoming weekend. Follow these steps:\n\nDetermine Current Date and Weekend:\nUse Dappier's real-time search to identify the current date and day. Calculate the dates of the upcoming weekend based on this information.\n\nFetch Weather Data:\nRetrieve the weather forecast for the identified weekend dates to understand the conditions for each day.\n\nDesign the Itinerary:\nUse the weather insights to plan activities and destinations that suit the expected conditions. For each suggested location:\n\nVerify whether it is free to visit or requires advance booking.\nCheck current traffic conditions to estimate travel times and feasibility.\nOutput:\nPresent a detailed 2-day itinerary, including timing, activities, and travel considerations. Ensure the plan is optimized for convenience and enjoyment.\n", 'assistant_role': 'CAMEL Assistant', 'user_role': 'CAMEL User'}, content='===== RULES OF USER =====\nNever forget you are a CAMEL User and I am a CAMEL Assistant. Never flip roles! You will always instruct me.\nWe share a common interest in collaborating to successfully complete a task.\nI must help you to complete the task.\nHere is the task: Generate a 2-day travel itinerary for New York City, tailored to the real-time weather forecast for the upcoming weekend. Follow these steps:\n\nDetermine Current Date and Weekend:\nUse Dappier\'s real-time search to identify the current date and day. Calculate the dates of the upcoming weekend based on this information.\n\nFetch Weather Data:\nRetrieve the weather forecast for the identified weekend dates to understand the conditions for each day.\n\nDesign the Itinerary:\nUse the weather insights to plan activities and destinations that suit the expected conditions. For each suggested location:\n\nVerify whether it is free to visit or requires advance booking.\nCheck current traffic conditions to estimate travel times and feasibility.\nOutput:\nPresent a detailed 2-day itinerary, including timing, activities, and travel considerations. Ensure the plan is optimized for convenience and enjoyment.\n. Never forget our task!\nYou must instruct me based on my expertise and your needs to solve the task ONLY in the following two ways:\n\n1. Instruct with a necessary input:\nInstruction: <YOUR_INSTRUCTION>\nInput: <YOUR_INPUT>\n\n2. Instruct without any input:\nInstruction: <YOUR_INSTRUCTION>\nInput: None\n\nThe "Instruction" describes a task or question. The paired "Input" provides further context or information for the requested "Instruction".\n\nYou must give me one instruction at a time.\nI must write a response that appropriately solves the requested instruction.\nI must decline your instruction honestly if I cannot perform the instruction due to physical, moral, legal reasons or my capability and explain the reasons.\nYou should instruct me not ask me questions.\nNow you must start to instruct me using the two ways described above.\nDo not add anything else other than your instruction and the optional corresponding input!\nKeep giving me instructions and necessary inputs until you think the task is completed.\nWhen the task is completed, you must only reply with a single word <CAMEL_TASK_DONE>.\nNever say <CAMEL_TASK_DONE> unless my responses have solved your task.', video_bytes=None, image_list=None, image_detail='auto', video_detail='low', parsed=None)
Original task prompt:
Generate a 2-day travel itinerary for New York City, tailored to the real-time weather forecast for the upcoming weekend. Follow these steps:
Determine Current Date and Weekend:
Use Dappier's real-time search to identify the current date and day. Calculate the dates of the upcoming weekend based on this information.
Fetch Weather Data:
Retrieve the weather forecast for the identified weekend dates to understand the conditions for each day.
Design the Itinerary:
Use the weather insights to plan activities and destinations that suit the expected conditions. For each suggested location:
Verify whether it is free to visit or requires advance booking.
Check current traffic conditions to estimate travel times and feasibility.
Output:
Present a detailed 2-day itinerary, including timing, activities, and travel considerations. Ensure the plan is optimized for convenience and enjoyment.
Set the termination rule and start the interaction between agents
NOTE: This session will take approximately 6 minutes and will consume around 60k tokens by using GPT4o-mini.
[14]:
n = 0
input_msg = role_play_session.init_chat()
while n < 20: # Limit the chat to 20 turns
n += 1
assistant_response, user_response = role_play_session.step(input_msg)
if assistant_response.terminated:
print(
Fore.GREEN
+ (
"AI Assistant terminated. Reason: "
f"{assistant_response.info['termination_reasons']}."
)
)
break
if user_response.terminated:
print(
Fore.GREEN
+ (
"AI User terminated. "
f"Reason: {user_response.info['termination_reasons']}."
)
)
break
# Print output from the user
print_text_animated(
Fore.BLUE + f"AI User:\n\n{user_response.msg.content}\n",
0.01
)
if "CAMEL_TASK_DONE" in user_response.msg.content:
break
# Print output from the assistant, including any function
# execution information
print_text_animated(Fore.GREEN + "AI Assistant:", 0.01)
tool_calls: List[FunctionCallingRecord] = [
FunctionCallingRecord(**call.as_dict())
for call in assistant_response.info['tool_calls']
]
for func_record in tool_calls:
print_text_animated(f"{func_record}", 0.01)
print_text_animated(f"{assistant_response.msg.content}\n", 0.01)
input_msg = assistant_response.msg
AI User:
Instruction: Determine the current date and day.
Input: None
AI Assistant:Function Execution: search_real_time_data
Args: {'query': 'What is the current date and day?', 'ai_model_id': 'am_01j06ytn18ejftedz6dyhz2b15'}
Result: It's Tuesday, January 14, 2025! πSolution: The current date is Tuesday, January 14, 2025.
Next request.
AI User:
Instruction: Calculate the dates of the upcoming weekend (Saturday and Sunday) based on the current date.
Input: None
AI Assistant:Solution: Since today is Tuesday, January 14, 2025, the upcoming weekend will be:
- Saturday: January 18, 2025
- Sunday: January 19, 2025
Next request.
AI User:
Instruction: Fetch the weather forecast for January 18 and January 19, 2025, in New York City.
Input: None
AI Assistant:Function Execution: search_real_time_data
Args: {'query': 'Weather forecast for New York City on January 18 and January 19, 2025', 'ai_model_id': 'am_01j06ytn18ejftedz6dyhz2b15'}
Result: Here's the weather forecast for New York City on January 18 and 19, 2025:
- **January 18 (Saturday):** High of 36Β°F with drizzle expected. π§οΈ
- **January 19 (Sunday):** High of 39Β°F, mostly overcast. βοΈ
Make sure to bundle up! π§£π§€Solution: The weather forecast for New York City on the upcoming weekend is as follows:
- **January 18 (Saturday):** High of 36Β°F with drizzle expected. π§οΈ
- **January 19 (Sunday):** High of 39Β°F, mostly overcast. βοΈ
It's advisable to dress warmly due to the cold temperatures and potential drizzle on Saturday.
Next request.
AI User:
Instruction: Design a 2-day itinerary for New York City on January 18 and January 19, 2025, considering the weather conditions.
Input: None
AI Assistant:Solution: Hereβs a 2-day itinerary for New York City on January 18 and January 19, 2025, tailored to the weather conditions:
### Day 1: Saturday, January 18, 2025
**Weather:** High of 36Β°F with drizzle expected.
**Morning:**
- **10:00 AM - Visit the American Museum of Natural History**
- **Details:** Explore the fascinating exhibits indoors, perfect for a chilly, drizzly day.
- **Cost:** Admission is suggested donation; check for any special exhibits that may require tickets.
- **Travel Consideration:** Take the subway to 81st St - Museum of Natural History (1 train).
**Lunch:**
- **12:30 PM - Lunch at Shake Shack (near the museum)**
- **Details:** Enjoy a warm burger and fries. Indoor seating available.
**Afternoon:**
- **2:00 PM - Explore the Metropolitan Museum of Art**
- **Details:** Another indoor activity, with vast collections to explore.
- **Cost:** Suggested admission; check for any special exhibits.
- **Travel Consideration:** A short walk or a quick subway ride (take the 4, 5, or 6 train to 86th St).
**Evening:**
- **5:00 PM - Dinner at a nearby restaurant (e.g., The Modern)**
- **Details:** Enjoy a warm meal. Reservations recommended.
- **7:00 PM - Broadway Show**
- **Details:** Catch a show in the Theater District. Book tickets in advance.
- **Travel Consideration:** Take a taxi or subway to Times Square.
### Day 2: Sunday, January 19, 2025
**Weather:** High of 39Β°F, mostly overcast.
**Morning:**
- **10:00 AM - Visit the High Line**
- **Details:** A beautiful elevated park; dress warmly as it can be breezy.
- **Cost:** Free to visit.
- **Travel Consideration:** Take the subway to 14th St (A, C, E trains).
**Lunch:**
- **12:00 PM - Lunch at Chelsea Market**
- **Details:** A variety of food options in an indoor market setting.
**Afternoon:**
- **1:30 PM - Visit the Whitney Museum of American Art**
- **Details:** Explore contemporary American art indoors.
- **Cost:** Admission fee; check for any special exhibits.
- **Travel Consideration:** A short walk from Chelsea Market.
**Evening:**
- **4:00 PM - Stroll through Central Park (weather permitting)**
- **Details:** Enjoy the park's beauty; dress warmly.
- **6:00 PM - Dinner at a cozy restaurant (e.g., The Smith)**
- **Details:** Enjoy a warm meal to end your trip. Reservations recommended.
### Travel Considerations:
- **Traffic:** Check real-time traffic updates before heading out, especially for dinner and show times.
- **Weather:** Be prepared for cold and potentially wet conditions; wear layers and bring an umbrella.
Next request.
AI User:
Instruction: Verify whether each suggested location in the itinerary requires advance booking or is free to visit.
Input: None
AI Assistant:Function Execution: search_real_time_data
Args: {'query': 'Does the American Museum of Natural History require advance booking?', 'ai_model_id': 'am_01j06ytn18ejftedz6dyhz2b15'}
Result: Yes, the American Museum of Natural History requires all tickets to be reserved online in advance through their website. So make sure to book your tickets before you go! ποΈβ¨Function Execution: search_real_time_data
Args: {'query': 'Does the Metropolitan Museum of Art require advance booking?', 'ai_model_id': 'am_01j06ytn18ejftedz6dyhz2b15'}
Result: You can purchase tickets for the Metropolitan Museum of Art either at the register or in advance online. If you buy in advance, just make sure to use them within the time stated on the ticket, as they become invalid after that. Enjoy your visit! π¨β¨Function Execution: search_real_time_data
Args: {'query': 'Does the Whitney Museum of American Art require advance booking?', 'ai_model_id': 'am_01j06ytn18ejftedz6dyhz2b15'}
Result: Yes, the Whitney Museum of American Art recommends advance booking for tickets since capacity is limited. Even though admission is free, it's a good idea to reserve your tickets ahead of time to ensure you get in! π¨β¨Solution: Hereβs the verification for each suggested location in the itinerary regarding advance booking requirements:
### Day 1: Saturday, January 18, 2025
1. **American Museum of Natural History**
- **Booking Requirement:** Yes, tickets must be reserved online in advance through their website.
2. **Metropolitan Museum of Art**
- **Booking Requirement:** Tickets can be purchased at the register or in advance online. If bought in advance, they must be used within the specified time.
### Day 2: Sunday, January 19, 2025
3. **Whitney Museum of American Art**
- **Booking Requirement:** Yes, advance booking is recommended due to limited capacity. Itβs advisable to reserve tickets ahead of time.
### Other Locations:
- **Chelsea Market:** No advance booking required; it's a public market.
- **High Line:** Free to visit; no booking required.
- **Central Park:** Free to visit; no booking required.
- **Restaurants (e.g., The Modern, The Smith):** Reservations are recommended for dinner.
Next request.
AI User:
Instruction: Check current traffic conditions for the suggested travel routes in the itinerary to estimate travel times and feasibility.
Input: None
AI Assistant:Function Execution: search_real_time_data
Args: {'query': 'Current traffic conditions from American Museum of Natural History to Shake Shack', 'ai_model_id': 'am_01j06ytn18ejftedz6dyhz2b15'}
Result: Traffic conditions from the American Museum of Natural History to Shake Shack are generally light right now. You should have a smooth ride! ππ¨ Itβs a short trip, so youβll be enjoying those delicious burgers in no time! πβ¨Function Execution: search_real_time_data
Args: {'query': 'Current traffic conditions from Shake Shack to Metropolitan Museum of Art', 'ai_model_id': 'am_01j06ytn18ejftedz6dyhz2b15'}
Result: I can't provide real-time traffic data at the moment, but you can check a traffic app or map for the latest conditions. Typically, the drive from Shake Shack to the Metropolitan Museum of Art is about 10-15 minutes, depending on the time of day. Safe travels! ππ¨Function Execution: search_real_time_data
Args: {'query': 'Current traffic conditions from Metropolitan Museum of Art to The Modern restaurant', 'ai_model_id': 'am_01j06ytn18ejftedz6dyhz2b15'}
Result: Traffic from the Metropolitan Museum of Art to The Modern restaurant is currently light, so you should have a smooth trip! ππ¨ It typically takes about 10-15 minutes, depending on the route you take. Enjoy your meal! π½οΈβ¨Function Execution: search_real_time_data
Args: {'query': 'Current traffic conditions from The Modern restaurant to Times Square for Broadway show', 'ai_model_id': 'am_01j06ytn18ejftedz6dyhz2b15'}
Result: Traffic from The Modern restaurant to Times Square is currently light, so you should be able to get there quickly! ππ¨ It typically takes around 10-15 minutes, but keep an eye out for any street closures or events that might pop up. Enjoy the show! πβ¨Function Execution: search_real_time_data
Args: {'query': 'Current traffic conditions from High Line to Chelsea Market', 'ai_model_id': 'am_01j06ytn18ejftedz6dyhz2b15'}
Result: Traffic from the High Line to Chelsea Market is generally light right now, so you should have a smooth trip! πΆββοΈπ¨ It's a short walk, about 10 minutes, but if you're driving, it might take around the same time depending on street conditions. Enjoy your time at Chelsea Market! π₯β¨Function Execution: search_real_time_data
Args: {'query': 'Current traffic conditions from Chelsea Market to Whitney Museum of American Art', 'ai_model_id': 'am_01j06ytn18ejftedz6dyhz2b15'}
Result: Traffic from Chelsea Market to the Whitney Museum of American Art is pretty light right now! πΆββοΈ If you're walking, it should take about 10-15 minutes. If you're driving, it might be a similar time, depending on the exact route you take. Enjoy the art! πΌοΈβ¨Function Execution: search_real_time_data
Args: {'query': 'Current traffic conditions from Whitney Museum of American Art to Central Park', 'ai_model_id': 'am_01j06ytn18ejftedz6dyhz2b15'}
Result: Traffic from the Whitney Museum of American Art to Central Park is currently light. If you're walking, it should take about 15-20 minutes. If you're driving, the travel time is similar, depending on the route you choose. Enjoy your time in the park! π³β¨Function Execution: search_real_time_data
Args: {'query': 'Current traffic conditions from Central Park to The Smith restaurant', 'ai_model_id': 'am_01j06ytn18ejftedz6dyhz2b15'}
Result: Traffic from Central Park to The Smith restaurant is currently light! ππ¨ If you're walking, it should take about 15-20 minutes. If you're driving, it might take a similar amount of time, depending on your exact route. Enjoy your meal! π½οΈβ¨Solution: Here are the current traffic conditions and estimated travel times for the suggested routes in the itinerary:
### Day 1: Saturday, January 18, 2025
1. **From American Museum of Natural History to Shake Shack**
- **Traffic Conditions:** Light traffic.
- **Estimated Travel Time:** Short trip; you should arrive quickly.
2. **From Shake Shack to Metropolitan Museum of Art**
- **Traffic Conditions:** Unable to provide real-time data, but typically about 10-15 minutes depending on the time of day.
3. **From Metropolitan Museum of Art to The Modern restaurant**
- **Traffic Conditions:** Light traffic.
- **Estimated Travel Time:** Approximately 10-15 minutes.
4. **From The Modern restaurant to Times Square for Broadway show**
- **Traffic Conditions:** Light traffic.
- **Estimated Travel Time:** Around 10-15 minutes.
### Day 2: Sunday, January 19, 2025
5. **From High Line to Chelsea Market**
- **Traffic Conditions:** Light traffic.
- **Estimated Travel Time:** About 10 minutes walking; similar time if driving.
6. **From Chelsea Market to Whitney Museum of American Art**
- **Traffic Conditions:** Light traffic.
- **Estimated Travel Time:** Approximately 10-15 minutes walking or driving.
7. **From Whitney Museum of American Art to Central Park**
- **Traffic Conditions:** Light traffic.
- **Estimated Travel Time:** About 15-20 minutes walking or driving.
8. **From Central Park to The Smith restaurant**
- **Traffic Conditions:** Light traffic.
- **Estimated Travel Time:** Approximately 15-20 minutes walking or driving.
Overall, the traffic conditions are favorable for your itinerary, making it feasible to travel between locations smoothly.
Next request.
AI User:
Instruction: Present the final detailed 2-day itinerary for New York City, including timing, activities, travel considerations, and booking requirements.
Input: None
AI Assistant:Solution: Here is the final detailed 2-day itinerary for New York City on January 18 and January 19, 2025, including timing, activities, travel considerations, and booking requirements:
### Day 1: Saturday, January 18, 2025
**Weather:** High of 36Β°F with drizzle expected.
**Morning:**
- **10:00 AM - Visit the American Museum of Natural History**
- **Booking Requirement:** Tickets must be reserved online in advance.
- **Travel Consideration:** Take the subway to 81st St - Museum of Natural History (1 train).
- **Estimated Travel Time:** Light traffic; short trip.
**Lunch:**
- **12:30 PM - Lunch at Shake Shack (near the museum)**
- **Details:** Enjoy a warm burger and fries. Indoor seating available.
- **Estimated Travel Time:** Light traffic; quick trip.
**Afternoon:**
- **2:00 PM - Explore the Metropolitan Museum of Art**
- **Booking Requirement:** Tickets can be purchased at the register or in advance online.
- **Travel Consideration:** A short walk or subway ride (4, 5, or 6 train to 86th St).
- **Estimated Travel Time:** About 10-15 minutes.
**Evening:**
- **5:00 PM - Dinner at The Modern**
- **Booking Requirement:** Reservations recommended.
- **Travel Consideration:** Approximately 10-15 minutes travel time from the Met.
- **7:00 PM - Broadway Show**
- **Booking Requirement:** Tickets should be booked in advance.
- **Travel Consideration:** Take a taxi or subway to Times Square; about 10-15 minutes travel time.
### Day 2: Sunday, January 19, 2025
**Weather:** High of 39Β°F, mostly overcast.
**Morning:**
- **10:00 AM - Visit the High Line**
- **Booking Requirement:** Free to visit; no booking required.
- **Travel Consideration:** Take the subway to 14th St (A, C, E trains).
- **Estimated Travel Time:** Light traffic; about 10 minutes walking.
**Lunch:**
- **12:00 PM - Lunch at Chelsea Market**
- **Booking Requirement:** No advance booking required; various food options available.
- **Estimated Travel Time:** About 10 minutes walking from the High Line.
**Afternoon:**
- **1:30 PM - Visit the Whitney Museum of American Art**
- **Booking Requirement:** Advance booking recommended due to limited capacity.
- **Travel Consideration:** A short walk from Chelsea Market.
- **Estimated Travel Time:** Approximately 10-15 minutes.
**Evening:**
- **4:00 PM - Stroll through Central Park**
- **Booking Requirement:** Free to visit; no booking required.
- **Travel Consideration:** About 15-20 minutes walking from the Whitney.
- **6:00 PM - Dinner at The Smith**
- **Booking Requirement:** Reservations recommended.
- **Travel Consideration:** Approximately 15-20 minutes travel time from Central Park.
### Summary of Travel Considerations:
- **Traffic:** Generally light for all routes; check real-time updates before heading out.
- **Weather:** Dress warmly and be prepared for drizzle on Saturday.
This itinerary is designed to maximize your enjoyment while accommodating the weather and travel conditions. Enjoy your trip to New York City!
Next request.
AI User:
Instruction: Confirm that the task is completed and provide a final response.
Input: None
AI Assistant:Solution: The task is completed. I have provided a detailed 2-day itinerary for New York City on January 18 and January 19, 2025, including timing, activities, travel considerations, and booking requirements. If you have any further questions or need additional assistance, feel free to ask!
Next request.
AI User:
<CAMEL_TASK_DONE>
[15]:
# End the AgentOps session
agentops.end_session("Success")
π AgentOps: Session Stats - Duration: 13m 34.0s | Cost: $0.012518 | LLMs: 31 | Tools: 16 | Actions: 0 | Errors: 0
π AgentOps: Session Replay: https://app.agentops.ai/drilldown?session_id=c31e4378-a022-4272-adba-0e75792c87cd
π Go to the AgentOps link shown above, you will be able to see the detailed record for this running like below.
NOTE: The AgentOps link is private and tied to the AgentOps account. To access the link, youβll need to run the session using your own AgentOps API Key, which will then allow you to open the link with the sessionβs running information.
π Highlights#
This notebook has guided you through setting up and running a CAMEL RAG workflow with Dappier for a multi-agent role-playing task. You can adapt and expand this example for various other scenarios requiring advanced web information retrieval and AI collaboration.
Key tools utilized in this notebook include:
CAMEL: A powerful multi-agent framework that enables Retrieval-Augmented Generation and multi-agent role-playing scenarios, allowing for sophisticated AI-driven tasks.
OpenAI: A leading provider of advanced AI models capable of natural language understanding, contextual reasoning, and content generation. It enables intelligent, human-like interactions and supports a wide range of applications across various domains.
Dappier: A platform connecting LLMs to real-time, rights-cleared data from trusted sources, specializing in domains like web search, finance, and news. It delivers enriched, prompt-ready data, empowering AI with verified and up-to-date information for diverse applications.
AgentOps: Track and analysis the running of CAMEL Agents.
This comprehensive setup allows you to adapt and expand the example for various scenarios requiring advanced web information retrieval, AI collaboration, and multi-source data aggregation.
Check out some of our other work:
π« Creating Your First CAMEL Agent free Colab
Graph RAG Cookbook free Colab
π§ββοΈ Create A Hackathon Judge Committee with Workforce free Colab
π₯ 3 ways to ingest data from websites with Firecrawl & CAMEL free Colab
π¦₯ Agentic SFT Data Generation with CAMEL and Mistral Models, Fine-Tuned with Unsloth free Colab
Thanks from everyone at π« CAMEL-AI