Creating Your First Agent Society
You can also check this cookbook in colab here.
⭐ Star us on GitHub, join our Discord, or follow us on X
This notebook demonstrates how to set up and leverage CAMEL’s ability to create your first agent society through RolePlaying()
class.
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.
-
Agent Society: Enabling multi-agent communication for the task solving.
Philosophical Bits
What magical trick makes us intelligent? The trick is that there is no trick. The power of intelligence stems from our vast diversity, not from any single, perfect principle.
— Marvin Minsky, The Society of Mind, p. 308
In this section, we will take a spite of the task-oriented RolePlaying()
class. We design this in an instruction-following manner. The essence is that to solve a complex task, you can enable two communicative agents collaboratively working together step by step to reach solutions. The main concepts include:
-
Task: a task can be as simple as an idea, initialized by an inception prompt.
-
AI User: the agent who is expected to provide instructions.
-
AI Assistant: the agent who is expected to respond with solutions that fulfills the instructions.
📦 Installation
🔑 Setting Up API Keys
You’ll need to set up your API keys for OpenAI.
Alternatively, if running on Colab, you could save your API keys and tokens as Colab Secrets,
and use them across notebooks.
To do so, comment out the above manual API key prompt code block(s),
and uncomment the following codeblock.
⚠️ Don’t forget granting access to the API key you would be using to the current notebook.
Quick Start
🕹 Step 1: Configure the Role-Playing Session
Set the Task
Arguments
Set the User
Arguments
You may think the user as the instruction sender
.
Set the Assistant
Arguments
Again, you may think the assistant as the instruction executor
.
Step 2: Kickstart Your Society
Putting them altogether – your role-playing session is ready to go!
Step 3: Solving Tasks with Your Society
Hold your bytes. Prior to our travel, let’s define a small helper function.
Time to chart our course – writing a simple loop for our society to proceed:
🌟 Highlights
In this notebook, This notebook has guided you through setting up and use agent society for task solving.
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.
-
Agent Society: Enabling multi-agent communication for the task solving.
That’s everything: Got questions about 🐫 CAMEL-AI? Join us on Discord! Whether you want to share feedback, explore the latest in multi-agent systems, get support, or connect with others on exciting projects, we’d love to have you in the community! 🤝
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
⭐ Star us on GitHub, join our Discord, or follow us on X