# 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:多智能体框架
[ En | 中 | Fr | 日 ] 为 GPT 分配不同角色,形成协作实体以应对复杂任务。
软件公司多智能体架构图(逐步实现中)
## 快速上手 ### 安装 > 请确保您的系统已安装 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)。