logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Cooperative AI Agents Framework

A software toolkit engineered to foster collaborative interaction among autonomous communicative agents, thereby boosting their efficacy in complex problem resolution. It furnishes an extensible, publicly available platform and associated libraries tailored for empirical investigation into AI societal structures.

Author

Cooperative AI Agents Framework logo

Wendong-Fan

Apache License 2.0

Quick Info

GitHub GitHub Stars 2
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

aicooperationcloudautonomous communicativecommunicative agentsai societies

CAMEL: Communicative Agents for “Mind” Exploration of Large Scale Language Model Society

![Python 3.9+](https://img.shields.io/badge/Python-3.9%2B-brightgreen.svg) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/camel-ai/camel/pytest_package.yml?label=tests&logo=github) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/camel-ai/camel/documentation.yaml?label=docs&logo=github) GitHub Repo Stars ![License](https://img.shields.io/github/license/camel-ai/camel?label=license&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjZmZmZmZmIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMi43NSAyLjc1YS43NS43NSAwIDAwLTEuNSAwVjQuNUg5LjI3NmExLjc1IDEuNzUgMCAwMC0uOTg1LjMwM0w2LjU5NiA1Ljk1N0EuMjUuMjUgMCAwMTYuNDU1IDZIMi4zNTNhLjc1Ljc1IDAgMTAwIDEuNUgzLjkzTC41NjMgMTUuMThhLjc2Mi43NjIgMCAwMC4yMS44OGMuMDguMDY0LjE2MS4xMjUuMzA5LjIyMS4xODYuMTIxLjQ1Mi4yNzguNzkyLjQzMy42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DIuNTQ3LS41NzZMMTkuMjUgOS4zNjdsLTIuNTQ3IDUuODA3eiI+PC9wYXRoPjwvc3ZnPgo=)

Community | Installation | Documentation | Examples | Paper | Citation | Contributing | CAMEL-AI

Overview

Remarkable strides have been made in complex task execution through the rapid evolution of conversational and chat-based large language models. Nevertheless, their efficacy is heavily reliant on continuous human guidance, often proving cumbersome and resource-intensive. This research investigates methodologies for enabling scalable, autonomous collaboration among communicative agents to gain deeper comprehension of their internal "cognitive" mechanisms. To surmount the hurdles associated with achieving independent teamwork, we introduce a novel agent architecture termed role-playing. This methodology leverages inception prompting to steer conversational agents toward desired outcomes while ensuring fidelity to human intent. We demonstrate the utility of role-playing in synthesizing conversational datasets, which serve as a crucial asset for analyzing the operational characteristics and capacities of chat agents. Our primary contributions are the introduction of this novel communicative agent paradigm, the provision of a scalable mechanism for assessing cooperative multi-agent systems, and the public release of our library to support ongoing research in communicative AI and related domains. The project's source repository is publicly accessible at: https://github.com/camel-ai/camel.

Community

🐫 CAMEL functions as an open-source toolkit dedicated to the empirical study of self-governing, communicative entities. We maintain the conviction that large-scale observation of these agents yields significant understanding of their operational patterns, proficiencies, and potential hazards. To foster research in this domain, we implement and support diverse agent archetypes, task definitions, prompting strategies, model integrations, and simulated operational settings.

Engage with us (Slack, Discord or WeChat) as we endeavor to advance the frontier of constructing AI Societies.

Try it yourself

We offer a Google Colab demonstration that illustrates an interaction between two ChatGPT agents assuming the roles of a Python coder and a financial trader, working together to engineer a stock market trading application.

framework

Installation

Via PyPI

To incorporate the foundational camel library, execute: pip install camel-ai

Certain functionalities necessitate additional components.

For utilizing the Hugging Face agent capabilities, run: pip install camel-ai[huggingface-agent]

To activate Retrieval-Augmented Generation (RAG) or agent persistence mechanisms, execute: pip install camel-ai[tools]

To acquire the package with all supplementary dependencies, use: pip install camel-ai[all]

From Source Code

Install CAMEL directly from the source repository using Poetry (Recommended method): sh

Ensure your Python interpreter version is 3.9 or newer

Tools like pyenv can manage multiple Python installations on your system

Obtain a local copy of the repository

git clone https://github.com/camel-ai/camel.git

Navigate into the project directory

cd camel

Activate the camel isolated environment

poetry shell

Install camel from the local source files

Dependency resolution may take approximately 90 seconds

poetry install

Optionally, include the "huggingface agent" modules

poetry install -E huggingface-agent

Proceed with using the camel framework

Deactivate the virtual environment when done

exit

Install CAMEL from source using Conda and Pip: sh

Establish a new conda isolated environment

conda create --name camel python=3.10

Activate the newly created conda environment

conda activate camel

Clone the specified release version of the repository

git clone -b v0.1.0 https://github.com/camel-ai/camel.git

Move into the project directory

cd camel

Install camel from source in editable mode

pip install -e .

Optionally, include the "huggingface agent" modules

pip install -e .[huggingface-agent]

Documentation

Access the comprehensive CAMEL package documentation pages

Example

Consult this link for a curated list of tasks suitable for various assistant and user role pairings.

Execute the role_playing.py script.

Prerequisite: Your OpenAI access key must be configured within the system's environment variables. The procedure for this setup differs based on your operating system and the command-line interface in use.

For Bash environments (Linux, macOS, Git Bash on Windows):

bash

Set the environment variable for your OpenAI credential

export OPENAI_API_KEY= export OPENAI_API_BASE_URL= #(Specify if routing through an OpenAI proxy)

For Windows Command Prompt:

cmd REM Set the environment variable for your OpenAI credential set OPENAI_API_KEY= set OPENAI_API_BASE_URL= #(Specify if routing through an OpenAI proxy)

For Windows PowerShell:

powershell

Set the environment variable for your OpenAI credential

$env:OPENAI_API_KEY="" $env:OPENAI_API_BASE_URL="" #(Specify if routing through an OpenAI proxy)

Substitute <insert your OpenAI API key> with your genuine OpenAI API key in the relevant command block. Ensure no extraneous spaces border the = character.

Once the OpenAI key is established, run the script:

bash

Adjust the role definitions and starting instruction within role_playing.py as needed

python examples/ai_society/role_playing.py

Please remember that environment variable settings are temporary for the current terminal session. If a new terminal window or tab is opened, the API key must be re-set within that new context.

Utilizing Open-Source Inference Backends

The fundamental methodology for integrating open-source models involves running an external inference service, such as FastChat, which we utilized during the development phase.

We deliberately avoid fixing the inference server choice to maintain decoupling between CAMEL's internal logic and any specific server deployment. The required server, however, must expose an API compatible with OpenAI standards, specifically supporting the invocation openai.ChatCompletion.create.

Below are configuration steps for employing open-source backends, exemplified here with FastChat and a LLaMA2 derivative (meta-llama/Llama-2-7b-chat-hf). Ensure FastChat is installed according to its documentation beforehand. These commands must execute in distinct, concurrently running processes:

sh

Initiate the central controller

python -m fastchat.serve.controller

Start the model worker(s) corresponding to the desired model

python3 -m fastchat.serve.model_worker --model-path meta-llama/Llama-2-7b-chat-hf

Activate the RESTful interface server

python3 -m fastchat.serve.openai_api_server --host localhost --port 8000

  1. Upon confirmation that the controller has registered the worker's 'heart beat', the API endpoint at http://localhost:8000/v1 should be operational.

  2. Subsequently, execute role_playing_with_open_source_model.py. Agents in this scenario are instantiated by providing explicit parameters for model_path and server_url within their configuration, as illustrated below:

python system_message = # ...

agent_kwargs = dict( model=model_type, model_config=OpenSourceConfig( model_path="meta-llama/Llama-2-7b-chat-hf", server_url="http://localhost:8000/v1", ), )

agent = ChatAgent( system_message, **agent_kwargs, )

Supported Models

Data Archives (Hosted on Hugging Face)

Dataset Interaction Format Directive Format Translated Interaction Format
AI Society Interaction Format Directive Format Translated Interaction Format
Code Interaction Format Directive Format x
Math Interaction Format x x
Physics Interaction Format x x
Chemistry Interaction Format x x
Biology Interaction Format x x

Visual Representations of Directives and Assignments

Dataset Directives Overview Assignments Overview
AI Society Directives Visualization Assignments Visualization
Code Directives Visualization Assignments Visualization
Misalignment Directives Visualization Assignments Visualization

Implemented Research Concepts from External Works

We have integrated innovative research concepts from other publications to facilitate agent construction and comparative analysis. If any of these components are leveraged, kindly ensure appropriate citation of the original sources: - Components like TaskCreationAgent, TaskPrioritizationAgent, and the BabyAGI pattern originate from Nakajima et al.: Task-Driven Autonomous Agent. [Implementation Example]

Updates

  • Introduction of the AI Society and Code datasets (April 2, 2023)
  • Initial public release of the CAMEL Python library (March 21, 2023)

Citation

@inproceedings{li2023camel, title={CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society}, author={Li, Guohao and Hammoud, Hasan Abed Al Kader and Itani, Hani and Khizbullin, Dmitrii and Ghanem, Bernard}, booktitle={Thirty-seventh Conference on Neural Information Processing Systems}, year={2023} }

Acknowledgements

We extend sincere gratitude to Nomic AI for providing extensive access to their data exploration utility (Atlas).

We also wish to thank Haya Hammoud for designing the project's visual identity.

Licensing

The intended scope and licensing terms for CAMEL are strictly limited to academic and non-commercial research applications.

The software's source code falls under the Apache 2.0 license.

The datasets are governed by the CC BY NC 4.0 license, restricting usage exclusively to non-commercial activities. Any language models developed utilizing this dataset should likewise be confined to research purposes.

Contributing to CAMEL 🐫

We welcome community involvement in this open-source endeavor. Detailed instructions for submitting contributions are provided in our contributing guidelines document. Please adhere to this guide for a streamlined collaboration process. 🤝🚀

Contact

For further inquiries, please reach out to camel.ai.team@gmail.com.

WIKIPEDIA: Cloud computing is "a paradigm for enabling network access to a scalable and elastic pool of shareable physical or virtual resources with self-service provisioning and administration on-demand," according to ISO. It is commonly referred to as "the cloud".

== Characteristics == In 2011, the National Institute of Standards and Technology (NIST) identified five "essential characteristics" for cloud systems. Below are the exact definitions according to NIST:

On-demand self-service: "A consumer can unilaterally provision computing capabilities, such as server time and network storage, as needed automatically without requiring human interaction with each service provider." Broad network access: "Capabilities are available over the network and accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, tablets, laptops, and workstations)." Resource pooling: " The provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to consumer demand." Rapid elasticity: "Capabilities can be elastically provisioned and released, in some cases automatically, to scale rapidly outward and inward commensurate with demand. To the consumer, the capabilities available for provisioning often appear unlimited and can be appropriated in any quantity at any time." Measured service: "Cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency for both the provider and consumer of the utilized service. By 2023, the International Organization for Standardization (ISO) had expanded and refined the list.

== History ==

The history of cloud computing extends to the 1960s, with the initial concepts of time-sharing becoming popularized via remote job entry (RJE). The "data center" model, where users submitted jobs to operators to run on mainframes, was predominantly used during this era. This was a time of exploration and experimentation with ways to make large-scale computing power available to more users through time-sharing, optimizing the infrastructure, platform, and applications, and increasing efficiency for end users. The "cloud" metaphor for virtualized services dates to 1994, when it was used by General Magic for the universe of "places" that mobile agents in the Telescript environment could "go". The metaphor is credited to David Hoffman, a General Magic communications specialist, based on its long-standing use in networking and telecom. The expression cloud computing became more widely known in 1996 when Compaq Computer Corporation drew up a business plan for future computing and the Internet. The company's ambition was to superch

return

See Also

`