camel README

The project's README from github.com/camel-ai/camel. As one markdown file: README.md.

Banner

[![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]

camel-ai/camel | Trendshift

English | 简体中文 | 日本語


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

🐫 CAMEL is an open-source community dedicated to finding the scaling laws of agents. We believe that studying these agents on a large scale offers valuable insights into their behaviors, capabilities, and potential risks. To facilitate research in this field, we implement and support various types of agents, tasks, prompts, models, and simulated environments.


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.

Star

[![][image-join-us]][join-us]

Table of contents


CAMEL Framework Design Principles

🧬 Evolvability

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.

📈 Scalability

The framework is designed to support systems with millions of agents, ensuring efficient coordination, communication, and resource management at scale.

💾 Statefulness

Agents maintain stateful memory, enabling them to perform multi-step interactions with environments and efficiently tackle sophisticated tasks.

📖 Code-as-Prompt

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.

✅ Large-Scale Agent System Simulate up to 1M agents to study emergent behaviors and scaling laws in complex, multi-agent environments.
✅ Dynamic Communication Enable real-time interactions among agents, fostering seamless collaboration for tackling intricate tasks.
✅ Stateful Memory Equip agents with the ability to retain and leverage historical context, improving decision-making over extended interactions.
✅ Support for Multiple Benchmarks Utilize standardized benchmarks to rigorously evaluate agent performance, ensuring reproducibility and reliable comparisons.
✅ Support for Different Agent Types Work with a variety of agent roles, tasks, models, and environments, supporting interdisciplinary experiments and diverse research applications.
✅ Data Generation and Tool Integration Automate the creation of large-scale, structured datasets while seamlessly integrating with multiple tools, streamlining synthetic data generation and research workflows.

What Can You Build With CAMEL?

1. Data Generation

CoT Data Generation
Self-Instruct Data Generation
Source2Synth Data Generation
Self-Improving Data Generation

2. Task Automation

Role Playing
Workforce
RAG Pipeline

3. World Simulation

Oasis Case

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.

  1. Install the tools package:
pip install 'camel-ai[web_tools]'
  1. 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
  1. 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).
  1. (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

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 Google Colab 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

TechStack

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:

OWL
OASIS
CRAB
Loong
Agent Trust
Emos

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.

Partners

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.

camel (camel-ai/camel)

Searching Database…

17.9K ·GitHub
这是什么?CAMEL 是一个开源的多智能体框架,用于构建、模拟和研究由大语言模型驱动的智能体,规模可以很大,目标是探索“智能体的缩放定律”。
这是一个框架,还是只是一个聊天机器人?它是一个 Python 框架,提供智能体架构、多智能体群体、记忆、工具和基准测试,你可以在它之上搭建自己的系统,它本身不是一个独立的应用。
我该怎么让它跑起来?先从 PyPI 安装,然后用 CAMEL 库在 Python 中创建一个 ChatAgent。
运行示例需要 OpenAI 的 API 密钥吗?快速入门示例会设置 OpenAI API 密钥(可以直接设置,也可以通过 .env 文件设置),并安装一个额外的工具包,用于 DuckDuckGo 搜索等功能;其他模型后端也受支持。
它开箱即可支撑真正的大规模智能体集群吗,还是只是一个愿景?README 将百万级智能体模拟定位为研究目标和研究能力,用于研究缩放定律,并不是保证可以直接部署的方案;要真正用于生产,还需要你自己搭建编排以及模型和 API 配置。
这个项目究竟是为谁打造的?它主要面向研究多智能体系统的研究人员,不过基于 CAMEL 构建的真实产品和研究项目,也使用的是同一个框架。
用 CAMEL 到底能做些什么?README 重点列出了三个主要用途:合成数据生成、任务自动化,以及多智能体交互的世界模拟。
它支持调试和记录智能体的调用日志吗?支持。你可以开启 CAMEL_MODEL_LOG_ENABLED,把请求和响应日志以 UTF-8 编码的 JSON 格式写入可配置的日志目录,并保留多语言文本。
技术栈模块包括哪些内容?主要模块包括:Agents(智能体)、Agent Societies(智能体群体)、Data Generation(数据生成)、Models(模型)、Tools(工具)、Memory(记忆)、Storage(存储)、Benchmarks(基准测试)、Interpreters(解释器)、Data Loaders(数据加载器)、Retrievers(检索器)、Runtime(运行时),以及 Human-in-the-Loop(人在回路)组件。
有现成的数据集或教程可以学习吗?有。CAMEL 在 Hugging Face 上提供了合成数据集,包括 AI Society、Code、Math、Physics、Chemistry 和 Biology,还提供了教程(cookbooks),内容从基础概念一直到高级多智能体应用。
Creator
camel-ai
Size
494.4 MB
Stars
17.9K
Age
3y
Commits · 90 Days