Skip to main content
You can also check this cookbook in colab here This notebook demonstrates how to set up and leverage CAMEL’s multi-agent combined with Dappier for dynamic travel planning. By combining real-time 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 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, multi-agent collaboration, and contextual reasoning.

Watch the Video Guide

If you prefer a visual walkthrough, check out the accompanying video guide below:

📦 Installation

First, install the CAMEL package with all its dependencies:

🔑 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. The API Key could be found under Settings -> Profile.
Python
Your can go to here to get API Key from Open AI.
Python
You can go to here to get free API Key from AgentOps
Python
Set up the OpenAI GPT4o-mini using the CAMEL ModelFactory. You can also configure other models as needed.
Python

📹 Monitoring AI Agents with AgentOps

Python

🛰️ 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.
Python
🎉 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.
Python
Defining the Task Prompt
Python
We will configure the assistant agent with tools for real-time weather data retrieval.
Python
Setting Up the Role-Playing Session
Python
Print the system message and task prompt
Python
Set the termination rule and start the interaction between agents NOTE: This session will take approximately 5 minutes and will consume around 60k tokens by using GPT4o-mini.
Python
Python
🎉 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.