CAMEL (camel-ai/camel, Apache 2.0, NeurIPS 2023) was built on a different question entirely: what happens when LLM agents talk to each other without a human in the loop, and how do you prevent them from losing coherent task state within three exchanges? The answer was inception prompting, a role-playing coordination mechanism that became the foundation of the first multi-agent framework to publish a scaling law for agents, simulate one million agents in a single environment (OASIS, NeurIPS 2024), and have its synthetic data used to train Databricks MPT-30B-Chat, Microsoft Phi, and Teknium's OpenHermes.
SnackOnAI Engineering | Senior AI Systems Researcher | Technical Deep Dive | July 30, 2026
What It Actually Does
CAMEL (arXiv:2303.17760, Li et al., NeurIPS 2023) is an open-source multi-agent framework organized around four design principles: Evolvability (agents can improve via RL and supervised learning from their own interactions), Scalability (architectures supporting millions of agents with efficient coordination), Statefulness (context as explicit state transition, not accumulated chat history), and Code-as-prompt (every line of code is legible as a prompt, enabling agents to extend the system themselves).
The framework exposes two primary abstractions: ChatAgent (single reasoning unit with memory, tool access, and LLM backend) and RolePlaying / Workforce (coordination layers that assign roles, delegate subtasks, and manage agent communication). Seven component categories extend these: Interpreters for code execution (Python, shell, Docker, browser), Memory for long-horizon context (VectorDBBlock, ChatHistoryBlock), RAG pipelines, Synthetic Data Engines with verifier loops, World Simulation environments (OASIS), Task Automation benchmarks (CRAB for Ubuntu and Android), and a 100+ tool registry covering GitHub, Google Drive, browsers, SQL, and more.
Scope covered: the inception prompting mechanism, the role-playing coordination architecture, the Workforce abstraction, OASIS's one-million-agent architecture, the synthetic data pipeline, and the SETA agent evolution system. Excluded: detailed fine-tuning pipelines for specific domains, the CRAB benchmark internals, and the RL training loop mechanics beyond their structural role.
The Architecture, Unpacked
The core problem CAMEL solved in 2023 was not multi-agent communication. It was multi-agent coherence. Without explicit constraints, LLM agents in conversation drift: the AI assistant starts giving instructions, the AI user starts asking questions, roles invert, and the task dies. The paper quantified this: unconstrained agent pairs failed to maintain role separation within 2-3 exchanges on complex tasks.

