1. SummarizeCode动作:用于基于代码进行总结,思考bug、逻辑、todo
2. CodeReview动作优化:目前强制要求回答问题,有更高的成功率了
1. 增加了LGTM/LBTM的回答,在LGTM时会及时停止,不重写代码
2. 目前增加了设置中的参数code_review_k_times,与reflexion类似,设置为2
3. 仍然有概率发生指令不遵循,尤其是会有比较高的概率发生同时review多个代码文件,还没想好怎么解决 #FIXME
3. 增加了env到Action结构中,现在可以直接调用环境接口了
4. WriteDesign:去除了对project_name的纠正代码,现在引导下可以一次生成对
1. 修改了提示词中的##格式,改为了JSON格式
2. 数据结构
1. Document的标准化:Env->Repo->Document,其中Document/Asset/Code都是Document
1. 原用于检索的Document改为IndexableDocument
2. Repo结构引入:用于Document装载与元数据装载
3. RepoParser引入:写了一个简单的AST parser(后续可能要换tree-sitter),给出了整库symbol
4. Env中增加了set/get/set_doc/get_doc接口,用于set/get单个变量或者一个Document。这个逻辑后续或许会进一步简化
3. 配置优化
1. 默认更换为gpt-4-1106-preview,以获得最好的效果与成本
2. 提供~/.metagpt作为配置最高优先级目录,从中读取config.yaml
3. workspace可以灵活指定了,在config中配置
4. project_name可以由命令行指定,并且改为由ProductManager生成
4. metagpt作为默认命令行,而非python startup.py
metagpt --help
metagpt --project-name game_2048 "make a 2048 game"
metagpt "make a 2048 game"
metagpt --project-name game_2048 --inc "将2048改为4096"
metagpt --project-name game_2048 --auto-inc "make a 2048 game"
1. 使用新的METAGPT_ROOT生成方式,而非寻找git,以便cli安装
2. 命令行由fire换为了typer,它会带来相对更好的体验
3. project_name可以灵活指定了,在metagpt命令行输入中配置
5. 其他
1. 现在支持多国语言了,中文已测试
2. BossRequirement -> UserRequirement
3. 大量错误文本的修正,增加了可读性
4. 中量提示词优化,稍微提升了一些准确率
5. 暂时屏蔽了LongtermMemory相关逻辑,这个逻辑底层调用了langchain的FAISS,会带来~5秒加载耗时
6. 修复了安装包中的部分描述错误
7. 去除了config中在openai_proxy设定时对base的重复修改,这个修改应该在openai初始化时发生
8. 修复了JSON在中文存储时的特定问题,ensure_ascii=False
|
||
|---|---|---|
| .devcontainer | ||
| config | ||
| docs | ||
| examples | ||
| metagpt | ||
| tests | ||
| .dockerignore | ||
| .gitattributes | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| Dockerfile | ||
| LICENSE | ||
| README.md | ||
| requirements-ocr.txt | ||
| requirements.txt | ||
| ruff.toml | ||
| setup.py | ||
MetaGPT: The Multi-Agent Framework
Assign different roles to GPTs to form a collaborative software entity for complex tasks.
- MetaGPT takes a one line requirement as input and outputs user stories / competitive analysis / requirements / data structures / APIs / documents, etc.
- Internally, MetaGPT includes product managers / architects / project managers / engineers. It provides the entire process of a software company along with carefully orchestrated SOPs.
Code = SOP(Team)is the core philosophy. We materialize SOP and apply it to teams composed of LLMs.
Software Company Multi-Role Schematic (Gradually Implementing)
Install
Pip installation
# Step 1: Ensure that Python 3.9+ is installed on your system. You can check this by using:
# You can use conda to initialize a new python env
# conda create -n metagpt python=3.9
# conda activate metagpt
python3 --version
# Step 2: Clone the repository to your local machine for latest version, and install it.
git clone https://github.com/geekan/MetaGPT.git
cd MetaGPT
pip3 install -e. # or pip3 install metagpt # for stable version
# Step 3: run the startup.py
# setup your OPENAI_API_KEY in key.yaml copy from config.yaml
python3 startup.py "Write a cli snake game"
# Step 4 [Optional]: If you want to save the artifacts like diagrams such as quadrant chart, system designs, sequence flow in the workspace, you can execute the step before Step 3. By default, the framework is compatible, and the entire process can be run completely without executing this step.
# If executing, ensure that NPM is installed on your system. Then install mermaid-js. (If you don't have npm in your computer, please go to the Node.js official website to install Node.js https://nodejs.org/ and then you will have npm tool in your computer.)
npm --version
sudo npm install -g @mermaid-js/mermaid-cli
detail installation please refer to cli_install
Docker installation
Note: In the Windows, you need to replace "/opt/metagpt" with a directory that Docker has permission to create, such as "D:\Users\x\metagpt"
# Step 1: Download metagpt official image and prepare config.yaml
docker pull metagpt/metagpt:latest
mkdir -p /opt/metagpt/{config,workspace}
docker run --rm metagpt/metagpt:latest cat /app/metagpt/config/config.yaml > /opt/metagpt/config/key.yaml
vim /opt/metagpt/config/key.yaml # Change the config
# Step 2: Run metagpt demo with container
docker run --rm \
--privileged \
-v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
-v /opt/metagpt/workspace:/app/metagpt/workspace \
metagpt/metagpt:latest \
python startup.py "Write a cli snake game"
detail installation please refer to docker_install
QuickStart & Demo Video
- Try it on MetaGPT Huggingface Space
- Matthew Berman: How To Install MetaGPT - Build A Startup With One Prompt!!
- Official Demo Video
https://github.com/geekan/MetaGPT/assets/34952977/34345016-5d13-489d-b9f9-b82ace413419
Tutorial
- 🗒 Online Document
- 💻 Usage
- 🔎 What can MetaGPT do?
- 🛠 How to build your own agents?
- 🧑💻 Contribution
- 🔖 Use Cases
- ❓ FAQs
Support
Discard Join US
📢 Join Our Discord Channel!
Looking forward to seeing you there! 🎉
Contact Information
If you have any questions or feedback about this project, please feel free to contact us. We highly appreciate your suggestions!
- Email: alexanderwu@fuzhi.ai
- GitHub Issues: For more technical inquiries, you can also create a new issue in our GitHub repository.
We will respond to all questions within 2-3 business days.
Citation
For now, cite the arXiv paper:
@misc{hong2023metagpt,
title={MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework},
author={Sirui Hong and Mingchen Zhuge and Jonathan Chen and Xiawu Zheng and Yuheng Cheng and Ceyao Zhang and Jinlin Wang and Zili Wang and Steven Ka Shing Yau and Zijuan Lin and Liyang Zhou and Chenyu Ran and Lingfeng Xiao and Chenglin Wu and Jürgen Schmidhuber},
year={2023},
eprint={2308.00352},
archivePrefix={arXiv},
primaryClass={cs.AI}
}
