Python 版本必须 >=3.9 且 <3.12,否则装不上;实际使用前需另装 node 和 pnpm;需先运行 metagpt --init-config 并在 ~/.metagpt/config2.yaml 填好 LLM 的 api_key 等配置。

MetaGPT
FoundationAgentsMIT更新放缓用自然语言描述需求,就能让多个 LLM 智能体扮演产品经理、架构师、工程师等角色协作,自动产出需求文档、设计稿和代码。
🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
pip install --upgrade metagpt
metagpt --init-config
metagpt "Create a 2048 game"README 未说明显存或 GPU 要求,仅要求 Python 3.9 及以上且低于 3.12;实际推理依赖所配置的 LLM 服务(如 OpenAI、Azure、Ollama、Groq)。
多智能体框架,把一句话需求拆给产品经理、架构师、工程师等角色协作产出软件
用自然语言描述需求,就能让多个 LLM 智能体扮演产品经理、架构师、工程师等角色协作,自动产出需求文档、设计稿和代码。
核心能力
- 按软件公司 SOP 编排产品经理、架构师、项目经理、工程师等角色
- 输入一行需求,输出用户故事、竞品分析、需求、数据结构、API 和文档
- 以 Code = SOP(Team) 为核心,把 SOP 落到 LLM 团队上
- 提供 Data Interpreter 角色,可执行数据分析并生成图表
- 支持 CLI 与 Python 库两种调用方式,生成仓库到 workspace
容易踩的坑
- v0.8.2最新正式版2025-03-09 · 2025-03-09 15:59 UTC
fix bugs and some merged PRs
- v0.8.1Patch release: v0.8.12024-04-22 · 2024-04-22 10:56 UTC
查看更新说明
fix bug
- v0.8.0v0.8.0: Introduction of Data Interpreter, Integration with RAG, and Expanded Support for LLMs2024-03-29 · 2024-03-29 11:10 UTC
查看更新说明
Release Highlights
Data Interpreter: Open Source and Better "Devin"
Data Interpreter is an autonomous agent that uses notebook, browser, shell, stable diffusion, and any custom tool to complete tasks.
Data Interpreter has achieved state-of-the-art scores in machine learning, mathematical reasoning, and open-ended tasks, and can analyze stocks, imitate websites, and train models.
It can debug code by itself, fix failures by itself, and solve a large number of real-life problems by itself.
We open-source our code and provide a wealth of working examples to give everyone access to state-of-the-art AI capabilities.
📝 Paper 🔗 Examples 📖 How to use
RAG
RAG module integrated! Common features such as indexing, retrieval, and rank are supported. Explore this example for a quick start.
New LLMs
New members for the supported LLM family: This time, Claude, QianFan, DashScope, and Yi. Check out here for configuration.
What's Changed
- Add ut mocker for mermaid ink by @shenchucheng in https://github.com/geekan/MetaGPT/pull/884
- Unify Interpreter naming by @garylin2099 in https://github.com/geekan/MetaGPT/pull/901
- Bump ipykernel to 6.27.1 by @revupst in https://github.com/geekan/MetaGPT/pull/938
- Update role.py : Role.set_actions() by @lixiangtiandashen in https://github.com/geekan/MetaGPT/pull/922
- Fix action.llm.model in examples/debate_simple by @BaoLiqi in https://github.com/geekan/MetaGPT/pull/930
- Feat mock openai embed for document_store and memory UTs by @better629 in https://github.com/geekan/MetaGPT/pull/939
- Feat add qianfan and dashscope by @better629 in https://github.com/geekan/MetaGPT/pull/940
- Changed requirements.txt by @Abhishek0075 in https://github.com/geekan/MetaGPT/pull/933
- Feat simplify provider ut code by @better629 in https://github.com/geekan/MetaGPT/pull/942
- Update prompt of ocr example by @mannaandpoem in https://github.com/geekan/MetaGPT/pull/944
- Feat: Wrap Openllm, Fireworks and other services into the OpenAILLM class. by @YangQianli92 in https://github.com/geekan/MetaGPT/pull/946
- Doc: add docker installation section and fold it by @voidking in https://github.com/geekan/MetaGPT/pull/950
- Feat fix missing mistral by @better629 in https://github.com/geekan/MetaGPT/pull/953
- Feat add anthropic_api by @better629 in https://github.com/geekan/MetaGPT/pull/961
- Update code plan and change and Improve test coverage by @mannaandpoem in https://github.com/geekan/MetaGPT/pull/948
- Rename interpreter by @garylin2099 in https://github.com/geekan/MetaGPT/pull/952
- Feat: RFC197 by @iorisa in https://github.com/geekan/MetaGPT/pull/960
- Feat: +SECURITY.md by @iorisa in https://github.com/geekan/MetaGPT/pull/970
- Feat: fix JSONDecodeError error caused by incorrect indentation used … by @moyitech in https://github.com/geekan/MetaGPT/pull/963
- Feat: +rfc197 example by @iorisa in https://github.com/geekan/MetaGPT/pull/968
- Improvement made : by automating search engine configuration in example search_in_search_engine.py by @Abhishek0075 in https://github.com/geekan/MetaGPT/pull/965
- Restructure DataInterpreter by @garylin2099 in https://github.com/geekan/MetaGPT/pull/995
- Restore WalmartSalesForecast example. by @orange-crow in https://github.com/geekan/MetaGPT/pull/1007
- Feat add offcial yi-34b by @better629 in https://github.com/geekan/MetaGPT/pull/1010
- Fix bug#979 : RuntimeError: fail to reduce message length by @azurewtl in https://github.com/geekan/MetaGPT/pull/986
- Feat:add user llm config by @liujun3660105 in https://github.com/geekan/MetaGPT/pull/997
- Feat add rag by @better629 in https://github.
- v0.7.7Patch release: v0.7.72024-03-29 · 2024-03-29 04:00 UTC
查看更新说明
A patch release for the following issues:
- fixbug: #958 by @iorisa in https://github.com/geekan/MetaGPT/pull/1083
- v0.7.6Patch release: v0.7.62024-03-12 · 2024-03-12 14:53 UTC
查看更新说明
A patch release for the following issues:
- feat: gemini + proxy in https://github.com/geekan/MetaGPT/pull/971
- fixbug: gbk UnicodeEncodeError in https://github.com/geekan/MetaGPT/pull/973
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
MetaGPT: The Multi-Agent Framework
News
🚀 Mar. 10, 2025: 🎉 mgx.dev is the #1 Product of the Week on @ProductHunt! 🏆
🚀 Mar. 4, 2025: 🎉 mgx.dev is the #1 Product of the Day on @ProductHunt! 🏆
🚀 Feb. 19, 2025: Today we are officially launching our natural language programming product: MGX (MetaGPT X) - the world's first AI agent development team. More details on Twitter.
🚀 Feb. 17, 2025: We introduced two papers: SPO and AOT, check the code!
🚀 Jan. 22, 2025: Our paper AFlow: Automating Agentic Workflow Generation accepted for oral presentation (top 1.8%) at ICLR 2025, ranking #2 in the LLM-based Agent category.
👉👉 Earlier news
Software Company as Multi-Agent System
- 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.

