2023-09-04 14:24:28 +03:00
# Communicative Agents for Software Development
< p align = "center" >
2023-09-25 09:33:09 +03:00
< img src = './misc/logo1.png' width = 550 >
2023-09-04 14:24:28 +03:00
< / p >
< p align = "center" >
2023-10-11 00:11:23 +03:00
【English | < a href = "README-Chinese.md" > Chinese< / a > | < a href = "README-Japanese.md" > Japanese< / a > | < a href = "README-Korean.md" > Korean< / a > | < a href = "README-Filipino.md" > Filipino< / a > | < a href = "README-French.md" > French< / a > | < a href = "README-Slovak.md" > Slovak< / a > 】
2023-09-04 14:24:28 +03:00
< / p >
2023-09-20 10:22:30 +03:00
< p align = "center" >
【📚 < a href = "wiki.md" > Wiki< / a > | 🚀 < a href = "wiki.md#local-demo" > Local Demo< / a > | 👥 < a href = "Contribution.md" > Community Built Software< / a > | 🔧 < a href = "wiki.md#customization" > Customization< / a > 】
< / p >
2023-09-04 14:24:28 +03:00
## 📖 Overview
2023-09-06 06:06:31 +03:00
- **ChatDev** stands as a **virtual software company** that operates through various **intelligent agents** holding
2023-09-20 10:22:30 +03:00
different roles, including Chief Executive Officer < img src = 'online_log/static/figures/ceo.png' height = 20 > , Chief Product Officer < img src = 'online_log/static/figures/cpo.png' height = 20 > , Chief Technology Officer < img src = 'online_log/static/figures/cto.png' height = 20 > , programmer < img src = 'online_log/static/figures/programmer.png' height = 20 > , reviewer < img src = 'online_log/static/figures/reviewer.png' height = 20 > , tester < img src = 'online_log/static/figures/tester.png' height = 20 > , art designer < img src = 'online_log/static/figures/designer.png' height = 20 > . These
2023-09-06 06:06:31 +03:00
agents form a multi-agent organizational structure and are united by a mission to "revolutionize the digital world
through programming." The agents within ChatDev **collaborate** by participating in specialized functional seminars,
including tasks such as designing, coding, testing, and documenting.
- The primary objective of ChatDev is to offer an **easy-to-use** , **highly customizable** and **extendable** framework,
which is based on large language models (LLMs) and serves as an ideal scenario for studying collective intelligence.
2023-09-25 09:33:09 +03:00
< p align = "center" >
< img src = './misc/company.png' width = 600 >
< / p >
2023-09-04 14:24:28 +03:00
2023-10-07 10:02:35 +03:00
## 🎉 News
2023-09-04 14:24:28 +03:00
2023-09-25 11:44:55 +03:00
* **September 25th, 2023: The **Git** feature is now available**, enabling the programmer < img src = 'online_log/static/figures/programmer.png' height = 20 > to utilize GitHub for version control. To enable this feature, simply set ``"git_management"`` to ``"True"`` in ``ChatChainConfig.json``.
2023-09-25 11:43:01 +03:00
< p align = "center" >
< img src = './misc/github.png' width = 600 >
< / p >
2023-09-25 09:33:09 +03:00
* September 20th, 2023: The **Human-Agent-Interaction** mode is now available! You can get involved with the ChatDev team by playing the role of reviewer < img src = 'online_log/static/figures/reviewer.png' height = 20 > and making suggestions to the programmer < img src = 'online_log/static/figures/programmer.png' height = 20 > ;
try ``python3 run.py --task [description_of_your_idea] --config "Human"``. See [guide ](wiki.md#human-agent-interaction ) and [example ](WareHouse/Gomoku_HumanAgentInteraction_20230920135038 ).
2023-09-25 11:43:01 +03:00
< p align = "center" >
< img src = './misc/Human_intro.png' width = 600 >
< / p >
2023-09-25 09:33:09 +03:00
* September 1st, 2023: The **Art** mode is available now! You can activate the designer agent < img src = 'online_log/static/figures/designer.png' height = 20 > to generate images used in the software;
2023-09-20 10:22:30 +03:00
try ``python3 run.py --task [description_of_your_idea] --config "Art"``. See [guide ](wiki.md#art ) and [example ](WareHouse/gomokugameArtExample_THUNLP_20230831122822 ).
* August 28th, 2023: The system is publicly available.
2023-09-25 09:33:09 +03:00
* August 17th, 2023: The v1.0.0 version was ready for release.
2023-09-20 10:22:30 +03:00
* July 30th, 2023: Users can customize ChatChain, Phase, and Role settings. Additionally, both online Log mode and replay
2023-09-06 06:06:31 +03:00
mode are now supported.
2023-09-20 10:22:30 +03:00
* July 16th, 2023: The [preprint paper ](https://arxiv.org/abs/2307.07924 ) associated with this project was published.
2023-09-25 09:33:09 +03:00
* June 30th, 2023: The initial version of the ChatDev repository was released.
2023-09-04 14:24:28 +03:00
## ❓ What Can ChatDev Do?
![intro ](misc/intro.png )
https://github.com/OpenBMB/ChatDev/assets/11889052/80d01d2f-677b-4399-ad8b-f7af9bb62b72
## ⚡️ Quickstart
To get started, follow these steps:
1. **Clone the GitHub Repository:** Begin by cloning the repository using the command:
```
git clone https://github.com/OpenBMB/ChatDev.git
```
2023-09-06 06:06:31 +03:00
2. **Set Up Python Environment:** Ensure you have a version 3.9 or higher Python environment. You can create and
activate this environment using the following commands, replacing `ChatDev_conda_env` with your preferred environment
name:
2023-09-04 14:24:28 +03:00
```
conda create -n ChatDev_conda_env python=3.9 -y
conda activate ChatDev_conda_env
```
3. **Install Dependencies:** Move into the `ChatDev` directory and install the necessary dependencies by running:
```
cd ChatDev
pip3 install -r requirements.txt
```
2023-09-06 06:06:31 +03:00
4. **Set OpenAI API Key:** Export your OpenAI API key as an environment variable. Replace `"your_OpenAI_API_key"` with
your actual API key. Remember that this environment variable is session-specific, so you need to set it again if you
open a new terminal session.
2023-09-04 14:24:28 +03:00
On Unix/Linux:
```
export OPENAI_API_KEY="your_OpenAI_API_key"
```
On Windows:
```
$env:OPENAI_API_KEY="your_OpenAI_API_key"
```
2023-09-06 06:06:31 +03:00
5. **Build Your Software:** Use the following command to initiate the building of your software,
replacing `[description_of_your_idea]` with your idea's description and `[project_name]` with your desired project
name:
2023-09-11 00:02:34 +03:00
On Unix/Linux:
2023-09-04 14:24:28 +03:00
```
python3 run.py --task "[description_of_your_idea]" --name "[project_name]"
```
2023-09-12 06:06:06 +03:00
On Windows:
2023-09-11 00:02:34 +03:00
```
python run.py --task "[description_of_your_idea]" --name "[project_name]"
```
2023-09-06 06:06:31 +03:00
6. **Run Your Software:** Once generated, you can find your software in the `WareHouse` directory under a specific
project folder, such as `project_name_DefaultOrganization_timestamp` . Run your software using the following command
within that directory:
2023-09-12 06:06:06 +03:00
On Unix/Linux:
2023-09-04 14:24:28 +03:00
```
cd WareHouse/project_name_DefaultOrganization_timestamp
python3 main.py
```
2023-09-12 06:06:06 +03:00
On Windows:
2023-09-12 07:05:00 +03:00
```
2023-09-12 06:06:06 +03:00
cd WareHouse/project_name_DefaultOrganization_timestamp
python main.py
```
2023-09-04 14:24:28 +03:00
## ✨️ Advanced Skills
For more detailed information, please refer to our [Wiki ](wiki.md ), where you can find:
- An introduction to all command run parameters.
2023-09-06 06:06:31 +03:00
- A straightforward guide for setting up a local web demo, which includes enhanced visualized logs, a replay demo, and a
simple ChatChain Visualizer.
2023-09-04 14:24:28 +03:00
- An overview of the ChatDev framework.
- A comprehensive introduction to all advanced parameters in ChatChain configuration.
- Guides for customizing ChatDev, including:
2023-09-06 06:06:31 +03:00
- ChatChain: Design your own software development process (or any other process), such
as ``DemandAnalysis -> Coding -> Testing -> Manual``.
2023-09-04 14:24:28 +03:00
- Phase: Design your own phase within ChatChain, like ``DemandAnalysis``.
- Role: Defining the various agents in your company, such as the ``Chief Executive Officer``.
## 🤗 Share Your Software!
2023-09-06 06:06:31 +03:00
**Code**: We are enthusiastic about your interest in participating in our open-source project. If you come across any
problems, don't hesitate to report them. Feel free to create a pull request if you have any inquiries or if you are
prepared to share your work with us! Your contributions are highly valued. Please let me know if there's anything else
you need assistance!
**Company**: Creating your own customized "ChatDev Company" is a breeze. This personalized setup involves three simple
configuration JSON files. Check out the example provided in the ``CompanyConfig/Default`` directory. For detailed
instructions on customization, refer to our [Wiki ](wiki.md ).
2023-09-04 14:24:28 +03:00
2023-09-06 06:06:31 +03:00
**Software**: Whenever you develop software using ChatDev, a corresponding folder is generated containing all the
essential information. Sharing your work with us is as simple as making a pull request. Here's an example: execute the
command ``python3 run.py --task "design a 2048 game" --name "2048" --org "THUNLP" --config "Default"``. This will
create a software package and generate a folder named ``/WareHouse/2048_THUNLP_timestamp``. Inside, you'll find:
2023-09-04 14:24:28 +03:00
- All the files and documents related to the 2048 game software
2023-09-06 06:06:31 +03:00
- Configuration files of the company responsible for this software, including the three JSON config files
from ``CompanyConfig/Default``
2023-09-04 14:24:28 +03:00
- A comprehensive log detailing the software's building process that can be used to replay (``timestamp.log``)
- The initial prompt used to create this software (``2048.prompt``)
2023-09-06 08:33:16 +03:00
**See community contributed software [here ](Contribution.md )!**
2023-09-04 14:24:28 +03:00
2023-10-07 10:02:35 +03:00
## 👨💻 Software Contributors
2023-09-06 06:06:31 +03:00
< a href = "https://github.com/qianc62" > < img src = "https://avatars.githubusercontent.com/u/48988402?v=4" alt = "Contributor" style = "width:5%; border-radius: 50%;" / > < / a >
< a href = "https://github.com/thinkwee" > < img src = "https://avatars.githubusercontent.com/u/11889052?v=4" alt = "Contributor" style = "width:5%; border-radius: 50%;" / > < / a >
< a href = "https://github.com/NA-Wen" > < img src = "https://avatars.githubusercontent.com/u/92134380?v=4" alt = "Contributor" style = "width:5%; border-radius: 50%;" / > < / a >
2023-10-09 09:19:49 +03:00
< a href = "https://github.com/JiahaoLi2003" > < img src = "https://avatars.githubusercontent.com/u/111221887?v=4" alt = "Contributor" style = "width:5%; border-radius: 50%;" / > < / a >
2023-10-09 08:59:45 +03:00
< a href = "https://github.com/Alphamasterliu" > < img src = "https://avatars.githubusercontent.com/u/110011045?v=4" alt = "Contributor" style = "width:5%; border-radius: 50%;" / > < / a >
2023-09-06 06:06:31 +03:00
< a href = "https://github.com/GeekyWizKid" > < img src = "https://avatars.githubusercontent.com/u/133981481?v=4" alt = "Contributor" style = "width:5%; border-radius: 50%;" / > < / a >
2023-09-18 18:32:57 +03:00
< a href = "https://github.com/Munsif-Raza-T" > < img src = "https://avatars.githubusercontent.com/u/76085202?v=4" alt = "Contributor" style = "width:5%; border-radius: 50%;" / > < / a >
2023-10-07 10:02:35 +03:00
< a href = "https://github.com/djbritt" > < img src = "https://avatars.githubusercontent.com/u/28036018?v=4" alt = "Contributor" style = "width:5%; border-radius: 50%;" / > < / a >
2023-10-07 14:48:55 +03:00
< a href = "https://github.com/Classified3939" > < img src = "https://avatars.githubusercontent.com/u/102702965?v=4" alt = "Contributor" style = "width:5%; border-radius: 50%;" / > < / a >
2023-10-09 08:59:45 +03:00
< a href = "https://github.com/chenilim" > < img src = "https://avatars.githubusercontent.com/u/46905241?v=4" alt = "Contributor" style = "width:5%; border-radius: 50%;" / > < / a >
< a href = "https://github.com/delconis" > < img src = "https://avatars.githubusercontent.com/u/5824478?v=4" alt = "Contributor" style = "width:5%; border-radius: 50%;" / > < / a >
< a href = "https://github.com/eMcQuill" > < img src = "https://avatars.githubusercontent.com/u/139025701?v=4" alt = "Contributor" style = "width:5%; border-radius: 50%;" / > < / a >
2023-09-18 18:32:57 +03:00
2023-10-07 10:02:35 +03:00
## 🔎 Citation
2023-09-04 14:24:28 +03:00
```
@misc {qian2023communicative,
title={Communicative Agents for Software Development},
author={Chen Qian and Xin Cong and Wei Liu and Cheng Yang and Weize Chen and Yusheng Su and Yufan Dang and Jiahao Li and Juyuan Xu and Dahai Li and Zhiyuan Liu and Maosong Sun},
year={2023},
eprint={2307.07924},
archivePrefix={arXiv},
primaryClass={cs.SE}
}
```
## ⚖️ License
2023-09-25 11:43:01 +03:00
- Source Code Licensing: Our project's source code is licensed under the Apache 2.0 License. This license permits the use, modification, and distribution of the code, subject to certain conditions outlined in the Apache 2.0 License.
- Project Open-Source Status: The project is indeed open-source; however, this designation is primarily intended for non-commercial purposes. While we encourage collaboration and contributions from the community for research and non-commercial applications, it is important to note that any utilization of the project's components for commercial purposes necessitates separate licensing agreements.
- Data Licensing: The related data utilized in our project is licensed under CC BY-NC 4.0. This license explicitly permits non-commercial use of the data. We would like to emphasize that any models trained using these datasets should strictly adhere to the non-commercial usage restriction and should be employed exclusively for research purposes.
2023-09-06 06:06:31 +03:00
2023-10-07 10:02:35 +03:00
## 🌟 Star History
2023-09-06 06:06:31 +03:00
[![Star History Chart ](https://api.star-history.com/svg?repos=openbmb/chatdev&type=Date )](https://star-history.com/#openbmb/chatdev& Date)
2023-09-07 05:17:56 +03:00
2023-10-07 09:48:50 +03:00
2023-10-07 10:02:35 +03:00
## 🤝 Acknowledgments
2023-10-07 09:48:50 +03:00
< a href = "http://nlp.csai.tsinghua.edu.cn/" > < img src = "misc/thunlp.png" height = 50pt > < / a >
< a href = "https://modelbest.cn/" > < img src = "misc/modelbest.png" height = 50pt > < / a >
< a href = "https://github.com/OpenBMB/AgentVerse/" > < img src = "misc/agentverse.png" height = 50pt > < / a >
< a href = "https://aibrb.com/introducing-herbie-your-super-employee-for-streamlined-productivity/" > < img src = "https://aibrb.com/wp-content/uploads/2023/09/Featured-on-AIBRB.com-white-1.png" height = 50pt > < / a >
2023-10-07 10:02:35 +03:00
## 📬 Contact
2023-09-07 05:17:56 +03:00
2023-09-07 06:00:12 +03:00
If you have any questions, feedback, or would like to get in touch, please feel free to reach out to us via email at [chatdev.openbmb@outlook.com ](mailto:chatdev.openbmb@outlook.com )