# MetaGPT **Repository Path**: adminsroot/MetaGPT ## Basic Information - **Project Name**: MetaGPT - **Description**: 源码地址:https://github.com/FoundationAgents/MetaGPT.git - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2025-12-21 - **Last Updated**: 2025-12-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MetaGPT:多智能体框架

MetaGPT logo: Enable GPT to work in a software company, collaborating to tackle more complex tasks.

[ En | | Fr | ] 为 GPT 分配不同角色,形成协作实体以应对复杂任务。

License: MIT Discord Follow Twitter Follow

## 新闻 🚀 2025年3月10日:🎉 [mgx.dev](https://mgx.dev/) 荣获 @ProductHunt “本周最佳产品”称号!🏆 🚀 2025年3月4日:🎉 [mgx.dev](https://mgx.dev/) 荣获 @ProductHunt “今日最佳产品”称号!🏆 🚀 2025年2月19日:我们正式推出自然语言编程产品:[MGX (MetaGPT X)](https://mgx.dev/) —— 全球首个由 AI 智能体组成的开发团队。更多详情请见 [Twitter](https://x.com/MetaGPT_/status/1892199535130329356)。 🚀 2025年2月17日:我们发布了两篇论文:[SPO](https://arxiv.org/pdf/2502.06855) 和 [AOT](https://arxiv.org/pdf/2502.12018),请查看 [代码示例](examples)! 🚀 2025年1月22日:我们的论文 [AFlow: Automating Agentic Workflow Generation](https://openreview.net/forum?id=z5uVAKwmjf) 已被 **ICLR 2025** 接受为 **口头报告(前1.8%)**,在基于大模型的智能体类别中排名 **第二**。 👉👉 [历史新闻](docs/NEWS.md) ## 软件公司作为多智能体系统 1. MetaGPT 输入 **一行需求说明**,输出 **用户故事 / 竞品分析 / 需求文档 / 数据结构 / API 接口 / 文档等**。 2. 内部包含 **产品经理 / 架构师 / 项目经理 / 工程师** 等角色。它提供了完整的 **软件公司运作流程**,并辅以精心设计的标准操作流程(SOP)。 1. `代码 = SOP(团队)` 是其核心理念。我们将 SOP 实体化,并应用于由大语言模型组成的团队。 ![一个由基于 LLM 的角色构成的软件公司](docs/resources/software_company_cd.jpeg)

软件公司多智能体架构图(逐步实现中)