Caption: The critical design is that BOTH agents receive role-locking inception prompts. The AI User is explicitly told not to provide instructions. Without this dual constraint, the user role drifts into an assistant role within a few exchanges.
The Workforce Abstraction (2024-2025 Evolution)
The original role-playing architecture is two-agent. The Workforce abstraction generalizes it: a coordinator agent assigns subtasks to specialist worker agents, monitors completion, handles handoffs, and escalates failures. Workers can be heterogeneous: a SearchAgent, a CodeAgent, and a BrowserAgent can collaborate on a single task without direct communication, mediated by the coordinator.
The OASIS environment (NeurIPS 2024) scales this to one million agents simulating social network dynamics (Reddit, Twitter). At this scale, the architecture switches to a message-passing model with network topology constraints, rather than direct pairwise communication. The finding: agent behavior in large social simulations produces emergent phenomena, including information cascade patterns and opinion polarization dynamics, that are qualitatively different from small-scale experiments.
The Code, Annotated
Snippet One: The Inception Prompt and Role-Playing Setup
from camel.agents import ChatAgent
from camel.societies import RolePlaying
from camel.types import TaskType
from camel.models import ModelFactory
from camel.types import ModelPlatformType, ModelType
# ─── Define the task and roles ────────────────────────────────────────────
task_prompt = "Develop a trading algorithm for the stock market."
user_role = "Python programmer"
assistant_role = "Stock trader"
# ─── RolePlaying session: this is where inception prompting happens ────────
# RolePlaying generates system prompts for BOTH agents internally.
# The assistant system prompt includes:
# "Never forget you are a {assistant_role}. Never flip roles."
# The user system prompt includes:
# "Never forget you are a {user_role}. You must ask the assistant to complete
# the task step by step. Do not give instructions yourself."
# ← THIS is the trick: role-locking is injected at the system prompt level,
# not at the application level. The agents cannot override it mid-conversation
# because it is embedded in every message's context via the system prompt.
role_play_session = RolePlaying(
assistant_role_name=assistant_role,
user_role_name=user_role,
task_prompt=task_prompt,
task_type=TaskType.AI_SOCIETY, # enables the AI Society prompt templates
with_task_specify=True, # ← runs TaskSpecifierAgent first to sharpen the task
# The task specifier takes "Develop a trading algorithm" →
# "Create a Python script that uses quantitative techniques including
# momentum indicators, moving average crossovers, and RSI to identify..."
model_config=None, # uses default model (gpt-4o or configured default)
)
# ─── Run the conversation loop ────────────────────────────────────────────
n = 0
input_msg = role_play_session.init_chat() # ← returns first instruction from AI User
while n < 10:
n += 1
# Step returns (assistant_response, user_response, is_terminated, is_done)
assistant_response, user_response = role_play_session.step(input_msg)
# ← The termination sentinel: when either agent outputs "<CAMEL_TASK_DONE>",
# the loop exits cleanly. This prevents infinite loops without a token budget.
if role_play_session.terminated:
print("Task completed!")
break
input_msg = assistant_response.msg # next step uses assistant's last message as input
print(f"[AI User]: {user_response.msg.content}")
print(f"[AI Assistant]: {assistant_response.msg.content}")
Caption: with_task_specify=True is the parameter most teams skip. Without the TaskSpecifierAgent, vague tasks like "develop a trading algorithm" produce shallow, generic responses. The specifier forces the downstream agents to work on a concrete, measurable subtask.
Snippet Two: Workforce with Tool-Enabled Agents
from camel.societies.workforce import Workforce
from camel.agents import ChatAgent
from camel.toolkits import SearchToolkit, BrowserToolkit, CodeExecutionToolkit
from camel.models import ModelFactory
from camel.types import ModelPlatformType, ModelType
# ─── Build specialist agents with domain-specific toolkits ────────────────
# Each worker gets its own tool subset. This is deliberate:
# giving every agent access to every tool produces noisy tool selection
# and higher latency per step. Scoped toolkits force specialization.
search_agent = ChatAgent(
system_message="You are a research specialist. Find and summarize relevant information.",
tools=SearchToolkit().get_tools(), # arXiv, web search, news
model=ModelFactory.create(...),
)
code_agent = ChatAgent(
system_message="You are a software engineer. Write and execute Python code.",
tools=CodeExecutionToolkit(sandbox="docker").get_tools(),
# ← sandbox="docker" isolates execution: code runs in a Docker container,
# not the host Python process. This is the correct default for untrusted
# agent-generated code. In-process execution is available but carries
# the same risk as eval() in production.
model=ModelFactory.create(...),
)
browser_agent = ChatAgent(
system_message="You are a web automation specialist. Navigate and extract web content.",
tools=BrowserToolkit().get_tools(),
model=ModelFactory.create(...),
)
# ─── Compose into a Workforce ─────────────────────────────────────────────
# The Workforce coordinator handles task decomposition and agent routing.
# Workers are described by their system messages; the coordinator routes
# subtasks to the worker whose description best matches the subtask type.
# ← THIS is the trick: the coordinator does NOT have direct access to workers'
# tools. It only sees their self-descriptions and their outputs.
# This separation means adding a new specialist is one line: workforce.add_worker().
workforce = Workforce(
description="A research and engineering team for comprehensive analysis tasks."
)
workforce.add_worker(search_agent, description="Searches and retrieves research information")
workforce.add_worker(code_agent, description="Writes and executes Python code and analysis")
workforce.add_worker(browser_agent, description="Navigates websites and extracts web content")
# ─── Execute a complex task requiring all three specialists ────────────────
task = "Research the latest transformer architecture papers, extract key metrics, and generate a comparison chart."
result = workforce.process_task(task)
print(result)
# Expected flow:
# Coordinator → SearchAgent: "Find papers on transformer architectures published in 2025"
# Coordinator → SearchAgent: "Extract MMLU and HumanEval benchmarks from each paper"
# Coordinator → CodeAgent: "Generate a matplotlib bar chart comparing the extracted metrics"
# Final output: task completion status + markdown summary + chart file path
Caption: sandbox="docker" is the security boundary that makes CAMEL's CodeExecutionToolkit production-usable. Agent-generated code executing in the host process is eval() with a marketing layer. Docker sandbox isolates it properly, at the cost of container startup latency (~0.5-2 seconds per isolated execution).
It In Action: End-to-End Synthetic Data Generation
CAMEL's most commercially significant contribution is synthetic data generation. The Databricks MPT-30B-Chat training set included CAMEL AI-sourced data. The Microsoft Phi model training data included CAMEL AI-sourced data. The OpenHermes model used the CAMEL AI "Domain Expert" dataset of 25,000 role-playing conversations between GPT-3.5-Turbo agents.
Scenario: Generate domain-expert Q&A data for a specific vertical (legal reasoning).
Step 1: Role configuration
Assistant role: "Legal expert specializing in contract law and corporate litigation"
User role: "Junior associate attorney seeking guidance"
Task domain: "Contract clause interpretation and risk identification"
Step 2: Task specification (TaskSpecifierAgent output)
Input: "Generate legal Q&A conversations"
Output: "Conduct a structured consultation where the junior associate presents
a specific ambiguous contract clause involving limitation-of-liability provisions
in SaaS agreements, and the legal expert analyzes enforceability, jurisdiction
variations, and practical risk mitigation approaches, producing step-by-step
reasoning that a junior attorney could follow."
Step 3: Conversation generation (one turn)
AI User: "I'm reviewing a SaaS agreement with this clause: 'In no event shall
the Provider's liability exceed the fees paid by Customer in the preceding
12 months.' The customer is concerned this is insufficient. How should I analyze this?"
AI Assistant: "First, assess the cap amount relative to potential damages.
For a $10K/year SaaS subscription, a $10K cap on a data breach causing
$500K in losses is economically inadequate. Second, check jurisdiction:
courts in California and New York scrutinize limitation clauses in consumer
contexts more strictly than B2B. Third, look for carve-outs: most well-
drafted agreements exclude indemnification for IP infringement and gross
negligence from the cap. I'd recommend negotiating a separate IP indemnity
cap at 3-5x the annual contract value..."
[<CAMEL_TASK_DONE> after 6 exchanges]
Step 4: Quality filtering (verifier loop)
Completeness check: Did assistant address all three analysis dimensions? ✓
Factual accuracy: Are jurisdiction claims verifiable? ✓ (cross-referenced with legal sources)
Role consistency: Did user maintain junior associate framing throughout? ✓
Data written to: camel_legal_dataset.jsonl
Output metrics from CAMEL's published domain expert dataset:
Total conversations: 25,000
Average turns per conversation: 6.2
Average tokens per conversation: ~2,400
Domains covered: 50 (from coding to finance to law to medicine)
Used in training: Databricks MPT-30B-Chat, Teknium OpenHermes, Microsoft Phi
Why This Design Works (and What It Trades Away)
Inception prompting is the right solution to role drift, but it introduces a different tradeoff: rigidity. Once roles are locked in the system prompt, agents cannot dynamically reframe their approach when the task changes character. A stock-trader agent asked to write code will write code from a trader's perspective rather than delegating to a more appropriate agent. In the original two-agent architecture, this is by design: the human supervisor is expected to configure the right role pair for each task.
The Workforce abstraction addresses this by introducing a coordinator that can dynamically route subtasks to the right specialist, but it introduces a different failure mode: coordinator hallucination. If the coordinator's task decomposition is wrong, all downstream work is wrong, and there is no automatic recovery without a human checkpoint or a verifier agent. CAMEL's SETA (Self-Evolving Teaching Agents) system adds this: a verifier loop that scores outputs and reruns subtasks that fall below quality thresholds.
The statefulness design principle is correct but expensive. Managing context as explicit state transitions (rather than accumulated chat history) means the framework can maintain coherent multi-hop reasoning across hundreds of exchanges. The cost is memory overhead and the need for explicit state schema design per task type. Teams that do not define state schemas end up with agents that hallucinate context that was never serialized.
The code-as-prompt principle is the most forward-looking design decision. Every ChatAgent system message is designed to be readable by both a human and another agent. This is what enables CAMEL agents to extend the system: an agent that reads its own code can write new tool definitions, new agent configurations, or new task templates. This closes the loop from agent interaction to framework extension without human mediation.
Technical Moats
The synthetic data ecosystem is self-reinforcing. CAMEL agents generate data. That data trains models. Better models make better CAMEL agents. The 25,000-conversation Domain Expert dataset was generated with GPT-3.5-Turbo in 2023. CAMEL agents now run on models partly trained on that data. The flywheel is real: Databricks and Microsoft used CAMEL data because it was the only large-scale, structured, domain-expert synthetic conversation dataset available in 2023. Reproducing that position now requires both the data generation infrastructure and the community adoption that gives the data downstream credibility.
OASIS's one-million-agent architecture is not a scaling trick. Most "multi-agent" demonstrations run 5-20 agents. OASIS (NeurIPS 2024) ran one million agents in a single simulation of social network dynamics. This required solving real distributed systems problems: efficient message routing at scale, agent state compression, emergent behavior detection without per-agent inspection, and simulation clock management. The resulting architecture is the most complete implementation of a large-scale agent society infrastructure in the public research ecosystem.
The research pipeline is the product. CAMEL is not primarily a framework; it is a research organization that publishes frameworks as outputs. NeurIPS 2023 (CAMEL), NeurIPS 2024 (OASIS, CRAB, AGENT-TRUST), ICLR 2025 (EMOS), NeurIPS 2025 (OWL). The frameworks are the reproducibility artifacts of the research. This means every major component has a peer-reviewed design rationale, benchmarks, and ablations behind it, not just engineering intuition.
Contrarian Insights
Insight One: CAMEL's "first multi-agent framework" claim obscures what actually makes it differentiated. AutoGPT shipped in March 2023 (same month as the CAMEL paper). LangChain agents shipped in February 2023. The distinction that matters is not chronology but architecture: CAMEL introduced the role-playing coordination mechanism with formal inception prompting, and it was the first to publish large-scale empirical results on multi-agent cooperation in a peer-reviewed venue (NeurIPS). The "first and best" framing on the homepage is marketing. The actual contribution, inception prompting as a solution to role drift, is defensible and well-evidenced.
Insight Two: The Workforce abstraction's coordinator is the weakest link and the least-documented component. The Workforce coordinator is an LLM agent that decomposes tasks and routes them to specialists. At every routing decision, it can hallucinate: it can assign a task to the wrong specialist, mischaracterize what was completed, or fail to detect when a subtask requires human intervention. CAMEL's documentation covers Workforce setup clearly but does not cover coordinator failure modes, recovery patterns, or the conditions under which a human checkpoint is required. Teams deploying Workforce for production tasks will discover these failure modes empirically. The research publications focus on success cases; the error rates and failure taxonomy are not published.
Surprising Takeaway
CAMEL's agents generated a dataset that was used to train the models that CAMEL agents now run on. The causal chain: CAMEL 2023 used GPT-3.5-Turbo to generate 25,000 domain expert conversations → Databricks used that data to train MPT-30B-Chat → community used MPT-30B-Chat as a CAMEL backend → better conversations → more data. Microsoft Phi similarly. The framework's own synthetic data generation pipeline was the input to models that became the framework's execution backends. This is not a metaphor for the AI data flywheel. It is the actual documented data lineage for multiple production models.
TL;DR For Engineers
CAMEL (camel-ai/camel, Apache 2.0, NeurIPS 2023) is a multi-agent framework built around inception prompting: both the assistant and user agents receive role-locking system prompts that prevent role drift, the primary failure mode in unstructured multi-agent conversation.
Four abstractions:
ChatAgent(single reasoning unit + tools + memory),RolePlaying(two-agent coordination with inception prompts),Workforce(N-agent hierarchical task decomposition), andSynthetic Data Engines(self-instruct, verifier loops, CoT pipelines).OASIS (NeurIPS 2024): one million agents in a single social simulation. OWL (NeurIPS 2025): optimized workforce learning for real-world task automation. SETA: self-evolving agent system via interaction-driven RL. CRAB: cross-environment benchmark for Ubuntu and Android automation.
The synthetic data pipeline generated 25,000 domain expert conversations that contributed to Databricks MPT-30B-Chat, Microsoft Phi, and Teknium OpenHermes training data.
pip install camel-ai[all]installs all toolkits, interpreters, and storage backends.Critical production note:
CodeExecutionToolkit(sandbox="docker")is mandatory for agent-generated code. The default in-process interpreter iseval()with no sandboxing. Docker sandbox adds 0.5-2 seconds per isolated execution; that is the correct tradeoff.
Explain It Like I'm New
Most AI assistants work alone. You ask a question, the AI answers. The more complex the task, the more the AI struggles, because it has to hold too much in mind at once.
Multi-agent systems try to solve this the way human teams do: break the work into parts, assign each part to a specialist, and coordinate the results. A research analyst, a data engineer, and a writer working together can tackle problems that any one of them would fail alone.
CAMEL was built to study this at scale, and its core insight was a practical one. When you put two AI agents in conversation and tell them to collaborate, they quickly start confusing each other's roles. The AI that is supposed to ask questions starts answering them. The AI that is supposed to instruct starts following instructions. The whole coordination breaks down.
The solution CAMEL introduced is called inception prompting: each agent receives a set of instructions built into its context at the very start, telling it exactly what role it plays and what behaviors are and are not allowed. These instructions cannot be overwritten by the other agent during the conversation. It is similar to giving each member of a team a job description that they cannot ignore, no matter what their colleagues say.
What makes CAMEL interesting beyond the basic coordination mechanism is its ambition. The team wants to understand how agent performance scales, the same way deep learning researchers study how model performance scales with data and compute. Their OASIS project ran one million AI agents in a simulated social network to observe how information spreads and opinions form at scale. That kind of experiment is only possible with a framework designed from the start for large-scale coordination.
See It In Action
CAMEL Official Documentation Source: CAMEL-AI | https://docs.camel-ai.org/get_started/introduction The most complete entry point: quickstart, cookbook examples for data generation, RAG, social simulation, and the full tech stack index. The cookbooks are practical, runnable examples rather than marketing overviews.
CAMEL: Communicative Agents (NeurIPS 2023 Paper) Source: Li et al. / arXiv | https://arxiv.org/abs/2303.17760 The original paper with the role-playing formalization, inception prompting mechanics, and the quantitative analysis of cooperation quality across agent pairs. The 77-page appendix contains the full prompt templates used for inception prompting.
OASIS: Open Agent Social Interaction Simulations (NeurIPS 2024) Source: CAMEL-AI / arXiv | https://arxiv.org/abs/2411.11581 The one-million-agent architecture paper. Contains the distributed message-passing design, emergent behavior measurements, and the comparison between simulated and real social network dynamics.
OWL: Optimized Workforce Learning (NeurIPS 2025) Source: CAMEL-AI / arXiv | https://arxiv.org/abs/2505.23885 The most recent major framework paper. OWL extends Workforce with learned task routing and dynamic specialist allocation. The benchmark results against GAIA, WebArena, and real-world task automation benchmarks are the most complete evaluation of the framework's production capabilities.
CAMEL YouTube Channel Source: CAMEL-AI | https://www.youtube.com/@CamelAI Technical walkthrough videos for cookbook examples, including the Workforce setup, tool integration, and the OASIS simulation demos. The live coding sessions are the fastest path from reading the paper to running code.
Community Conversation
Sophia Yang (Head of Developer Relations, Mistral AI) https://www.camel-ai.org Quoted directly on the CAMEL homepage: "The essence of Camel lies in its prompt engineering, i.e., inception prompting. The prompts are actually carefully defined to assign roles, prevent flipping roles, prohibit harm and false information, and encourage consistent conversation." This is the most precise public characterization of what makes CAMEL architecturally distinct.
Sam Witteveen (Co-founder, Red Dragon AI) https://www.camel-ai.org "It's an unbelievably good way to make synthetic data. If you're trying to create any sort of customer service or chatbot agent that communicates with the public, this allows you to make synthetic data for training and fine-tuning." The synthetic data use case is consistently the highest-adoption path for CAMEL in production.
CAMEL-AI on X (@CamelAIOrg) https://x.com/CamelAIOrg The official account announces paper releases and community experiments. The OASIS announcement thread is the most informative: it explains the one-million-agent simulation in accessible terms and links to the full paper with benchmark comparisons.
Databricks on CAMEL training data attribution https://www.camel-ai.org Databricks confirmed that MPT-30B-Chat used CAMEL AI-sourced data in its training set. The attribution appeared in the model card and was referenced in the CAMEL project documentation. This is the most concrete evidence of the framework's downstream data impact.
The Scaling Law Question Is the Right Question
AutoGPT had more GitHub stars in 2023. LangChain had more integrations. CrewAI has better documentation for quick starts. CAMEL has something none of them have: a research program studying what actually happens when you scale the number of agents.
The question "what are the scaling laws of agents?" is the right question. Deep learning spent a decade answering the analogous question for model size, data size, and compute. The answers changed what was built and how. CAMEL is asking the same question for agent count, agent diversity, communication topology, and environment complexity. OASIS's one million agents is the current frontier of that experiment.
Whether the answer looks like a power law, a phase transition at some critical agent count, or something entirely different will determine what the multi-agent infrastructure of 2030 looks like. CAMEL is the most complete attempt to find out.
References
OASIS: Open Agent Social Interaction Simulations with One Million Agents (arXiv:2411.11581), CAMEL-AI, NeurIPS 2024
OWL: Optimized Workforce Learning for General Multi-Agent Assistance (arXiv:2505.23885), CAMEL-AI, NeurIPS 2025
CRAB: Cross-environment Agent Benchmark for Multimodal Language Model Agents (arXiv:2407.01511), CAMEL-AI, NeurIPS 2024
EMOS: Embodiment-aware Heterogeneous Multi-robot Operating System (arXiv:2410.22662), CAMEL-AI, ICLR 2025
CAMEL (NeurIPS 2023) introduced inception prompting, a role-locking system prompt mechanism that prevents role drift in multi-agent conversation, and built it into an open-source framework now spanning single ChatAgents, two-agent RolePlaying sessions, N-agent Workforce hierarchies, one-million-agent social simulations (OASIS, NeurIPS 2024), and learned workforce optimization (OWL, NeurIPS 2025). Its synthetic data pipeline generated 25,000 domain expert conversations used in Databricks MPT-30B-Chat, Microsoft Phi, and OpenHermes training, making it the most commercially impactful multi-agent framework by downstream data attribution.
Sponsored Ad
If you enjoy practical AI insights, check out SnackOnAI and support the newsletter by subscribing, sharing, and exploring our sponsored ad — it helps us keep building and delivering value 🚀
AI help, without the trust tax.
Most AI tools ask you to trade your data for intelligence. Norton Neo doesn't. It's the first safe AI-native browser built by Norton, and it gives you powerful built-in AI without handing your privacy over to get it. Search, summarize, and write with AI built directly into your browser. Your data stays yours. Your context stays private.
Built-in VPN, anti-fingerprinting, and ad blocking come standard. No add-ons. No setup. No compromises.
Fast. Safe. Intelligent. That's Neo.


