Overseas access: www.kdjingpai.com
Bookmark Us

CAMEL-AI is an open source multi-intelligent body framework focused on researching and building collaborative AI systems. Its core goal is to explore the scaling laws of intelligences and support the simulation and interaction of up to millions of intelligences.CAMEL-AI provides flexible tools and modules to help developers create autonomous and collaborative intelligences for applications such as task automation, data generation, and social simulation. The project is driven by a community of over 100 researchers around the world, with an emphasis on openness and academic research. The code is based on the Apache 2.0 license, and the dataset is licensed under the CC BY NC 4.0 license for non-commercial use only. Users can access the source code, participate in community contributions, or obtain technical support via GitHub. CAMEL-AI is suitable for researchers and developers to explore the behavior and potential of complex multi-intelligence systems.

 

Function List

  • Supports simulation of up to 1 million intelligences to study the behavior of large-scale intelligence collaboration.
  • Provides a variety of intelligent body roles and task settings to support cross-disciplinary experimentation and research.
  • Built-in toolset with search, mathematical calculations, code execution and image analysis features.
  • Supporting real-time interaction, intelligences can communicate and collaborate through natural language.
  • Provides a data generation module to generate high-quality inference paths and multi-hop quiz data.
  • Integrated reinforcement learning environment where intelligences can continuously optimize performance through feedback.
  • Provides a standardized performance evaluation framework to ensure repeatable and comparable results.
  • Supports connectivity to external knowledge bases to enhance the decision-making capabilities of intelligences.

Using Help

Installation process

To use CAMEL-AI, you first need to install the necessary environment and dependencies. Below are the detailed installation steps, based on the latest information from the official documentation:

  1. Checking the Python Version
    CAMEL-AI supports Python 3.10, 3.11, or 3.12. Make sure you have a compliant 64-bit version of Python installed on your system. This can be checked with the following command:

    python --version
    
  2. Creating a Virtual Environment
    To avoid dependency conflicts, it is recommended to use a virtual environment. Use conda to create the environment:

    conda create --name camel_env python=3.10
    conda activate camel_env
    
  3. Clone CAMEL Warehouse
    Get the CAMEL-AI source code from GitHub:

    git clone https://github.com/camel-ai/camel.git
    cd camel
    
  4. Installation of dependencies
    Install the necessary dependencies, including PyTorch and other libraries. The following is a typical installation command:

    conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
    pip install -r requirements.txt
    pip install -e .
    

    If using a consumer GPU, try QLoRA for model fine-tuning by running the following script:

    bash scripts/train_camel_qlora.sh
    
  5. Verify Installation
    Once the installation is complete, run the test command to ensure that the environment is configured correctly:

    python -m camel_chat.serve.test_message --model-name /path/to/model
    

Key Features of Using CAMEL-AI

CAMEL-AI provides a variety of function modules, and the following are detailed operation descriptions of the main functions:

1. Creating multi-intelligence systems

The core of CAMEL-AI is to build collaborative multi-intelligentsia systems. You can start a project by defining intelligent body roles and tasks. For example, create a simple multi-intelligent body system:

  • Step 1: Define Intelligent Body Roles
    utilization ChatAgent The class creates an Intelligence, sets up roles and system prompts. Example:

    from camel.agents import ChatAgent
    from camel.messages import BaseMessage
    from camel.models import ModelFactory
    from camel.types import ModelPlatformType, ModelType
    sys_msg = BaseMessage.make_assistant_message(
    role_name="Assistant",
    content="You are a helpful assistant for task automation."
    )
    model = ModelFactory.create(
    model_platform=ModelPlatformType.OPENAI,
    model_type=ModelType.GPT_4O_MINI
    )
    agent = ChatAgent(system_message=sys_msg, model=model)
    
  • Step 2: Assignment of tasks
    Triggering an intelligent body to perform a task via a user message. Example:

    user_msg = "Search for recent AI research papers."
    response = agent.step(user_msg)
    print(response)
    

2. Utilization of the toolset

CAMEL-AI offers a rich set of tools such as SearchToolkit,MathToolkit cap (a poem) CodeExecutionToolkit.. To use the toolset, you need to load the tools when you initialize the smartbody:

from camel.toolkits import SearchToolkit
tools = [*SearchToolkit().get_tools()]
agent = ChatAgent(system_message=sys_msg, model=model, tools=tools)

Once running, the Intelligence can invoke tools to perform search or computation tasks. For example, search for CAMEL-AI related information:

user_msg = "What is CAMEL-AI.org?"
response = agent.step(user_msg)
print(response)

3. Data generation

CAMEL-AI Source2Synth The module supports generating multi-hop quiz data. Users can generate data by following steps:

  • Prepare the source text data (e.g. PDF or web content).
  • utilization Source2Synth The module processes text to generate complex question and answer pairs:
    from camel.data import Source2Synth
    s2s = Source2Synth()
    questions = s2s.generate_questions(source_text="your_text_here", complexity=3)
    print(questions)
    

    This can be done by adjusting the complexity Parameters control the difficulty of generating problems.

4. Social simulation

CAMEL-AI's OASIS module supports the simulation of the social behavior of up to 1 million intelligences. Additional dependencies need to be installed to run OASIS:

pip install camel-oasis

Start the OASIS simulation:

from oasis import OasisSimulator
simulator = OasisSimulator(num_agents=1000)
simulator.run_simulation(actions=["follow", "comment", "repost"])

Users can tweak the parameters to simulate social updates on Twitter or Reddit.

Get Support

If you encounter problems, you can get help in the following ways:

  • Join CAMEL-AI's Discord or WeChat community to join the discussion.
  • Submit an issue to GitHub to describe a problem or make a feature request.
  • Refer to the official documentation:https://www.camel-ai.org/docsThe

application scenario

  1. Research automation
    CAMEL-AI can be used to automate literature reviews. Researchers can collaborate with intelligences to quickly extract abstracts, keywords, and conclusions of papers to improve research efficiency.
  2. Social Media Analytics
    Use the OASIS module to simulate social media user behavior and analyze information dissemination, group polarization, and crowd effects for media monitoring and policy research.
  3. Task automation
    Developers can use CAMEL-AI to build automated workflows. For example, intelligences can monitor stock market sentiment and generate trading strategies.
  4. Education and training
    CAMEL-AI generates high-quality educational Q&A data for building intelligent tutoring systems or online learning platforms.

QA

  1. Is CAMEL-AI free?
    CAMEL-AI is an open source project and the code is free to use under the Apache 2.0 license. The dataset is for non-commercial use only and is licensed under CC BY NC 4.0.
  2. What hardware is required to run CAMEL-AI?
    Basic functions can be run on a normal laptop (8GB RAM required). High-performance GPUs, such as the A100, are required for large-scale simulations or model fine-tuning.
  3. How can I get involved in the CAMEL-AI community?
    Submit a pull request via GitHub or join the Discord/WeChat community to discuss and contribute code with researchers.
  4. What models does CAMEL-AI support?
    It supports OpenAI's GPT-4 and other models, as well as open-source models such as LLaMA, see the official documentation for specific configurations.
0Bookmarked
0kudos

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish