Research

CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society

Guohao Li12 min readResearch
FOUNDATIONALAI AgentsAdvanced

Key takeaway

Foundational work on role-playing multi-agent systems.

Updated on Oct 3, 2026

01

Abstract

  • CAMEL proposes a communicative-agent framework based on role-playing between an AI user and an AI assistant.
  • Inception prompting initializes roles, goals, and behavioral constraints.
  • A task-specifier agent converts a preliminary idea into a concrete task.
  • The AI user and AI assistant then communicate autonomously until completion.
  • The paper studies cooperative behavior and capabilities of a society of language-model agents.
  • Role-playing is also used to generate conversational instruction-following data at scale.

02

Introduction

  • Chat-based LLMs can solve complex tasks but commonly depend on humans to guide every interaction.
  • Continuous human guidance limits scalability and consumes human attention.
  • CAMEL asks whether multiple communicative agents can autonomously cooperate toward a shared objective.
  • The framework separates user and assistant roles instead of asking one model to perform both sides.
  • Role-playing is used to investigate emergent cooperative behavior.
  • Synthetic conversations are treated as a potential source of instruction-following data.
  • The authors release code and generated datasets for further research.

03

Problem

  • The target problem is autonomous cooperation between language-model agents with minimal human intervention.
  • Agents must preserve assigned roles throughout multi-turn interaction.
  • Agents must translate a high-level idea into a specific executable task.
  • The interaction needs a termination mechanism to avoid endless conversation.
  • The system must reduce role reversal, vague responses, and other conversational failures.
  • Scalable data generation should minimize manual construction of roles, tasks, and conversations.
  • The paper also investigates whether generated conversations can improve downstream model capabilities.

04

Methodology

  • The pipeline starts with a preliminary idea and two role assignments.
  • A task-specifier agent expands the idea into a specific task.
  • Both AI agents receive the specified task.
  • The AI user generates one instruction at a time from the task and prior messages.
  • The AI assistant generates a solution using its assigned expertise.
  • Conversation state is represented as a growing message set.
  • Each instruction-solution pair is added to that message set.
  • The process continues until the AI user declares completion.
  • A critic-in-the-loop can select proposals or provide feedback and support tree-search-like decision making.
Figure 1

05

Architecture

  • CAMEL uses three initialization prompts: task-specifier, assistant system prompt, and user system prompt.
  • The task-specifier receives the preliminary task and role information and produces a detailed task.
  • The assistant prompt fixes the assistant role, shared objective, response format, and behavioral constraints.
  • The user prompt fixes the user role and instructs the agent to issue task-oriented instructions.
  • The agents communicate through a repeated instruction-solution loop.
  • The interaction is formalized as I_(t+1)=U(M_t).
  • The assistant produces S_(t+1)=A(M_t,I_(t+1)).
  • The message set is updated with M_(t+1)=M_t union (I_(t+1),S_(t+1)).
  • The framework can generalize to arbitrary message-passing graphs.
  • A critic can be inserted to evaluate or select candidate proposals.

06

Dataset

  • The AI Society dataset contains 25K conversations between two gpt-3.5-turbo agents.
  • It uses combinations of 50 user roles and 50 assistant roles.
  • Each role combination is run over 10 tasks.
  • The 50 × 50 × 10 configuration produces 25,000 conversations.
  • The dataset provides conversational and instruction-oriented representations.
  • The code-generation dataset contains 50K conversations between two gpt-3.5-turbo agents.
  • The code dataset spans 20 programming languages.
  • It covers 50 application domains.
  • Each language-domain combination uses 50 tasks.
  • Math, Science, and Misalignment scenarios are also generated for capability and risk studies.
  • The generated data is synthetic and may contain inaccuracies.

07

Training

  • The core role-playing framework does not require parameter updates during task execution.
  • Agents cooperate through prompting and multi-turn inference.
  • gpt-3.5-turbo is used to generate the AI Society and code conversations.
  • LLaMA models are fine-tuned on progressively growing datasets generated through role-playing.
  • This tests whether more synthetic conversational data produces capability emergence.
  • Generated conversations are structured as instruction-following interactions suitable for supervised fine-tuning.
  • Data generation is automated with LLM prompts for roles and tasks.
  • The approach separates agent-time collaboration from downstream training on generated data.

08

Experiments

  • The paper evaluates instruction-following cooperation in multi-agent settings.
  • AI Society studies conversations across diverse assistant and user roles.
  • Code experiments pair a programmer role with a domain-specific user.
  • Math and Science scenarios examine reasoning and knowledge-related capabilities.
  • A Misalignment dataset illustrates potentially harmful applications of autonomous agents.
  • CAMEL solutions are compared with single-shot gpt-3.5-turbo solutions.
  • The paper includes GPT-4 evaluation and human evaluation.
  • Models fine-tuned on progressively larger CAMEL-generated datasets are also evaluated.
  • Code-generation models are tested on HumanEval and HumanEval++ benchmarks.

09

Baselines

  • The principal direct baseline is a single-shot gpt-3.5-turbo solution to the same task.
  • CAMEL-generated solutions are evaluated against this single-agent baseline by GPT-4.
  • Human evaluators anonymously compare CAMEL and single-shot solutions.
  • Progressive-data experiments compare models trained on increasing amounts of role-playing data.
  • The critic-in-the-loop variant provides an alternative to an uncriticized conversation.
  • The paper emphasizes cooperative multi-agent generation rather than one fixed agent architecture.

10

Results

  • CAMEL role-playing solutions outperform single-shot gpt-3.5-turbo solutions in the reported GPT-4 evaluation.
  • Human evaluation also prefers CAMEL-generated solutions over corresponding single-shot solutions.
  • The results support the claim that iterative cooperation can improve solutions beyond one-shot generation.
  • AI Society scales to 25K conversations without manually authoring every dialogue.
  • The code dataset scales to 50K conversations across 20 programming languages and 50 domains.
  • Progressive fine-tuning experiments use CAMEL-generated data to study capability emergence.
  • HumanEval and HumanEval++ provide downstream code-generation evaluation.
  • The datasets provide reusable resources for studying instruction following and agent societies.

11

Conclusion

  • CAMEL demonstrates that role-playing can create autonomous cooperative agents with minimal human intervention.
  • Inception prompting provides role, task, and interaction constraints before autonomous conversation.
  • Separating user and assistant responsibilities creates a structured instruction-solution protocol.
  • The framework can generalize beyond two agents using message-passing graphs.
  • Critic-in-the-loop adds evaluation and selection to the basic role-playing loop.
  • CAMEL provides a scalable approach for generating conversational instruction-following data.
  • The 25K AI Society and 50K code datasets demonstrate substantial synthetic-data scale.
  • The work establishes multi-agent role-playing as both an application mechanism and a research tool for studying LLM societies.

12

References

  • Primary paper: Guohao Li, Hasan Abed Al Kader Hammoud, Hani Itani, Dmitrii Khizbullin, and Bernard Ghanem, “CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society.”
  • arXiv:2303.17760.
  • The paper was first submitted in March 2023 and later published at NeurIPS 2023.
  • Project repository: https://github.com/camel-ai/camel
  • AI Society dataset: camel-ai/ai_society.
  • Code dataset: camel-ai/code.
  • The experiments use gpt-3.5-turbo for synthetic conversation generation and GPT-4/human evaluation.

Continue reading

Related research

Browse all research