Overview
CAMEL is an open-source Python framework for building and studying multi-agent systems. It lets you create LLM-driven agents that hold a memory, call tools, and work together through role-playing conversations to complete tasks. The project grew out of research into how agent behavior changes as you scale the number of agents up.
It is aimed at researchers and developers who want to go beyond a single chatbot and run experiments with many agents, different roles, models, and simulated environments. The same building blocks are also used for practical work like task automation and synthetic data generation.
Within the multi-agent systems category, CAMEL leans toward research and experimentation. It ships agent types, prompts, benchmarks, and tool integrations so you can wire up agents, give them tasks, and observe how they coordinate.
What it does
- ChatAgent core with stateful memory, so agents keep context across multi-step interactions
- Role-playing societies where two or more agents cooperate to solve a task
- Tool integration through toolkits (for example web search) that agents can call during a step
- Pluggable models via ModelFactory, covering multiple model platforms and types
- Data generation utilities for building structured, synthetic datasets
- Designed to scale toward large agent populations for studying emergent behavior
Getting started
Install the package with pip, set your model provider API key, then run a single ChatAgent with a tool attached.
Install CAMEL
Install the base package from PyPI. CAMEL requires Python 3.10 or newer (and below 3.15). For web search and other web tools, install the web_tools extra.
pip install camel-ai
pip install 'camel-ai[web_tools]'Set your API key
CAMEL talks to model providers through environment variables. Export your OpenAI key (or copy .env.example to .env and edit it).
export OPENAI_API_KEY='your_openai_api_key'Run a ChatAgent with a tool
Create a model, attach a search tool, and call step() to get a response. This is the quick start from the README.
from camel.models import ModelFactory
from camel.types import ModelPlatformType, ModelType
from camel.agents import ChatAgent
from camel.toolkits import SearchToolkit
model = ModelFactory.create(
model_platform=ModelPlatformType.OPENAI,
model_type=ModelType.GPT_4O,
model_config_dict={"temperature": 0.0},
)
search_tool = SearchToolkit().search_duckduckgo
agent = ChatAgent(model=model, tools=[search_tool])
response_1 = agent.step("What is CAMEL-AI?")
print(response_1.msgs[0].content)
response_2 = agent.step("What is the Github link to CAMEL framework?")
print(response_2.msgs[0].content)Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Researching how multi-agent systems behave and coordinate as the number of agents grows
- Automating multi-step tasks by having agents play roles and cooperate through conversation
- Generating structured synthetic datasets for training or evaluating models
- Prototyping tool-using agents that search the web and reason over the results
How CAMEL compares
CAMEL alongside other open-source multi-agent systems tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| MetaGPT | ★ 68.9k | A multi-agent framework that models a software company, assigning roles like product manager, architect, and engineer to generate code from a single prompt. |
| AutoGen | ★ 59.1k | Microsoft Research's framework for building applications where multiple agents converse with each other and with tools to solve tasks. |
| CrewAI | ★ 54k | A framework for assembling teams ('crews') of role-playing agents that divide tasks and collaborate to complete a goal. |
| OpenAI Agents SDK | ★ 27.3k | OpenAI's lightweight Python SDK for building multi-agent workflows using explicit handoffs, tools, and guardrails. |
| AgentScope | ★ 27k | A framework for building multi-agent applications with message passing, visual debugging tools, and distributed execution. |
| OpenAI Swarm | ★ 21.7k | An educational, lightweight framework from OpenAI for experimenting with multi-agent coordination through handoffs and routines. |
| PentAGI | ★ 17.8k | PentAGI is a self-hosted AI security platform that plans and runs penetration tests autonomously using a team of agents and 20+ built-in pentesting tools. |
| CAMEL | ★ 17.2k | Build and study cooperating LLM agents through role-playing conversations |