camel
Multi-agent societies and synthetic training data from a research collective — a laboratory, not a runtime
What is camel?
CAMEL's core idea is agents talking to each other: a RolePlaying session pairs an AI user that issues instructions with an AI assistant that carries them out, and a Workforce hands split-up subtasks to workers under a coordinator. Around that sit eighty-odd toolkits, around fifty model backends, benchmark harnesses such as GAIA and BrowseComp, and pipelines that turn the resulting conversations into fine-tuning data. That breadth is the point if you are running experiments; if you only want one dependable agent in production you will carry a great deal you never use, and the library has been public since 2023 yet is still on 0.2.x.
What can you do with camel?
- Start with one agent and a toolkit —
ChatAgent(model=..., tools=SearchToolkit().get_tools())followed byagent.step(...)runs a single turn with tool calling and conversation memory already wired in. Pass a Pydantic class asresponse_formatand you get parsed structured output back instead of prose. - Have two agents talk the task through —
RolePlayingpairs an AI user that issues instructions with an AI assistant that carries them out, and by default rewrites your task into a more specific one before the first turn. Staying in role is prompt-level: both system prompts open with "Never flip roles!", an instruction handed to the model rather than a rule the framework enforces. You drive the session withinit_chat()and repeatedstep()calls, and it ends on your own round limit, on theCAMEL_TASK_DONEmarker, or on either agent coming back terminated — which happens by itself once the conversation outgrows its token budget. - Grow it into a Workforce with a coordinator —
add_single_agent_workerandadd_role_playing_workerbuild the team, andadd_workforcenests one workforce inside another. A planner agent splits the task, a coordinator hands each subtask to a worker by reading its description, and a failed subtask is met with a retry, a replan, a further split, a reassignment or a brand-new worker.pause(),resume()andsave_snapshot()let a person step in mid-run. - Reach the outside world through toolkits and MCP — Eighty-odd toolkits cover web search, a browser, the terminal, GitHub, Notion, Slack, arXiv and Excel, and
FunctionToolturns any Python function into a tool by reading the description written above it.MCPToolkitconnects out to external MCP servers; publishing in the other direction isrun_mcp_server()for a toolkit andto_mcp()for a ChatAgent or an entire Workforce. - Turn agent runs into fine-tuning data —
CoTDataGenerator,SelfInstructPipelineandSelfImprovingCoTPipelinewrite reasoning traces and instruction sets out as JSON ready for fine-tuning. Verifiers for maths, physics and Python check whether the answers are actually right, and the single- and multi-step environments return a reward for each move — the score reinforcement learning trains against. - Score the result on published benchmarks —
camel.benchmarksships harnesses for GAIA, BrowseComp, APIBank, APIBench, Nexus and RAGBench, so a design can be compared against numbers other people have published rather than against a demo that happened to work.
Before you choose camel
- Its built-in Python interpreter restricts what code it accepts instead of isolating the process; a way past that was reported against 0.2.90 in July 2026, and the docs reserve it for trusted code and point to Docker.Reported in#4224
- Toolkits and model connections come as optional add-ons that each bring their own dependencies and API keys, and the option that installs everything at once was reported in February 2026 to fail to resolve.Reported in#3851
Star history
17 Aug to 28 Aug · +53
Frequently asked questions
Is camel free for commercial use?
camel is released under the Apache-2.0 licence — OSI-approved open source, which permits commercial use.
How can camel be deployed?
camel is available as Self-hosted.
Documentation
Reproduced from the camel-ai/camel README, published under Apache-2.0. Read the original ↗
[![Documentation][docs-image]][docs-url] [![Discord][discord-image]][discord-url] [![X][x-image]][x-url] [![Reddit][reddit-image]][reddit-url] [![Wechat][wechat-image]][wechat-url] [![Hugging Face][huggingface-image]][huggingface-url] [![Star][star-image]][star-url] [![Package License][package-license-image]][package-license-url] [![PyPI Download][package-download-image]][package-download-url] [![][join-us-image]][join-us]
Community | Installation | Examples | Paper | Citation | Contributing | CAMEL-AI
Join us (Discord or WeChat) in pushing the boundaries of finding the scaling laws of agents.
🌟 Star CAMEL on GitHub and be instantly notified of new releases.
[![][image-join-us]][join-us]
- CAMEL Framework Design Principles
- Why Use CAMEL for Your Research?
- What Can You Build With CAMEL?
- Quick Start
- Tech Stack
- Research
- Synthetic Datasets
- Cookbooks (Usecases)
- Real-World Usecases
- 🧱 Built with CAMEL (Real-world Producs & Research)
- 🗓️ Events
- Contributing to CAMEL
- Community & Contact
- Citation
- Acknowledgment
- License
CAMEL Framework Design Principles
The framework enables multi-agent systems to continuously evolve by generating data and interacting with environments. This evolution can be driven by reinforcement learning with verifiable rewards or supervised learning.
The framework is designed to support systems with millions of agents, ensuring efficient coordination, communication, and resource management at scale.
Agents maintain stateful memory, enabling them to perform multi-step interactions with environments and efficiently tackle sophisticated tasks.
Every line of code and comment serves as a prompt for agents. Code should be written clearly and readably, ensuring both humans and agents can interpret it effectively.
Why Use CAMEL for Your Research?
We are a community-driven research collective comprising over 100 researchers dedicated to advancing frontier research in Multi-Agent Systems. Researchers worldwide choose CAMEL for their studies based on the following reasons.
What Can You Build With CAMEL?
1. Data Generation
2. Task Automation
3. World Simulation
Quick Start
Installing CAMEL is a breeze thanks to its availability on PyPI. Simply open your terminal and run:
pip install camel-ai
Starting with ChatAgent
This example demonstrates how to create a ChatAgent using the CAMEL framework and perform a search query using DuckDuckGo.
- Install the tools package:
pip install 'camel-ai[web_tools]'
- Set up your OpenAI API key:
export OPENAI_API_KEY='your_openai_api_key'
Alternatively, use a .env file:
cp .env.example .env
# then edit .env and add your keys
- Run the following Python code:
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)
# CAMEL-AI is the first LLM (Large Language Model) multi-agent framework
# and an open-source community focused on finding the scaling laws of agents.
# ...
response_2 = agent.step("What is the Github link to CAMEL framework?")
print(response_2.msgs[0].content)
# The GitHub link to the CAMEL framework is
# [https://github.com/camel-ai/camel](https://github.com/camel-ai/camel).
- (Optional) Enable model request/response logs:
export CAMEL_MODEL_LOG_ENABLED=true
export CAMEL_MODEL_LOG_MODEL_CONFIG_ENABLED=true
export CAMEL_LOG_DIR=camel_logs
CAMEL_MODEL_LOG_ENABLED: Enables request/response JSON logs.CAMEL_MODEL_LOG_MODEL_CONFIG_ENABLED: Controls whethermodel_config_dictis logged underrequest.model_config_dict. When unset, it defaults to the same value asCAMEL_MODEL_LOG_ENABLED.CAMEL_LOG_DIR: Directory for generated log files (default:camel_logs).- Logs are written as UTF-8 JSON with multilingual text preserved (for example Chinese, Japanese, Arabic) without Unicode escape noise.
For more detailed instructions and additional configuration options, check out the installation section.
After running, you can explore our CAMEL Tech Stack and Cookbooks at docs.camel-ai.org to build powerful multi-agent systems.
We provide a demo showcasing a conversation between two ChatGPT agents playing roles as a python programmer and a stock trader collaborating on developing a trading bot for stock market.
Explore different types of agents, their roles, and their applications.
Seeking Help
Please reach out to us on CAMEL discord if you encounter any issue set up CAMEL.
Tech Stack
Key Modules
Core components and utilities to build, operate, and enhance CAMEL-AI agents and societies.
| Module | Description |
|---|---|
| Agents | Core agent architectures and behaviors for autonomous operation. |
| Agent Societies | Components for building and managing multi-agent systems and collaboration. |
| Data Generation | Tools and methods for synthetic data creation and augmentation. |
| Models | Model architectures and customization options for agent intelligence. |
| Tools | Tools integration for specialized agent tasks. |
| Memory | Memory storage and retrieval mechanisms for agent state management. |
| Storage | Persistent storage solutions for agent data and states. |
| Benchmarks | Performance evaluation and testing frameworks. |
| Interpreters | Code and command interpretation capabilities. |
| Data Loaders | Data ingestion and preprocessing tools. |
| Retrievers | Knowledge retrieval and RAG components. |
| Runtime | Execution environment and process management. |
| Human-in-the-Loop | Interactive components for human oversight and intervention. |
Research
We believe that studying these agents on a large scale offers valuable insights into their behaviors, capabilities, and potential risks.
Explore our research projects:
Research with US
We warmly invite you to use CAMEL for your impactful research.
Rigorous research takes time and resources. We are a community-driven research collective with 100+ researchers exploring the frontier research of Multi-agent Systems. Join our ongoing projects or test new ideas with us, reach out via email for more information.
Synthetic Datasets
1. Utilize Various LLMs as Backends
For more details, please see our Models Documentation.
Data (Hosted on Hugging Face)
| Dataset | Chat format | Instruction format | Chat format (translated) |
|---|---|---|---|
| AI Society | Chat format | Instruction format | Chat format (translated) |
| Code | Chat format | Instruction format | x |
| Math | Chat format | x | x |
| Physics | Chat format | x | x |
| Chemistry | Chat format | x | x |
| Biology | Chat format | x | x |
2. Visualizations of Instructions and Tasks
| Dataset | Instructions | Tasks |
|---|---|---|
| AI Society | Instructions | Tasks |
| Code | Instructions | Tasks |
| Misalignment | Instructions | Tasks |
Cookbooks (Usecases)
Practical guides and tutorials for implementing specific functionalities in CAMEL-AI agents and societies.
1. Basic Concepts
| Cookbook | Description |
|---|---|
| Creating Your First Agent | A step-by-step guide to building your first agent. |
| Creating Your First Agent Society | Learn to build a collaborative society of agents. |
| Message Cookbook | Best practices for message handling in agents. |
2. Advanced Features
| Cookbook | Description |
|---|---|
| Tools Cookbook | Integrating tools for enhanced functionality. |
| Memory Cookbook | Implementing memory systems in agents. |
| RAG Cookbook | Recipes for Retrieval-Augmented Generation. |
| Graph RAG Cookbook | Leveraging knowledge graphs with RAG. |
| Track CAMEL Agents with AgentOps | Tools for tracking and managing agents in operations. |
3. Model Training & Data Generation
| Cookbook | Description |
|---|---|
| Data Generation with CAMEL and Finetuning with Unsloth | Learn how to generate data with CAMEL and fine-tune models effectively with Unsloth. |
| Data Gen with Real Function Calls and Hermes Format | Explore how to generate data with real function calls and the Hermes format. |
| CoT Data Generation and Upload Data to Huggingface | Uncover how to generate CoT data with CAMEL and seamlessly upload it to Huggingface. |
| CoT Data Generation and SFT Qwen with Unsolth | Discover how to generate CoT data using CAMEL and SFT Qwen with Unsolth, and seamlessly upload your data and model to Huggingface. |
This README has been shortened. The full version is on GitHub. Read the original ↗