Get Started
Installation
Ensure that Python 3.9 or later, but less than 3.12, is installed on your system. You can check this by using:
python --version.
You can use conda like this:conda 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 .`
Install node and pnpm before actual use.
For detailed installation guidance, please refer to cli_install or docker_install
Configuration
You can init the config of MetaGPT by running the following command, or manually create ~/.metagpt/config2.yaml file:
# 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
You can configure ~/.metagpt/config2.yaml according to the example and doc:
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"
Usage
After installation, you can use MetaGPT at CLI
metagpt "Create a 2048 game" # this will create a repo in ./workspace
or use it as library
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
You can also use Data Interpreter to write code:
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
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/user-attachments/assets/888cb169-78c3-4a42-9d62-9d90ed3928c9
Tutorial
- 🗒 Online Document
- 💻 Usage
- 🔎 What can MetaGPT do?
- 🛠 How to build your own agents?
- 🧑💻 Contribution
- 🔖 Use Cases
- ❓ FAQs
Support
Discord Join US
📢 Join Our Discord Channel! Looking forward to seeing you there! 🎉
Contributor form
📝 Fill out the form to become a contributor. We are looking forward to your participation!
Contact Information
If you have any questions or feedback about this project, please feel free to contact us. We highly appreciate your suggestions!
- Email: [email protected]
- 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
To stay updated with the latest research and development, follow @MetaGPT_ on Twitter.
To cite MetaGPT in publications, please use the following BibTeX entries.
@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}
}
For more work, please refer to Academic Work.