## 快速上手 ### 安装 > 请确保您的系统已安装 Python 3.9 或更高版本,但低于 3.12 版本。可通过以下命令检查:`python --version`。 > 可使用 conda 如下操作:`conda create -n metagpt python=3.9 && conda activate metagpt` ```bash 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 .` ``` **在实际使用前,请先安装 [node](https://nodejs.org/en/download) 和 [pnpm](https://pnpm.io/installation#using-npm)。** 详细安装指南请参考 [cli_install](https://docs.deepwisdom.ai/main/en/guide/get_started/installation.html#install-stable-version) 或 [docker_install](https://docs.deepwisdom.ai/main/en/guide/get_started/installation.html#install-with-docker) ### 配置 您可以通过运行以下命令初始化 MetaGPT 配置,或手动创建 `~/.metagpt/config2.yaml` 文件: ```bash # 更多详情请参考 https://docs.deepwisdom.ai/main/en/guide/get_started/configuration.html metagpt --init-config # 将创建 ~/.metagpt/config2.yaml,只需根据需要修改即可 ``` 您可以根据 [示例文件](https://github.com/geekan/MetaGPT/blob/main/config/config2.example.yaml) 与 [文档](https://docs.deepwisdom.ai/main/en/guide/get_started/configuration.html) 配置 `~/.metagpt/config2.yaml`: ```yaml llm: api_type: "openai" # 或 azure / ollama / groq 等。可参考 LLMType 获取更多选项 model: "gpt-4-turbo" # 或 gpt-3.5-turbo base_url: "https://api.openai.com/v1" # 或代理地址 / 其他 LLM 地址 api_key: "YOUR_API_KEY" ``` ### 使用方法 安装完成后,您可以在命令行中使用 MetaGPT: ```bash metagpt "创建一个 2048 游戏" # 这将在 ./workspace 目录下生成项目仓库 ``` 或作为库使用: ```python from metagpt.software_company import generate_repo from metagpt.utils.project_repo import ProjectRepo repo: ProjectRepo = generate_repo("创建一个 2048 游戏") # 或 ProjectRepo("<路径>") print(repo) # 将打印出仓库结构及文件列表 ``` 您也可以使用 [数据解释器](https://github.com/geekan/MetaGPT/tree/main/examples/di) 来编写代码: ```python 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() ``` ### 快速入门 & 演示视频 - 在 [MetaGPT Huggingface Space](https://huggingface.co/spaces/deepwisdom/MetaGPT-SoftwareCompany) 上试用 - [Matthew Berman:如何安装 MetaGPT —— 仅凭一个提示构建初创公司!](https://youtu.be/uT75J_KG_aY) - [官方演示视频](https://github.com/geekan/MetaGPT/assets/2707039/5e8c1062-8c35-440f-bb20-2b0320f8d27d) https://github.com/user-attachments/assets/888cb169-78c3-4a42-9d62-9d90ed3928c9 ## 教程 - 🗒 [在线文档](https://docs.deepwisdom.ai/main/en/) - 💻 [使用指南](https://docs.deepwisdom.ai/main/en/guide/get_started/quickstart.html) - 🔎 [MetaGPT 能做什么?](https://docs.deepwisdom.ai/main/en/guide/get_started/introduction.html) - 🛠 如何构建自己的智能体? - [MetaGPT 使用与开发指南 | 智能体入门 101](https://docs.deepwisdom.ai/main/en/guide/tutorials/agent_101.html) - [MetaGPT 使用与开发指南 | 多智能体入门 101](https://docs.deepwisdom.ai/main/en/guide/tutorials/multi_agent_101.html) - 🧑‍💻 贡献指南 - [开发路线图](docs/ROADMAP.md) - 🔖 应用场景 - [数据解释器](https://docs.deepwisdom.ai/main/en/guide/use_cases/agent/interpreter/intro.html) - [辩论模式](https://docs.deepwisdom.ai/main/en/guide/use_cases/multi_agent/debate.html) - [研究员](https://docs.deepwisdom.ai/main/en/guide/use_cases/agent/researcher.html) - [收据助手](https://docs.deepwisdom.ai/main/en/guide/use_cases/agent/receipt_assistant.html) - ❓ [常见问题解答](https://docs.deepwisdom.ai/main/en/guide/faq.html) ## 支持 ### 加入 Discord 社区 📢 加入我们的 [Discord 频道](https://discord.gg/ZRHeExS6xv)! 期待在那见到你!🎉 ### 贡献者申请表单 📝 [填写表单](https://airtable.com/appInfdG0eJ9J4NNL/pagK3Fh1sGclBvVkV/form) 成为贡献者。我们期待你的参与! ### 联系方式 如果您对本项目有任何疑问或反馈,请随时联系我们。非常感谢您的建议! - **邮箱:** alexanderwu@deepwisdom.ai - **GitHub 问题提交:** 对于技术相关问题,您也可以在我们的 [GitHub 仓库](https://github.com/geekan/metagpt/issues) 中创建新问题。 我们将在 2-3 个工作日内回复所有问题。 ## 引用 为持续关注最新研究与进展,请在 Twitter 上关注 [@MetaGPT_](https://twitter.com/MetaGPT_)。 如需在学术出版物中引用 [MetaGPT](https://openreview.net/forum?id=VtmBAGCN7o),请使用以下 BibTeX 格式: ```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} } ``` 更多研究成果请参阅 [学术成果](docs/ACADEMIC_WORK.md)。