Files
wehub-resource-sync 8294c5942a
Pre-commit checks / pre-commit-check (push) Waiting to run
Full Tests / build (3.9) (push) Waiting to run
Unit Tests / build (3.9) (push) Waiting to run
docs: make Chinese README the default
2026-07-13 10:01:08 +00:00

8.3 KiB
Raw Permalink Blame History

Note

本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
English · 原始项目 · 上游 README
原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。

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 成为 @ProductHunt 本周第一产品!🏆

🚀 2025 年 3 月 4 日:🎉 mgx.dev 成为 @ProductHunt 当日第一产品!🏆

🚀 2025 年 2 月 19 日:我们正式发布自然语言编程产品:MGX (MetaGPT X) —— 全球首个 AI 智能体开发团队。更多详情见 Twitter.

🚀 2025 年 2 月 17 日:我们介绍了两篇论文:SPOAOT,,请查看代码

🚀 2025 年 1 月 22 日:我们的论文 AFlow: Automating Agentic Workflow Generation 被 ICLR 2025 接收为口头报告(前 1.8%,在基于 LLM 的 Agent 类别中排名第 2

👉👉 更早动态

软件公司即多智能体系统

  1. MetaGPT 以一行需求作为输入,输出用户故事 / 竞品分析 / 需求 / 数据结构 / API / 文档等
  2. 在内部,MetaGPT 包含产品经理 / 架构师 / 项目经理 / 工程师。它提供软件公司的完整流程以及精心编排的 SOP(标准作业程序)
    1. Code = SOP(Team) 是核心理念。我们将 SOP 具象化,并应用于由 LLM 组成的团队。

A software company consists of LLM-based roles

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

快速开始

安装

请确保系统已安装 Python 3.9 或更高版本,但低于 3.12。可通过以下命令检查:python --version
你也可以这样使用 condaconda create -n metagpt python=3.9 && conda activate metagpt

pip install --upgrade metagpt
# or `pip install --upgrade git+https://github.com/geekan/MetaGPT.git`
# or `git clone https://github.com/geekan/MetaGPT && cd MetaGPT && pip install --upgrade -e .`

实际使用前请先安装 nodepnpm

详细安装指引请参阅 cli_installdocker_install

配置

你可以通过运行以下命令初始化 MetaGPT 配置,或手动创建 ~/.metagpt/config2.yaml 文件:

# Check https://docs.deepwisdom.ai/main/en/guide/get_started/configuration.html for more details
metagpt --init-config  # it will create ~/.metagpt/config2.yaml, just modify it to your needs

你可参照示例文档:配置 ~/.metagpt/config2.yaml

llm:
  api_type: "openai"  # or azure / ollama / groq etc. Check LLMType for more options
  model: "gpt-4-turbo"  # or gpt-3.5-turbo
  base_url: "https://api.openai.com/v1"  # or forward url / other llm url
  api_key: "YOUR_API_KEY"

使用

安装完成后,可在 CLI 中使用 MetaGPT

metagpt "Create a 2048 game"  # this will create a repo in ./workspace

或作为库使用

from metagpt.software_company import generate_repo
from metagpt.utils.project_repo import ProjectRepo

repo: ProjectRepo = generate_repo("Create a 2048 game")  # or ProjectRepo("<path>")
print(repo)  # it will print the repo structure with files

你也可以使用 Data Interpreter 来编写代码:

import asyncio
from metagpt.roles.di.data_interpreter import DataInterpreter

async def main():
    di = DataInterpreter()
    await di.run("Run data analysis on sklearn Iris dataset, include a plot")

asyncio.run(main())  # or await main() in a jupyter notebook setting

快速入门与演示视频

https://github.com/user-attachments/assets/888cb169-78c3-4a42-9d62-9d90ed3928c9

教程

支持

Discord 加入我们

📢 加入我们的 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}
}

如需了解更多相关工作,请参阅 Academic Work