[ En | 中 | Fr | 日 ] 为 GPT 分配不同的角色,以组成一个协作实体来处理复杂任务。
🚀 2025年3月10日:🎉 mgx.dev 成为 @ProductHunt 本周最佳产品第一名!🏆
🚀 2025年3月4日:🎉 mgx.dev 成为 @ProductHunt 当日最佳产品第一名!🏆
🚀 2025年2月19日:今天我们正式发布自然语言编程产品:MGX (MetaGPT X) —— 全球首个 AI 智能体开发团队。更多详情请见 Twitter。
🚀 2025年2月17日:我们发布了两篇论文:SPO 和 AOT,查看 代码!
🚀 2025年1月22日:我们的论文 AFlow: Automating Agentic Workflow Generation 被 ICLR 2025 接收为 口头报告(前 1.8%),在基于 LLM 的智能体类别中 排名第 2。
👉👉 更早的动态
代码 = SOP(团队) 是核心哲学。我们将 SOP 具体化,并将其应用于由 LLM 组成的团队。
软件公司多智能体示意图(逐步实现中)
确保您的系统已安装 Python 3.9 或更高版本,但低于 3.12。您可以使用以下命令检查:
python --version。
您可以使用 conda,例如:conda create -n metagpt python=3.9 && conda activate metagpt
pip install --upgrade metagpt
# 或者 `pip install --upgrade git+https://github.com/geekan/MetaGPT.git`
# 或者 `git clone https://github.com/geekan/MetaGPT && cd MetaGPT && pip install --upgrade -e .`
详细的安装指南,请参考 cli_install 或 docker_install。
您可以通过运行以下命令初始化 MetaGPT 的配置,或者手动创建 ~/.metagpt/config2.yaml 文件:
# 更多详情请查看 https://docs.deepwisdom.ai/main/en/guide/get_started/configuration.html
metagpt --init-config # 这将创建 ~/.metagpt/config2.yaml,只需根据您的需求修改它
您可以根据 示例 和 文档 配置 ~/.metagpt/config2.yaml:
llm:
api_type: "openai" # 或 azure / ollama / groq 等。更多选项请查看 LLMType
model: "gpt-4-turbo" # 或 gpt-3.5-turbo
base_url: "https://api.openai.com/v1" # 或转发 URL / 其他 LLM URL
api_key: "YOUR_API_KEY"
安装后,您可以在命令行界面(CLI)使用 MetaGPT:
metagpt "Create a 2048 game" # 这将在 ./workspace 中创建一个代码仓库
或者将其作为库使用:
from metagpt.software_company import generate_repo
from metagpt.utils.project_repo import ProjectRepo
repo: ProjectRepo = generate_repo("Create a 2048 game") # 或者 ProjectRepo("<路径>")
print(repo) # 它将打印包含文件的仓库结构
您也可以使用 数据解释器 来编写代码:
import asyncio
from metagpt.roles.di.data_interpreter import DataInterpreter
async def main():
di = DataInterpreter()
await di.run("在 sklearn Iris 数据集上运行数据分析,包含一个图表")
asyncio.run(main()) # 或者在 Jupyter notebook 环境中使用 await main()
https://github.com/user-attachments/assets/888cb169-78c3-4a42-9d62-9d90ed3928c9
📢 加入我们的 Discord 频道!期待在那里见到您!🎉
📝 填写表单 成为贡献者。我们期待您的参与!
如果您对此项目有任何问题或反馈,请随时联系我们。我们非常重视您的建议!
我们将在 2-3 个工作日内回复所有问题。
要了解最新的研究和发展动态,请在 Twitter 上关注 @MetaGPT_。
要在出版物中引用 MetaGPT,请使用以下 BibTeX 条目。
@inproceedings{hong2024metagpt,
title={Meta{GPT}: Meta Programming for A Multi-Agent Collaborative Framework},
author={Sirui Hong and Mingchen Zhuge and Jonathan Chen and Xiawu Zheng and Yuheng Cheng and Jinlin Wang and Ceyao Zhang 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{\"u}rgen Schmidhuber},
booktitle={The Twelfth International Conference on Learning Representations},
year={2024},
url={https://openreview.net/forum?id=VtmBAGCN7o}
}
更多相关工作,请参考 学术工作。